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 {
213 return DoDerivative(x, icoord);
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;
259 return DoDerivative(x );
270 virtual void FdF (
double x,
double &
f,
double & df)
const = 0;
277 return DoDerivative( *x);
284 g[0] = DoDerivative( *x);
290 void FdF(
const double * x,
double & f,
double * df)
const {
302 virtual double DoDerivative(
double x )
const = 0;
342 virtual void Gradient(
const double *
x,
double * grad)
const {
343 unsigned int ndim =
NDim();
344 for (
unsigned int icoord = 0; icoord < ndim; ++icoord)
345 grad[icoord] = BaseGrad::Derivative(x,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
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
void FdF(const double *x, double &f, double *df) const
Compatibility method with multi-dimensional interface for Gradient and function evaluation.
double operator()(const double *x) const
Evaluate the function at a point x[].
IBaseFunctionOneDim BaseFunc
double Derivative(const double *x) const
Compatibility method with multi-dimensional interface for partial derivative.
virtual void Gradient(const double *x, double *grad) const
Evaluate all the vector of function derivatives (gradient) at a point x.
IBaseFunctionMultiDim BaseFunc
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 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
virtual unsigned int NDim() const =0
Retrieve the dimension of the function.
double Derivative(const double *x, unsigned int icoord=0) const
Return the partial derivative with respect to the passed coordinate.
virtual ~IGradientOneDim()
virtual destructor
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...
Namespace for new Math classes and functions.
virtual ~IGradientFunctionOneDim()
Virtual Destructor (no operations)
virtual ~IBaseFunctionOneDim()
virtual destructor
virtual ~IGradientMultiDim()
virual destructor
Documentation for the abstract class IBaseFunctionMultiDim.
double Derivative(double x) const
Return the derivative of the function at a point x Use the private method DoDerivative.
virtual double DoEval(const double *x) const =0
Implementation of the evaluation function.
virtual IBaseFunctionMultiDim * Clone() const =0
Clone a function.