27 static double gEPs = 0.001;
36 funcToCopy->
Copy(*fnew);
52 if (
fFunc->GetMethodCall())
fFunc->InitArgs(
fX,
nullptr);
54 if (
fFunc->GetNumber() >= 300 &&
fFunc->GetNumber() < 310) {
62 while (fLinear && ip < fFunc->GetNpar()) {
63 fLinear &= (fFunc->GetLinearPart(ip) != nullptr) ;
86 if (
this == &rhs)
return *
this;
100 fFunc->SetParameters(par);
104 unsigned int np =
NPar();
105 for (
unsigned int i = 0; i < np; ++i)
127 fFunc->SetParameters(p);
131 return std::pow(
x,
static_cast<int>(ipar));
135 assert(df !=
nullptr);
138 return (
const_cast<TFormula *
>(df))->Eval(
x) ;
149 return ::ROOT::Math::Internal::DerivPrecision(-1);
double DoDerivative(double x) const override
return the function derivatives w.r.t. x
WrappedTF1 & operator=(const WrappedTF1 &rhs)
Assignment operator.
double fX[1]
! cached vector for x value (needed for TF1::EvalPar signature)
WrappedTF1(TF1 &f)
constructor from a TF1 function pointer.
double DoParameterDerivative(double x, const double *p, unsigned int ipar) const override
evaluate the derivative of the function with respect to the parameters
unsigned int NPar() const override
return number of parameters
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
ROOT::Math::IGradientFunctionOneDim IGrad
void ParameterGradient(double x, const double *par, double *grad) const override
evaluate the derivative of the function with respect to the parameters
ROOT::Math::IParamGradFunction::BaseFunc BaseFunc
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
void Copy(TObject &f1) const override
Copy this to obj.
TClass * IsA() const override
if(pos!=-1) leafTypeName.Remove(pos)
double DerivPrecision(double eps)
TF1 * CopyTF1Ptr(const TF1 *funcToCopy)