Fast finite difference gradient computation. More...
#include <roboptim/core/decorator/finite-difference-gradient.hh>
Public Types | |
typedef Policy< T > | policy_t |
Public Member Functions | |
ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ (GenericDifferentiableFunction< T >) | |
Simple (const GenericFunction< T > &adaptee) | |
void | computeColumn (value_type epsilon, gradient_ref column, const_argument_ref argument, size_type colIdx, argument_ref xEps) const |
void | computeGradient (value_type epsilon, gradient_ref gradient, const_argument_ref argument, size_type idFunction, argument_ref xEps) const |
void | computeJacobian (value_type epsilon, jacobian_ref jacobian, const_argument_ref argument, argument_ref xEps) const |
template<> | |
void | computeGradient (value_type epsilon, gradient_ref gradient, const_argument_ref argument, size_type idFunction, argument_ref xEps) const |
template<> | |
void | computeColumn (value_type epsilon, gradient_ref column, const_argument_ref argument, size_type colIdx, argument_ref xEps) const |
Fast finite difference gradient computation.
Finite difference is computed using forward difference.
typedef Policy<T> roboptim::finiteDifferenceGradientPolicies::Simple< T >::policy_t |
roboptim::finiteDifferenceGradientPolicies::Simple< T >::Simple | ( | const GenericFunction< T > & | adaptee | ) | [inline, explicit] |
void roboptim::finiteDifferenceGradientPolicies::Simple< T >::computeColumn | ( | value_type | epsilon, |
gradient_ref | column, | ||
const_argument_ref | argument, | ||
size_type | colIdx, | ||
argument_ref | xEps | ||
) | const [virtual] |
Implements roboptim::finiteDifferenceGradientPolicies::Policy< T >.
References result_.
void roboptim::finiteDifferenceGradientPolicies::Simple< EigenMatrixSparse >::computeColumn | ( | value_type | epsilon, |
gradient_ref | column, | ||
const_argument_ref | argument, | ||
size_type | colIdx, | ||
argument_ref | xEps | ||
) | const [inline, virtual] |
Implements roboptim::finiteDifferenceGradientPolicies::Policy< T >.
References result_.
void roboptim::finiteDifferenceGradientPolicies::Simple< T >::computeGradient | ( | value_type | epsilon, |
gradient_ref | gradient, | ||
const_argument_ref | argument, | ||
size_type | idFunction, | ||
argument_ref | xEps | ||
) | const [virtual] |
Implements roboptim::finiteDifferenceGradientPolicies::Policy< T >.
References roboptim::GenericFunction< T >::inputSize(), and result_.
void roboptim::finiteDifferenceGradientPolicies::Simple< EigenMatrixSparse >::computeGradient | ( | value_type | epsilon, |
gradient_ref | gradient, | ||
const_argument_ref | argument, | ||
size_type | idFunction, | ||
argument_ref | xEps | ||
) | const [inline, virtual] |
Implements roboptim::finiteDifferenceGradientPolicies::Policy< T >.
References roboptim::GenericFunction< T >::inputSize(), and result_.
void roboptim::finiteDifferenceGradientPolicies::Simple< T >::computeJacobian | ( | value_type | epsilon, |
jacobian_ref | jacobian, | ||
const_argument_ref | argument, | ||
argument_ref | xEps | ||
) | const [virtual] |
Reimplemented from roboptim::finiteDifferenceGradientPolicies::Policy< T >.
References result_.
roboptim::finiteDifferenceGradientPolicies::Simple< T >::ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ | ( | GenericDifferentiableFunction< T > | ) |
Reimplemented from roboptim::finiteDifferenceGradientPolicies::Policy< T >.