Exception thrown when a gradient check fail. More...
#include <roboptim/core/finite-difference-gradient.hh>
Inheritance diagram for roboptim::BadGradient:Public Types | |
| typedef DerivableFunction::vector_t | vector_t |
| Import vector. More... | |
| typedef DerivableFunction::gradient_t | gradient_t |
| Import gradient. More... | |
| typedef DerivableFunction::value_type | value_type |
| Import value_type. More... | |
| typedef DerivableFunction::size_type | size_type |
| Import size_type. More... | |
Public Member Functions | |
| BadGradient (const vector_t &x, const gradient_t &analyticalGradient, const gradient_t &finiteDifferenceGradient, const value_type &threshold) | |
| Default constructor. More... | |
| virtual | ~BadGradient () throw () |
| virtual std::ostream & | print (std::ostream &o) const throw () |
| Display the exception on the specified output stream. More... | |
Public Attributes | |
| vector_t | x_ |
| Gradient has been computed for this point. More... | |
| gradient_t | analyticalGradient_ |
| Analytical gradient. More... | |
| gradient_t | finiteDifferenceGradient_ |
| Gradient computed through finite differences. More... | |
| value_type | maxDelta_ |
| Maximum error. More... | |
| value_type | maxDeltaComponent_ |
| Component containing the maximum error. More... | |
| value_type | threshold_ |
| Allowed threshold. More... | |
Exception thrown when a gradient check fail.
Import gradient.
Import size_type.
| typedef DerivableFunction::value_type roboptim::BadGradient::value_type |
Import value_type.
| typedef DerivableFunction::vector_t roboptim::BadGradient::vector_t |
Import vector.
| roboptim::BadGradient::BadGradient | ( | const vector_t & | x, |
| const gradient_t & | analyticalGradient, | ||
| const gradient_t & | finiteDifferenceGradient, | ||
| const value_type & | threshold | ||
| ) |
Default constructor.
References maxDelta_, and maxDeltaComponent_.
|
virtual |
|
virtual |
Display the exception on the specified output stream.
| o | output stream used for display |
References roboptim::decindent(), roboptim::iendl(), and roboptim::incindent().
Referenced by roboptim::operator<<().
| gradient_t roboptim::BadGradient::analyticalGradient_ |
Analytical gradient.
| gradient_t roboptim::BadGradient::finiteDifferenceGradient_ |
Gradient computed through finite differences.
| value_type roboptim::BadGradient::maxDelta_ |
Maximum error.
Referenced by BadGradient().
| value_type roboptim::BadGradient::maxDeltaComponent_ |
Component containing the maximum error.
Referenced by BadGradient().
| value_type roboptim::BadGradient::threshold_ |
Allowed threshold.
| vector_t roboptim::BadGradient::x_ |
Gradient has been computed for this point.