MADNESS
0.10.1
|
The interface to be provided by functions to be optimized. More...
Public Member Functions | |
virtual Tensor< double > | gradient (const Tensor< double > &x) |
Should return the derivative of the function. More... | |
virtual bool | provides_gradient () const =0 |
Should return true if the gradient is implemented. More... | |
double | test_gradient (Tensor< double > &x, double value_precision, bool doprint=true) |
Numerical test of the derivative ... optionally prints to stdout, returns max abs error. More... | |
virtual double | value (const Tensor< double > &x)=0 |
Should return the value of the objective function. More... | |
virtual void | value_and_gradient (const Tensor< double > &x, double &value, Tensor< double > &gradient) |
Reimplement if more efficient to evaluate both value and gradient in one call. More... | |
The interface to be provided by functions to be optimized.
|
inlinevirtual |
Should return the derivative of the function.
|
pure virtual |
Should return true if the gradient is implemented.
|
inline |
Numerical test of the derivative ... optionally prints to stdout, returns max abs error.
References madness::abs(), madness::BaseTensor::dim(), max, and pow().
|
pure virtual |
Should return the value of the objective function.
|
inlinevirtual |
Reimplement if more efficient to evaluate both value and gradient in one call.