Precise finite difference gradient computation. More...
#include <roboptim/core/decorator/finite-difference-gradient.hh>
Public Member Functions | |
ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ (GenericDifferentiableFunction< T >) | |
FivePointsRule (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 |
void | compute_deriv (typename GenericFunction< T >::size_type j, double h, double &result, double &round, double &trunc, typename GenericFunction< T >::const_argument_ref argument, typename GenericFunction< T >::size_type idFunction, typename GenericFunction< T >::argument_ref xEps) const |
Algorithm from the Gnu Scientific Library. | |
template<> | |
void | computeGradient (value_type epsilon, gradient_ref gradient, const_argument_ref argument, size_type idFunction, argument_ref xEps) const |
template<> | |
void | computeJacobian (value_type epsilon, jacobian_ref jacobian, const_argument_ref argument, argument_ref xEps) const |
template<> | |
void | computeColumn (value_type, gradient_ref, const_argument_ref, size_type, argument_ref) const |
Precise finite difference gradient computation.
Finite difference is computed using five-points stencil (i.e. ).
roboptim::finiteDifferenceGradientPolicies::FivePointsRule< T >::FivePointsRule | ( | const GenericFunction< T > & | adaptee | ) | [inline, explicit] |
void roboptim::finiteDifferenceGradientPolicies::FivePointsRule< T >::compute_deriv | ( | typename GenericFunction< T >::size_type | j, |
double | h, | ||
double & | result, | ||
double & | round, | ||
double & | trunc, | ||
typename GenericFunction< T >::const_argument_ref | argument, | ||
typename GenericFunction< T >::size_type | idFunction, | ||
typename GenericFunction< T >::argument_ref | xEps | ||
) | const |
Algorithm from the Gnu Scientific Library.
void roboptim::finiteDifferenceGradientPolicies::FivePointsRule< T >::computeColumn | ( | value_type | epsilon, |
gradient_ref | column, | ||
const_argument_ref | argument, | ||
size_type | colIdx, | ||
argument_ref | xEps | ||
) | const [virtual] |
void roboptim::finiteDifferenceGradientPolicies::FivePointsRule< EigenMatrixSparse >::computeColumn | ( | value_type | , |
gradient_ref | , | ||
const_argument_ref | , | ||
size_type | , | ||
argument_ref | |||
) | const [inline, virtual] |
void roboptim::finiteDifferenceGradientPolicies::FivePointsRule< T >::computeGradient | ( | value_type | epsilon, |
gradient_ref | gradient, | ||
const_argument_ref | argument, | ||
size_type | idFunction, | ||
argument_ref | xEps | ||
) | const [virtual] |
void roboptim::finiteDifferenceGradientPolicies::FivePointsRule< EigenMatrixSparse >::computeGradient | ( | value_type | epsilon, |
gradient_ref | gradient, | ||
const_argument_ref | argument, | ||
size_type | idFunction, | ||
argument_ref | xEps | ||
) | const [inline, virtual] |
void roboptim::finiteDifferenceGradientPolicies::FivePointsRule< T >::computeJacobian | ( | value_type | epsilon, |
jacobian_ref | jacobian, | ||
const_argument_ref | argument, | ||
argument_ref | xEps | ||
) | const [virtual] |
Reimplemented from roboptim::finiteDifferenceGradientPolicies::Policy< T >.
void roboptim::finiteDifferenceGradientPolicies::FivePointsRule< EigenMatrixSparse >::computeJacobian | ( | value_type | epsilon, |
jacobian_ref | jacobian, | ||
const_argument_ref | argument, | ||
argument_ref | xEps | ||
) | const [inline, virtual] |
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
Reimplemented from roboptim::finiteDifferenceGradientPolicies::Policy< T >.
References roboptim::is_malloc_allowed(), and roboptim::set_is_malloc_allowed().
roboptim::finiteDifferenceGradientPolicies::FivePointsRule< T >::ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ | ( | GenericDifferentiableFunction< T > | ) |
Reimplemented from roboptim::finiteDifferenceGradientPolicies::Policy< T >.