#include <stdexcept>
#include <roboptim/core/fwd.hh>
#include <roboptim/core/differentiable-function.hh>
#include <roboptim/core/portability.hh>
#include <roboptim/core/finite-difference-gradient.hxx>
Classes | |
class | roboptim::BadGradient< T > |
Exception thrown when a gradient check fail. More... | |
class | roboptim::finiteDifferenceGradientPolicies::Simple< T > |
Fast finite difference gradient computation. More... | |
class | roboptim::finiteDifferenceGradientPolicies::FivePointsRule< T > |
Precise finite difference gradient computation. More... | |
class | roboptim::GenericFiniteDifferenceGradient< T, FdgPolicy > |
Compute automatically a gradient with finite differences. More... | |
Namespaces | |
namespace | roboptim |
Meta-functions, functions and solvers related classes. | |
namespace | roboptim::finiteDifferenceGradientPolicies |
Contains finite difference gradients policies. | |
Functions | |
template<typename T > | |
std::ostream & | roboptim::operator<< (std::ostream &o, const BadGradient< T > &f) |
Override operator<< to handle exception display. | |
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>) |
Variables | |
static const double | roboptim::finiteDifferenceThreshold = 1e-4 |
Default threshold for checkGradient. | |
static const double | roboptim::finiteDifferenceEpsilon = 1e-8 |
Default epsilon for finite difference class. |