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