Exception thrown when a gradient check fail. More...
#include <roboptim/core/finite-difference-gradient.hh>
Inherits std::runtime_error.
Public Types | |
| typedef DerivableFunction::vector_t | vector_t |
| Import vector. | |
| typedef DerivableFunction::gradient_t | gradient_t |
| Import gradient. | |
| typedef DerivableFunction::value_type | value_type |
| Import value_type. | |
| typedef DerivableFunction::size_type | size_type |
| Import size_type. | |
Public Member Functions | |
| BadGradient (const vector_t &x, const gradient_t &analyticalGradient, const gradient_t &finiteDifferenceGradient, const value_type &threshold) | |
| Default constructor. | |
| virtual | ~BadGradient () throw () |
| virtual std::ostream & | print (std::ostream &o) const throw () |
| Display the exception on the specified output stream. | |
Public Attributes | |
| vector_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. | |
| value_type | maxDeltaComponent_ |
| Component containing the maximum error. | |
| value_type | threshold_ |
| Allowed threshold. | |
Exception thrown when a gradient check fail.
Import gradient.
Import size_type.
Import value_type.
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_.
| roboptim::BadGradient::~BadGradient | ( | ) | throw () [virtual] |
| std::ostream & roboptim::BadGradient::print | ( | std::ostream & | o | ) | const throw () [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<<().
Analytical gradient.
Gradient computed through finite differences.
Maximum error.
Referenced by BadGradient().
Component containing the maximum error.
Referenced by BadGradient().
Allowed threshold.
Gradient has been computed for this point.