13#ifndef ROOT_Math_IParamFunction
14#define ROOT_Math_IParamFunction
77 virtual unsigned int NPar()
const = 0;
86 return "Par_" + Util::ToString(i);
166 using BaseFunc::operator();
256 unsigned int npar =
NPar();
257 for (
unsigned int ipar = 0; ipar < npar; ++ipar)
275 virtual bool ParameterG2(
const T * ,
const double * , T * )
const {
return false;}
303 virtual T
DoEvalPar(
const T *
x,
const double *
p)
const override = 0;
342 using BaseParamFunc::operator();
350 unsigned int npar =
NPar();
351 for (
unsigned int ipar = 0; ipar < npar; ++ipar)
winID h TVirtualViewer3D TVirtualGLPainter p
Documentation for the abstract class IBaseFunctionMultiDim.
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
Documentation for the abstract class IBaseParam.
virtual void SetParameters(const double *p)=0
Set the parameter values.
virtual const double * Parameters() const =0
Access the parameter values.
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...
virtual ~IBaseParam()
Virtual Destructor (no operations)
virtual unsigned int NPar() const =0
Return the number of Parameters.
Interface (abstract class) for multi-dimensional functions providing a gradient calculation.
Interface (abstract class) for one-dimensional functions providing a gradient calculation.
IParamFunction interface (abstract class) describing multi-dimensional parametric functions It is a d...
T operator()(const T *x, const double *p) const
Evaluate function at a point x and for given parameters p.
virtual T DoEval(const T *x) const
Implement the ROOT::Math::IBaseFunctionMultiDim interface DoEval(x) using the cached parameter values...
IBaseFunctionMultiDimTempl< T > BaseFunc
T operator()(const T *x) const
virtual T DoEvalPar(const T *x, const double *p) const =0
Implementation of the evaluation function using the x values and the parameters.
Specialized IParamFunction interface (abstract class) for one-dimensional parametric functions It is ...
IBaseFunctionOneDim BaseFunc
double DoEval(double x) const override
Implement the ROOT::Math::IBaseFunctionOneDim interface DoEval(x) using the cached parameter values.
virtual double DoEvalPar(double x, const double *p) const =0
Implementation of the evaluation function using the x value and the parameters.
double operator()(double x, const double *p) const
Evaluate function at a point x and for given parameters p.
double operator()(const double *x, const double *p) const
multidim-like interface
Interface (abstract class) for parametric gradient multi-dimensional functions providing in addition ...
virtual T DoEvalPar(const T *x, const double *p) const override=0
Implementation of the evaluation function using the x values and the parameters.
~IParametricGradFunctionMultiDimTempl() override
Virtual Destructor (no operations)
T operator()(const T *x, const double *p) const
virtual void ParameterGradient(const T *x, const double *p, T *grad) const
Evaluate the all the derivatives (gradient vector) of the function with respect to the parameters at ...
T ParameterDerivative(const T *x, const double *p, unsigned int ipar=0) const
Evaluate the partial derivative w.r.t a parameter ipar from values and parameters.
virtual T DoEval(const T *x) const override
Implement the ROOT::Math::IBaseFunctionMultiDim interface DoEval(x) using the cached parameter values...
T ParameterDerivative(const T *x, unsigned int ipar=0) const
Evaluate partial derivative using cached parameter values.
T operator()(const T *x) const
void ParameterGradient(const T *x, T *grad) const
Evaluate all derivatives using cached parameter values.
virtual bool HasParameterHessian() const
virtual T DoParameterDerivative(const T *x, const double *p, unsigned int ipar) const =0
Evaluate the partial derivative w.r.t a parameter ipar , to be implemented by the derived classes.
virtual bool ParameterG2(const T *, const double *, T *) const
Evaluate all the second derivatives (diagonal ones) of the function with respect to the parameters at...
virtual bool ParameterHessian(const T *, const double *, T *) const
Evaluate the all the Hessian (second derivatives matrix) of the function with respect to the paramete...
typename IParametricFunctionMultiDimTempl< T >::BaseFunc BaseFunc
Interface (abstract class) for parametric one-dimensional gradient functions providing in addition to...
IParametricFunctionOneDim BaseParamFunc
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.
IParametricFunctionOneDim::BaseFunc BaseFunc
IGradientFunctionOneDim BaseGradFunc
void ParameterGradient(const double *x, const double *p, double *grad) const
Compatibility interface with multi-dimensional functions.
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.
double ParameterDerivative(const double *x, unsigned int ipar=0) const
Evaluate partial derivative using cached parameter values (multi-dim like interface)
void ParameterGradient(double x, double *grad) const
Evaluate all derivatives using cached parameter values.
double ParameterDerivative(double x, unsigned int ipar=0) const
Evaluate partial derivative using cached parameter values.
virtual double DoParameterDerivative(double x, const double *p, unsigned int ipar) const =0
Evaluate the gradient, to be implemented by the derived classes.
void ParameterGradient(const double *x, double *grad) const
Evaluate all derivatives using cached parameter values (multi-dim like interface)
double ParameterDerivative(double x, const double *p, unsigned int ipar=0) const
Partial derivative with respect a parameter.
~IParametricGradFunctionOneDim() override
Virtual Destructor (no operations)
Namespace for new Math classes and functions.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.