Exception thrown when a gradient check fails. More...
#include <roboptim/core/decorator/finite-difference-gradient.hh>
Inherits std::runtime_error.
Public Member Functions | |
ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ (GenericDifferentiableFunction< T >) | |
BadGradient (const_argument_ref x, const_gradient_ref analyticalGradient, const_gradient_ref finiteDifferenceGradient, const value_type &threshold) | |
Default constructor. | |
virtual | ~BadGradient () throw () |
virtual std::ostream & | print (std::ostream &o) const |
Display the exception on the specified output stream. | |
template<> | |
BadGradient (const_argument_ref x, const_gradient_ref analyticalGradient, const_gradient_ref finiteDifferenceGradient, const value_type &threshold) | |
Public Attributes | |
argument_t | x_ |
Gradient has been computed for this point. | |
gradient_t | analyticalGradient_ |
Analytical gradient. | |
gradient_t | finiteDifferenceGradient_ |
Gradient computed through finite differences. | |
value_type | maxDelta_ |
Maximum error. | |
size_type | maxDeltaComponent_ |
Component containing the maximum error. | |
value_type | threshold_ |
Allowed threshold. |
Exception thrown when a gradient check fails.
roboptim::BadGradient< T >::BadGradient | ( | const_argument_ref | x, |
const_gradient_ref | analyticalGradient, | ||
const_gradient_ref | finiteDifferenceGradient, | ||
const value_type & | threshold | ||
) |
Default constructor.
References roboptim::BadGradient< T >::maxDelta_, and roboptim::BadGradient< T >::maxDeltaComponent_.
roboptim::BadGradient< T >::~BadGradient | ( | ) | throw () [virtual] |
roboptim::BadGradient< EigenMatrixSparse >::BadGradient | ( | const_argument_ref | x, |
const_gradient_ref | analyticalGradient, | ||
const_gradient_ref | finiteDifferenceGradient, | ||
const value_type & | threshold | ||
) | [inline] |
std::ostream & roboptim::BadGradient< T >::print | ( | std::ostream & | o | ) | const [virtual] |
Display the exception on the specified output stream.
o | output stream used for display |
References roboptim::decindent(), roboptim::iendl(), roboptim::incindent(), and x_.
roboptim::BadGradient< T >::ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ | ( | GenericDifferentiableFunction< T > | ) |
gradient_t roboptim::BadGradient< T >::analyticalGradient_ |
Analytical gradient.
gradient_t roboptim::BadGradient< T >::finiteDifferenceGradient_ |
Gradient computed through finite differences.
value_type roboptim::BadGradient< T >::maxDelta_ |
Maximum error.
Referenced by roboptim::BadGradient< T >::BadGradient().
size_type roboptim::BadGradient< T >::maxDeltaComponent_ |
Component containing the maximum error.
Referenced by roboptim::BadGradient< T >::BadGradient().
value_type roboptim::BadGradient< T >::threshold_ |
Allowed threshold.
argument_t roboptim::BadGradient< T >::x_ |
Gradient has been computed for this point.