Mathematical functions

## Classes

class  roboptim::ConstantFunction
Constant function. More...
Compute automatically a gradient with finite differences. More...
class  roboptim::IdentityFunction
Identity function. More...
class  roboptim::NTimesDerivableFunction< 2 >
Explicit specialization for the stop case of NTimesDerivable class. More...
class  roboptim::NTimesDerivableFunction< DerivabilityOrder >
Define a function, derivable n times ( ). More...
class  roboptim::GenericNumericLinearFunction< T >
Build a linear function from a vector and a matrix. More...
Build a quadratic function from a matrix and a vector. More...

## Functions

template<typename T >
bool roboptim::checkGradient (const GenericDifferentiableFunction< T > &function, typename GenericDifferentiableFunction< T >::size_type functionId, const typename GenericDifferentiableFunction< T >::vector_t &x, typename GenericDifferentiableFunction< T >::value_type threshold=finiteDifferenceThreshold) throw ()
Check if a gradient is valid.
template<typename T >
void roboptim::checkGradientAndThrow (const GenericDifferentiableFunction< T > &function, typename GenericDifferentiableFunction< T >::size_type functionId, const typename GenericDifferentiableFunction< T >::vector_t &x, typename GenericDifferentiableFunction< T >::value_type threshold=finiteDifferenceThreshold) throw (BadGradient<T>)

## Function Documentation

template<typename T >
 bool roboptim::checkGradient ( const GenericDifferentiableFunction< T > & function, typename GenericDifferentiableFunction< T >::size_type functionId, const typename GenericDifferentiableFunction< T >::vector_t & x, typename GenericDifferentiableFunction< T >::value_type threshold = finiteDifferenceThreshold ) throw ()

Check if a gradient is valid.

Check if a gradient is valid by comparing the distance between its gradient and an automatically computed finite differences gradient.

Parameters:
 function function that will be checked functionId function id in split representation x point where the gradient will be evaluated threshold maximum tolerated error
Returns:
true if valid, false if not
Examples:
 void roboptim::checkGradientAndThrow ( const GenericDifferentiableFunction< T > & function, typename GenericDifferentiableFunction< T >::size_type functionId, const typename GenericDifferentiableFunction< T >::vector_t & x, typename GenericDifferentiableFunction< T >::value_type threshold = finiteDifferenceThreshold ) throw (BadGradient)