18#ifndef ROOT_Math_IFunction
19#define ROOT_Math_IFunction
86 virtual unsigned int NDim()
const = 0;
102 template <
class Iterator>
226 virtual void FdF(
const T *
x,
T &
f,
T *df)
const = 0;
271 virtual void FdF(
double x,
double &
f,
double &df)
const = 0;
293 void FdF(
const double *
x,
double &
f,
double *df)
const
344 unsigned int ndim =
NDim();
345 for (
unsigned int icoord = 0; icoord < ndim; ++icoord)
405 virtual void FdF(
double x,
double &
f,
double &df)
const
Documentation for the abstract class IBaseFunctionMultiDim.
virtual IBaseFunctionMultiDimTempl< T > * Clone() const =0
Clone a function.
T operator()(const T *x) const
Evaluate the function at a point x[].
IBaseFunctionMultiDimTempl< T > BaseFunc
virtual unsigned int NDim() const =0
Retrieve the dimension of the function.
IBaseFunctionMultiDimTempl()
virtual T DoEval(const T *x) const =0
Implementation of the evaluation function.
virtual ~IBaseFunctionMultiDimTempl()
virtual destructor
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
virtual ~IBaseFunctionOneDim()
virtual destructor
IBaseFunctionOneDim BaseFunc
virtual double DoEval(double x) const =0
implementation of the evaluation function. Must be implemented by derived classes
double operator()(const double *x) const
Evaluate the function at a point x[].
virtual IBaseFunctionOneDim * Clone() const =0
Clone a 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...
Interface (abstract class) for multi-dimensional functions providing a gradient calculation.
virtual ~IGradientFunctionMultiDimTempl()
Virtual Destructor (no operations)
IGradientMultiDimTempl< T > BaseGrad
virtual void Gradient(const T *x, T *grad) const
Evaluate all the vector of function derivatives (gradient) at a point x.
virtual unsigned int NDim() const=0
Retrieve the dimension of the function.
virtual void FdF(const T *x, T &f, T *df) const
Optimized method to evaluate at the same time the function value and derivative at a point x.
IBaseFunctionMultiDimTempl< T > BaseFunc
Interface (abstract class) for one-dimensional functions providing a gradient calculation.
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
virtual ~IGradientFunctionOneDim()
Virtual Destructor (no operations)
Gradient interface (abstract class) defining the signature for calculating the gradient of a multi-di...
virtual T DoDerivative(const T *x, unsigned int icoord) const =0
function to evaluate the derivative with respect each coordinate.
T Derivative(const T *x, unsigned int icoord=0) const
Return the partial derivative with respect to the passed coordinate.
virtual void Gradient(const T *x, T *grad) const =0
Evaluate all the vector of function derivatives (gradient) at a point x.
virtual ~IGradientMultiDimTempl()
virual destructor
virtual void FdF(const T *x, T &f, T *df) const =0
Optimized method to evaluate at the same time the function value and derivative at a point x.
Specialized Gradient interface(abstract class) for one dimensional functions It provides a method to ...
double Derivative(double x) const
Return the derivative of the function at a point x Use the private method DoDerivative.
virtual double DoDerivative(double x) const =0
function to evaluate the derivative with respect each coordinate.
void FdF(const double *x, double &f, double *df) const
Compatibility method with multi-dimensional interface for Gradient and function evaluation.
double Derivative(const double *x) const
Compatibility method with multi-dimensional interface for partial derivative.
virtual ~IGradientOneDim()
virtual destructor
void Gradient(const double *x, double *g) const
Compatibility method with multi-dimensional interface for Gradient.
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.
Namespace for new Math classes and functions.
Namespace for new ROOT classes and functions.