Interface for the finite difference gradient policies. More...
#include <roboptim/core/decorator/finite-difference-gradient.hh>
Public Member Functions | |
ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ (GenericDifferentiableFunction< T >) | |
Policy (const GenericFunction< T > &adaptee) | |
virtual | ~Policy () |
Virtual destructor. More... | |
value_type & | sparseEpsilon () |
Get a reference to the epsilon used to converse dense to sparse matrices. More... | |
Protected Member Functions | |
virtual void | computeGradient (value_type epsilon, gradient_ref gradient, const_argument_ref argument, size_type idFunction, argument_ref xEps) const =0 |
virtual void | computeColumn (value_type epsilon, gradient_ref column, const_argument_ref argument, size_type colIdx, argument_ref xEps) const =0 |
virtual void | computeJacobian (value_type epsilon, jacobian_ref jacobian, const_argument_ref argument, argument_ref xEps) const |
template<> | |
void | computeJacobian (value_type epsilon, jacobian_ref jacobian, const_argument_ref argument, argument_ref xEps) const |
Protected Attributes | |
const GenericFunction< T > & | adaptee_ |
Wrapped function. More... | |
vector_t | column_ |
Vector storing temporary Jacobian column. More... | |
gradient_t | gradient_ |
Vector storing temporary Jacobian row. More... | |
value_type | sparseEps_ |
Threshold used for the conversion from dense to sparse matrix. More... | |
Interface for the finite difference gradient policies.
|
inlineexplicit |
|
inlinevirtual |
Virtual destructor.
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedvirtual |
Reimplemented in roboptim::finiteDifferenceGradientPolicies::FivePointsRule< T >, roboptim::finiteDifferenceGradientPolicies::FivePointsRule< T >, and roboptim::finiteDifferenceGradientPolicies::Simple< T >.
References roboptim::GenericFunction< T >::inputSize().
Referenced by roboptim::finiteDifferenceGradientPolicies::Policy< T >::computeJacobian().
|
inlineprotected |
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
References roboptim::finiteDifferenceGradientPolicies::Policy< T >::computeJacobian(), roboptim::GenericFunction< T >::inputSize(), roboptim::is_malloc_allowed(), and roboptim::set_is_malloc_allowed().
roboptim::finiteDifferenceGradientPolicies::Policy< T >::ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ | ( | GenericDifferentiableFunction< T > | ) |
|
inline |
Get a reference to the epsilon used to converse dense to sparse matrices.
This is only relevant when dealing with sparse functions. Set to a negative value to keep zeros as well.
References roboptim::finiteDifferenceGradientPolicies::Policy< T >::sparseEps_.
|
protected |
Wrapped function.
|
mutableprotected |
Vector storing temporary Jacobian column.
|
mutableprotected |
Vector storing temporary Jacobian row.
|
protected |
Threshold used for the conversion from dense to sparse matrix.
Referenced by roboptim::finiteDifferenceGradientPolicies::Policy< T >::sparseEpsilon().