50 while (
fLinear && ip < fFunc->GetNpar() ) {
62 fPolynomial(rhs.fPolynomial),
73 if (
this == &rhs)
return *
this;
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() ) {
173 fLinear(rhs.fLinear),
174 fPolynomial(rhs.fPolynomial),
175 fOwnFunc(rhs.fOwnFunc),
187 if (
this == &rhs)
return *
this;
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);
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...
static double GetDerivPrecision()
get precision value used for calculating the derivative step-size
double DoParameterDerivative(const double *x, const double *p, unsigned int ipar) const
evaluate the partial derivative with respect to the parameter
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().
virtual const TObject * GetLinearPart(Int_t i) 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|.
ClassImp(TIterator) Bool_t TIterator return false
Compare two iterator objects.
TMethodCall * GetMethodCall() const
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.
double DoDerivative(double x) const
return the function derivatives w.r.t. x
static double GetDerivPrecision()
get precision value used for calculating the derivative step-size
virtual void Copy(TObject &f1) const
Copy this F1 to a new F1.
double pow(double, double)
virtual Bool_t IsLinear() const
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(const double *x, const double *par, double *grad) const
evaluate the derivative of the function with respect to the parameters
virtual Int_t GetNdim() const
unsigned int NPar() const
return number of parameters
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...
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...
WrappedTF1(TF1 &f)
constructor from a TF1 function pointer.
Interface (abstract class) for parametric gradient multi-dimensional functions providing in addition ...
WrappedTF1 & operator=(const WrappedTF1 &rhs)
Assignment operator.
virtual Int_t GetNumber() const
virtual void InitArgs(const Double_t *x, const Double_t *params)
Initialize parameters addresses.
unsigned int NPar() const
return number of parameters
double DoParameterDerivative(double x, const double *p, unsigned int ipar) const
evaluate the derivative of the function with respect to the parameters
Documentation for the abstract class IBaseFunctionMultiDim.
static double fgEps
cached vector for x value (needed for TF1::EvalPar signature)