All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
decorator/finite-difference-gradient.hh File Reference
#include <stdexcept>
#include <string>
#include <ostream>
#include <boost/shared_ptr.hpp>
#include <roboptim/core/fwd.hh>
#include <roboptim/core/differentiable-function.hh>
#include <roboptim/core/portability.hh>
#include <roboptim/core/decorator/finite-difference-gradient.hxx>

Classes

class  roboptim::BadGradient< T >
 Exception thrown when a gradient check fails. More...
 
class  roboptim::BadJacobian< T >
 Exception thrown when a Jacobian check fails. More...
 
class  roboptim::finiteDifferenceGradientPolicies::Policy< T >
 Interface for the finite difference gradient policies. 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
 defined(EIGEN_RUNTIME_NO_MALLOC) && !defined(ROBOPTIM_DO_NOT_CHECK_ALLOCATION)
 
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. More...
 
template<typename T >
std::ostream & roboptim::operator<< (std::ostream &o, const BadJacobian< T > &f)
 Override operator<< to handle exception display. More...
 
template<typename T >
bool roboptim::checkGradient (const GenericDifferentiableFunction< T > &function, typename GenericDifferentiableFunction< T >::size_type functionId, typename GenericDifferentiableFunction< T >::const_argument_ref x, typename GenericDifferentiableFunction< T >::value_type threshold=finiteDifferenceThreshold, typename GenericDifferentiableFunction< T >::value_type fd_eps=finiteDifferenceEpsilon)
 Check if a gradient is valid. More...
 
template<typename T >
void roboptim::checkGradientAndThrow (const GenericDifferentiableFunction< T > &function, typename GenericDifferentiableFunction< T >::size_type functionId, typename GenericDifferentiableFunction< T >::const_argument_ref x, typename GenericDifferentiableFunction< T >::value_type threshold=finiteDifferenceThreshold, typename GenericDifferentiableFunction< T >::value_type fd_eps=finiteDifferenceEpsilon) throw (BadGradient<T>)
 
template<typename T >
bool roboptim::checkJacobian (const GenericDifferentiableFunction< T > &function, typename GenericDifferentiableFunction< T >::const_argument_ref x, typename GenericDifferentiableFunction< T >::value_type threshold=finiteDifferenceThreshold, typename GenericDifferentiableFunction< T >::value_type fd_eps=finiteDifferenceEpsilon)
 Check if a Jacobian is valid. More...
 
template<typename T >
void roboptim::checkJacobianAndThrow (const GenericDifferentiableFunction< T > &function, typename GenericDifferentiableFunction< T >::const_argument_ref x, typename GenericDifferentiableFunction< T >::value_type threshold=finiteDifferenceThreshold, typename GenericDifferentiableFunction< T >::value_type fd_eps=finiteDifferenceEpsilon) throw (BadJacobian<T>)
 

Variables

static const double roboptim::finiteDifferenceThreshold = 1e-4
 Default threshold for checkGradient. More...
 
static const double roboptim::finiteDifferenceEpsilon = 1e-8
 Default epsilon for finite difference class. More...