Mathematical functions

Classes

class  roboptim::ConstantFunction
 Constant function. More...
class  roboptim::GenericFiniteDifferenceGradient< T, FdgPolicy >
 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 $\mathbb{R} \rightarrow \mathbb{R}^m$ function, derivable n times ( $n \geq 2$). More...
class  roboptim::GenericNumericLinearFunction< T >
 Build a linear function from a vector and a matrix. More...
class  roboptim::NumericQuadraticFunction
 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:
functionfunction that will be checked
functionIdfunction id in split representation
xpoint where the gradient will be evaluated
thresholdmaximum tolerated error
Returns:
true if valid, false if not
Examples:
finite-difference-gradient.cc.

References roboptim::GenericDifferentiableFunction< T >::gradient().

Referenced by roboptim::checkGradientAndThrow().

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