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 function, derivable n times ( ). 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>) |
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.
function | function that will be checked |
functionId | function id in split representation |
x | point where the gradient will be evaluated |
threshold | maximum tolerated error |
References roboptim::GenericDifferentiableFunction< T >::gradient().
Referenced by roboptim::checkGradientAndThrow().
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>) |