27#ifndef ROOT_Math_MultiNumGradFunction
28#define ROOT_Math_MultiNumGradFunction
69 template<
class FuncType>
89 unsigned int NDim()
const override {
return fDim; }
118 double DoEval(
const double *
x)
const override {
124 double DoDerivative (
const double *
x,
unsigned int icoord )
const override;
~MultiNumGradFunction() override
Destructor (no operations).
const IMultiGenFunction * fFunc
MultiNumGradFunction(const IMultiGenFunction &f)
Constructor from a IMultiGenFunction interface.
unsigned int NCalls() const
static void SetDerivPrecision(double eps)
precision value used for calculating the derivative step-size h = eps * |x|.
unsigned int NDim() const override
Retrieve the dimension of the function.
static double GetDerivPrecision()
get precision value used for calculating the derivative step-size
IMultiGenFunction * Clone() const override
Clone a function.
MultiNumGradFunction(FuncType f, int n)
Constructor from a generic function (pointer or reference) and number of dimension implementing opera...
double DoDerivative(const double *x, unsigned int icoord) const override
Function to evaluate the derivative with respect each coordinate. To be implemented by the derived cl...
double DoEval(const double *x) const override
Implementation of the evaluation function. Must be implemented by derived classes.
void SetOwnership(bool on=true)
Template class to wrap any C++ callable object implementing operator() (const double * x) in a multi-...
IGradientFunctionMultiDim IMultiGradFunction
IMultiGenFunctionTempl< double > IMultiGenFunction