13 #ifndef ROOT_Math_WrappedTF1
14 #define ROOT_Math_WrappedTF1
17 #ifndef ROOT_Math_IParamFunction
96 unsigned int NPar()
const {
107 using BaseGradFunc::operator();
113 void FdF(
double x,
double &
f,
double & deriv)
const {
154 mutable double fX[1];
void ParameterGradient(double x, const double *par, double *grad) const
evaluate the derivative of the function with respect to the parameters
virtual void SetParameters(const Double_t *params)
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
Namespace for new ROOT classes and functions.
static double GetDerivPrecision()
get precision value used for calculating the derivative step-size
ROOT::Math::IGenFunction * Clone() const
Clone the wrapper but not the original function.
double DoEvalPar(double x, const double *p) const
evaluate function passing coordinates x and vector of parameters
virtual const char * GetParName(Int_t ipar) const
Class to Wrap a ROOT Function class (like TF1) in a IParamFunction interface of one dimensions to be ...
static void SetDerivPrecision(double eps)
precision value used for calculating the derivative step-size h = eps * |x|.
virtual ~WrappedTF1()
Destructor (no operations).
TMethodCall * GetMethodCall() const
Specialized Gradient interface(abstract class) for one dimensional functions It provides a method to ...
void SetParameters(const double *p)
set parameter values
ROOT::Math::IGradientOneDim IGrad
double DoEval(double x) const
evaluate function using the cached parameter values (of TF1) re-implement for better efficiency ...
double DoDerivative(double x) const
return the function derivatives w.r.t. x
unsigned int NPar() const
return number of parameters
Interface (abstract class) for parametric one-dimensional gradient functions providing in addition to...
std::string ParameterName(unsigned int i) const
return parameter name (this is stored in TF1)
WrappedTF1(TF1 &f)
constructor from a TF1 function pointer.
WrappedTF1 & operator=(const WrappedTF1 &rhs)
Assignment operator.
Namespace for new Math classes and functions.
virtual void InitArgs(const Double_t *x, const Double_t *params)
Initialize parameters addresses.
virtual Double_t * GetParameters() const
void FdF(double x, double &f, double &deriv) const
calculate function and derivative at same time (required by IGradient interface)
ROOT::Math::IParamGradFunction BaseGradFunc
ROOT::Math::IParamGradFunction::BaseFunc BaseFunc
const double * Parameters() const
get the parameter values (return values cachen inside, those inside TF1 might be different) ...
double DoParameterDerivative(double x, const double *p, unsigned int ipar) const
evaluate the derivative of the function with respect to the parameters
virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0)
Evaluate function with given coordinates and parameters.
virtual Int_t GetNpar() const
static double fgEps
cached vector for x value (needed for TF1::EvalPar signature)