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;
215 double Derivative(
const double *x,
unsigned int icoord = 0)
const 217 return DoDerivative(x, icoord);
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;
264 return DoDerivative(x);
275 virtual void FdF(
double x,
double &
f,
double &df)
const = 0;
283 return DoDerivative(*x);
291 g[0] = DoDerivative(*x);
297 void FdF(
const double *x,
double &f,
double *df)
const 310 virtual double DoDerivative(
double x)
const = 0;
350 virtual void Gradient(
const double *
x,
double *grad)
const 352 unsigned int ndim =
NDim();
353 for (
unsigned int icoord = 0; icoord < ndim; ++icoord)
354 grad[icoord] = BaseGrad::Derivative(x, 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...
Namespace for new ROOT classes and functions.
void FdF(const double *x, double &f, double *df) const
Compatibility method with multi-dimensional interface for Gradient and function evaluation.
IBaseFunctionMultiDimTempl()
IBaseFunctionOneDim BaseFunc
double Derivative(const double *x) const
Compatibility method with multi-dimensional interface for partial derivative.
virtual IBaseFunctionMultiDimTempl< T > * Clone() const =0
Clone a function.
virtual void Gradient(const double *x, double *grad) const
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 Gradient(const double *x, double *g) const
Compatibility method with multi-dimensional interface for Gradient.
virtual ~IBaseFunctionMultiDimTempl()
virtual destructor
Documentation for the abstract class IBaseFunctionMultiDim.
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...
virtual ~IGradientFunctionMultiDim()
Virtual Destructor (no operations)
IBaseFunctionOneDim BaseFunc
double operator()(const double *x) const
Evaluate the function at a point x[].
double Derivative(const double *x, unsigned int icoord=0) const
Return the partial derivative with respect to the passed coordinate.
virtual ~IGradientOneDim()
virtual destructor
IBaseFunctionMultiDimTempl< T > BaseFunc
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 T DoEval(const T *x) const =0
Implementation of the evaluation function.
Namespace for new Math classes and functions.
virtual ~IGradientFunctionOneDim()
Virtual Destructor (no operations)
virtual ~IBaseFunctionOneDim()
virtual destructor
virtual ~IGradientMultiDim()
virual destructor
double Derivative(double x) const
Return the derivative of the function at a point x Use the private method DoDerivative.
virtual unsigned int NDim() const =0
Retrieve the dimension of the function.
double operator()(double x) const
Evaluate the function at a point x Use the a pure virtual private method DoEval which must be impleme...
T operator()(const T *x) const
Evaluate the function at a point x[].