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