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

Precise finite difference gradient computation. More...

#include <roboptim/core/finite-difference-gradient.hh>

List of all members.

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. $\{x-2h, x-h, x, x+h, x+2h\}$).


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 ()
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]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines