18 #ifndef ROOT_Math_IFunction
19 #define ROOT_Math_IFunction
35 #ifndef ROOT_Math_IFunctionfwd
86 virtual unsigned int NDim()
const = 0;
101 template <
class Iterator>
102 double operator() (
const Iterator it )
const {
114 virtual double DoEval(
const double *
x)
const = 0;
175 virtual double DoEval(
double x)
const = 0;
207 virtual void Gradient(
const double *
x,
double * grad)
const = 0;
212 double Derivative(
const double *
x,
unsigned int icoord = 0)
const {
224 virtual void FdF (
const double *
x,
double &
f,
double * df)
const = 0;
233 virtual double DoDerivative(
const double *
x,
unsigned int icoord )
const = 0;
270 virtual void FdF (
double x,
double &
f,
double & df)
const = 0;
290 void FdF(
const double *
x,
double &
f,
double * df)
const {
342 virtual void Gradient(
const double *
x,
double * grad)
const {
343 unsigned int ndim =
NDim();
344 for (
unsigned int icoord = 0; icoord < ndim; ++icoord)
358 virtual void FdF (
const double *
x,
double &
f,
double * df)
const {
406 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...
virtual ~IBaseFunctionMultiDim()
virtual destructor
Namespace for new ROOT classes and functions.
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...
IBaseFunctionOneDim BaseFunc
double Derivative(const double *x) const
Compatibility method with multi-dimensional interface for partial derivative.
IBaseFunctionMultiDim BaseFunc
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...
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...
virtual double DoDerivative(double x) const =0
function to evaluate the derivative with respect each coordinate.
virtual ~IGradientFunctionMultiDim()
Virtual Destructor (no operations)
IBaseFunctionOneDim BaseFunc
virtual unsigned int NDim() const =0
Retrieve the dimension of the function.
double Derivative(double x) const
Return the derivative of the function at a point x Use the private method DoDerivative.
virtual ~IGradientOneDim()
virtual destructor
virtual double DoEval(double x) const =0
implementation of the evaluation function. Must be implemented by derived classes ...
Namespace for new Math classes and functions.
virtual ~IGradientFunctionOneDim()
Virtual Destructor (no operations)
virtual ~IBaseFunctionOneDim()
virtual destructor
double operator()(const double *x) const
Evaluate the function at a point x[].
virtual ~IGradientMultiDim()
virual destructor
virtual IBaseFunctionOneDim * Clone() const =0
Clone a function.
void Gradient(const double *x, double *g) const
Compatibility method with multi-dimensional interface for Gradient.
Documentation for the abstract class IBaseFunctionMultiDim.
virtual void Gradient(const double *x, double *grad) const
Evaluate all the vector of function derivatives (gradient) at a point x.
virtual double DoEval(const double *x) const =0
Implementation of the evaluation function.
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 IBaseFunctionMultiDim * Clone() const =0
Clone a function.
virtual double DoDerivative(const double *x, unsigned int icoord) const =0
function to evaluate the derivative with respect each coordinate.