50 while (
fLinear && ip < fFunc->GetNpar() ) {
73 if (
this == &rhs)
return *
this;
91 unsigned int np =
NPar();
92 for (
unsigned int i = 0; i < np; ++i)
117 return std::pow(x, static_cast<int>(ipar) );
125 return (const_cast<TFormula*> ( df) )->Eval( x ) ;
157 while (
fLinear && ip < fFunc->GetNpar() ) {
187 if (
this == &rhs)
return *
this;
210 unsigned int np =
NPar();
211 for (
unsigned int i = 0; i < np; ++i)
226 if (ipar == 0)
return 1.0;
227 return std::pow(x[0], static_cast<int>(ipar) );
233 return (const_cast<TFormula*> ( df) )->EvalPar( x ) ;
243 const TF1 * funcToCopy = (
f) ? f :
fFunc;
244 TF1 * fnew = (
TF1*) funcToCopy->IsA()->New();
245 funcToCopy->
Copy(*fnew);
virtual void SetParameters(const Double_t *params)
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
virtual void Copy(TObject &f1) const
Copy this F1 to a new F1.
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
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
WrappedMultiTF1 & operator=(const WrappedMultiTF1 &rhs)
Assignment operator.
Class to Wrap a ROOT Function class (like TF1) in a IParamMultiFunction interface of multi-dimensions...
WrappedMultiTF1(TF1 &f, unsigned int dim=0)
constructor from a function pointer to a TF1 If dim = 0 dimension is taken from TF1::GetNdim().
void ParameterGradient(const double *x, const double *par, double *grad) const
evaluate the derivative of the function with respect to the parameters
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 Double_t Derivative(Double_t x, Double_t *params=0, Double_t epsilon=0.001) const
Returns the first derivative of the function at point x, computed by Richardson's extrapolation metho...
Specialized Gradient interface(abstract class) for one dimensional functions It provides a method to ...
void SetAndCopyFunction(const TF1 *f=0)
method to set a new function pointer and copy it inside.
static double GetDerivPrecision()
get precision value used for calculating the derivative step-size
double pow(double, double)
virtual Int_t GetNdim() const
unsigned int NPar() const
return number of parameters
virtual Double_t GradientPar(Int_t ipar, const Double_t *x, Double_t eps=0.01)
Compute the gradient (derivative) wrt a parameter ipar.
void ParameterGradient(double x, const double *par, double *grad) const
evaluate the derivative of the function with respect to the parameters
virtual const TObject * GetLinearPart(Int_t i) const
virtual Bool_t IsLinear() const
static void SetDerivPrecision(double eps)
precision value used for calculating the derivative step-size h = eps * |x|.
Interface (abstract class) for parametric one-dimensional gradient functions providing in addition to...
unsigned int NPar() const
return number of parameters
WrappedTF1(TF1 &f)
constructor from a TF1 function pointer.
Interface (abstract class) for parametric gradient multi-dimensional functions providing in addition ...
double DoParameterDerivative(const double *x, const double *p, unsigned int ipar) const
evaluate the partial derivative with respect to the parameter
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.
Documentation for the abstract class IBaseFunctionMultiDim.
virtual Int_t GetNumber() const
static double fgEps
cached vector for x value (needed for TF1::EvalPar signature)