18 #ifndef ROOT_Math_IFunction
19 #define ROOT_Math_IFunction
85 virtual unsigned int NDim()
const = 0;
101 template <
class Iterator>
178 virtual double DoEval(
double x)
const = 0;
210 virtual void Gradient(
const double *
x,
double *grad)
const = 0;
228 virtual void FdF(
const double *
x,
double &
f,
double *df)
const = 0;
237 virtual double DoDerivative(
const double *
x,
unsigned int icoord)
const = 0;
275 virtual void FdF(
double x,
double &
f,
double &df)
const = 0;
297 void FdF(
const double *
x,
double &
f,
double *df)
const
350 virtual void Gradient(
const double *
x,
double *grad)
const
352 unsigned int ndim =
NDim();
353 for (
unsigned int icoord = 0; icoord < ndim; ++icoord)
367 virtual void FdF(
const double *
x,
double &
f,
double *df)
const
416 virtual void FdF(
double x,
double &
f,
double &df)
const
IGradientMultiDim BaseGrad
Gradient interface (abstract class) defining the signature for calculating the gradient of a multi-di...
Interface (abstract class) for multi-dimensional functions providing a gradient calculation.
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
IBaseFunctionMultiDimTempl()
virtual void FdF(double x, double &f, double &df) const =0
Optimized method to evaluate at the same time the function value and derivative at a point x...
virtual void FdF(double x, double &f, double &df) const
Optimized method to evaluate at the same time the function value and derivative at a point x...
T operator()(const T *x) const
Evaluate the function at a point x[].
IBaseFunctionOneDim BaseFunc
virtual IBaseFunctionMultiDimTempl< T > * Clone() const =0
Clone a function.
double Derivative(const double *x) const
Compatibility method with multi-dimensional interface for partial derivative.
virtual void Gradient(const double *x, double *grad) const =0
Evaluate all the vector of function derivatives (gradient) at a point x.
Interface (abstract class) for one-dimensional functions providing a gradient calculation.
Specialized Gradient interface(abstract class) for one dimensional functions It provides a method to ...
IBaseFunctionMultiDim BaseFunc
void FdF(const double *x, double &f, double *df) const
Compatibility method with multi-dimensional interface for Gradient and function evaluation.
virtual void FdF(const double *x, double &f, double *df) const
Optimized method to evaluate at the same time the function value and derivative at a point x...
virtual ~IBaseFunctionMultiDimTempl()
virtual destructor
double Derivative(const double *x, unsigned int icoord=0) const
Return the partial derivative with respect to the passed coordinate.
double operator()(double x) const
Evaluate the function at a point x Use the a pure virtual private method DoEval which must be impleme...
Documentation for the abstract class IBaseFunctionMultiDim.
virtual double DoDerivative(double x) const =0
function to evaluate the derivative with respect each coordinate.
virtual ~IGradientFunctionMultiDim()
Virtual Destructor (no operations)
IBaseFunctionOneDim BaseFunc
double Derivative(double x) const
Return the derivative of the function at a point x Use the private method DoDerivative.
virtual ~IGradientOneDim()
virtual destructor
IBaseFunctionMultiDimTempl< T > BaseFunc
virtual double DoEval(double x) const =0
implementation of the evaluation function. Must be implemented by derived classes ...
virtual T DoEval(const T *x) const =0
Implementation of the evaluation function.
virtual ~IGradientFunctionOneDim()
Virtual Destructor (no operations)
virtual ~IBaseFunctionOneDim()
virtual destructor
virtual ~IGradientMultiDim()
virual destructor
virtual IBaseFunctionOneDim * Clone() const =0
Clone a function.
double operator()(const double *x) const
Evaluate the function at a point x[].
void Gradient(const double *x, double *g) const
Compatibility method with multi-dimensional interface for Gradient.
virtual void Gradient(const double *x, double *grad) const
Evaluate all the vector of function derivatives (gradient) at a point x.
virtual void FdF(const double *x, double &f, double *df) const =0
Optimized method to evaluate at the same time the function value and derivative at a point x...
virtual unsigned int NDim() const =0
Retrieve the dimension of the function.
virtual double DoDerivative(const double *x, unsigned int icoord) const =0
function to evaluate the derivative with respect each coordinate.