13 #ifndef ROOT_Math_IParamFunction 14 #define ROOT_Math_IParamFunction 77 virtual unsigned int NPar()
const = 0;
120 return DoEvalPar(x, p);
123 using BaseFunc::operator();
130 virtual T DoEvalPar(
const T *
x,
const double *p)
const = 0;
161 using BaseFunc::operator();
172 return DoEvalPar(x, p);
181 return DoEvalPar(*x, p);
190 virtual double DoEvalPar(
double x,
const double *p)
const = 0;
234 using BaseParamFunc::operator();
242 unsigned int npar =
NPar();
243 for (
unsigned int ipar = 0; ipar < npar; ++ipar)
244 grad[ipar] = DoParameterDerivative(x, p, ipar);
252 return DoParameterDerivative(x, p, ipar);
260 return ParameterGradient(x,
Parameters(), grad);
267 return DoParameterDerivative(x,
Parameters() , ipar);
275 virtual double DoParameterDerivative(
const double *
x,
const double *p,
unsigned int ipar)
const = 0;
311 using BaseParamFunc::operator();
319 unsigned int npar =
NPar();
320 for (
unsigned int ipar = 0; ipar < npar; ++ipar)
321 grad[ipar] = DoParameterDerivative(x, p, ipar);
329 return ParameterGradient(x,
Parameters(), grad);
337 ParameterGradient(*x, p, grad);
345 return ParameterGradient(*x,
Parameters(), grad);
354 return DoParameterDerivative(x, p, ipar);
362 return DoParameterDerivative(x,
Parameters() , ipar);
371 return DoParameterDerivative(*x, p, ipar);
380 return DoParameterDerivative(*x,
Parameters() , ipar);
391 virtual double DoParameterDerivative(
double x,
const double *p,
unsigned int ipar)
const = 0;
virtual const double * Parameters() const =0
Access the parameter values.
Interface (abstract class) for multi-dimensional functions providing a gradient calculation.
double ParameterDerivative(double x, unsigned int ipar=0) const
Evaluate partial derivative using cached parameter values.
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
Namespace for new ROOT classes and functions.
virtual void ParameterGradient(const double *x, const double *p, double *grad) const
Evaluate the all the derivatives (gradient vector) of the function with respect to the parameters at ...
double operator()(const double *x, const double *p) const
multidim-like interface
double ParameterDerivative(double x, const double *p, unsigned int ipar=0) const
Partial derivative with respect a parameter.
T operator()(const T *x, const double *p) const
Evaluate function at a point x and for given parameters p.
virtual ~IParametricGradFunctionOneDim()
Virtual Destructor (no operations)
IBaseFunctionOneDim BaseFunc
virtual ~IParametricGradFunctionMultiDimTempl()
Virtual Destructor (no operations)
IParametricFunctionOneDim BaseParamFunc
Interface (abstract class) for parametric gradient multi-dimensional functions providing in addition ...
double ParameterDerivative(const double *x, const double *p, unsigned int ipar=0) const
Evaluate the partial derivative w.r.t a parameter ipar from values and parameters.
IGradientFunctionOneDim BaseGradFunc
Interface (abstract class) for one-dimensional functions providing a gradient calculation.
virtual T DoEval(const T *x) const
Implement the ROOT::Math::IBaseFunctionMultiDim interface DoEval(x) using the cached parameter values...
void ParameterGradient(double x, double *grad) const
Evaluate all derivatives using cached parameter values.
virtual double DoEval(double x) const
Implement the ROOT::Math::IBaseFunctionOneDim interface DoEval(x) using the cached parameter values...
virtual ~IBaseParam()
Virtual Destructor (no operations)
Documentation for the abstract class IBaseFunctionMultiDim.
virtual unsigned int NPar() const =0
Return the number of Parameters.
virtual void ParameterGradient(double x, const double *p, double *grad) const
Evaluate the derivatives of the function with respect to the parameters at a point x...
void ParameterGradient(const double *x, double *grad) const
Evaluate all derivatives using cached parameter values (multi-dim like interface) ...
void ParameterGradient(const double *x, const double *p, double *grad) const
Compatibility interface with multi-dimensional functions.
IParametricFunctionOneDim::BaseFunc BaseFunc
Interface (abstract class) for parametric one-dimensional gradient functions providing in addition to...
IParamFunction interface (abstract class) describing multi-dimensional parameteric functions It is a ...
virtual void SetParameters(const double *p)=0
Set the parameter values.
double ParameterDerivative(const double *x, const double *p, unsigned int ipar=0) const
Partial derivative with respect a parameter Compatibility interface with multi-dimensional functions...
Specialized IParamFunction interface (abstract class) for one-dimensional parametric functions It is ...
double ParameterDerivative(const double *x, unsigned int ipar=0) const
Evaluate partial derivative using cached parameter values (multi-dim like interface) ...
double operator()(double x, const double *p) const
Evaluate function at a point x and for given parameters p.
Namespace for new Math classes and functions.
IBaseFunctionMultiDimTempl< T > BaseFunc
std::string ToString(const T &val)
Utility function for conversion to strings.
Documentation for the abstract class IBaseParam.
virtual std::string ParameterName(unsigned int i) const
Return the name of the i-th parameter (starting from zero) Overwrite if want to avoid the default nam...
void ParameterGradient(const double *x, double *grad) const
Evaluate all derivatives using cached parameter values.
double ParameterDerivative(const double *x, unsigned int ipar=0) const
Evaluate partial derivative using cached parameter values.