roboptim::finiteDifferenceGradientPolicies::FivePointsRule< T > Class Template Reference

Precise finite difference gradient computation. More...

`#include <roboptim/core/fwd.hh>`

## Public Member Functions

| ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ (GenericDifferentiableFunction< T >)
void | computeGradient (const GenericFunction< T > &adaptee, value_type epsilon, gradient_t &gradient, const argument_t &argument, size_type idFunction, argument_t &xEps) const throw ()
template<>
void | computeGradient (const GenericFunction< EigenMatrixSparse > &adaptee, value_type epsilon, gradient_t &gradient, const argument_t &argument, size_type idFunction, argument_t &xEps) const throw()

## Detailed Description

### template<typename T>
class roboptim::finiteDifferenceGradientPolicies::FivePointsRule< T >

Precise finite difference gradient computation.

Finite difference is computed using five-points stencil (i.e. ).

## Member Function Documentation

template<typename T >

void roboptim::finiteDifferenceGradientPolicies::FivePointsRule< T >::computeGradient | ( | const GenericFunction< T > & | adaptee,
|  | value_type | epsilon,
|  | gradient_t & | gradient,
|  | const argument_t & | argument,
|  | size_type | idFunction,
|  | argument_t & | xEps
| ) |  | const
throw | ( |
| ) |  |

References roboptim::detail::compute_deriv(), and roboptim::GenericFunction< T >::outputSize().

template<>

void roboptim::finiteDifferenceGradientPolicies::FivePointsRule< EigenMatrixSparse >::computeGradient | ( | const GenericFunction< EigenMatrixSparse > & | adaptee,
|  | value_type | epsilon,
|  | gradient_t & | gradient,
|  | const argument_t & | argument,
|  | size_type | idFunction,
|  | argument_t & | xEps
| ) |  | const
throw | ( |
| ) |  |

inline

References roboptim::detail::compute_deriv(), and roboptim::GenericFunction< T >::outputSize().

template<typename T >

roboptim::finiteDifferenceGradientPolicies::FivePointsRule< T >::ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ | ( | GenericDifferentiableFunction< T > |  | ) |