27 #ifndef ROOT_Math_GSLNLSMinimizer 28 #define ROOT_Math_GSLNLSMinimizer 110 void FdF (
const double *
x,
double & f,
double *
g)
const {
111 unsigned int n =
NDim();
112 std::copy(
x,
x+
n,
fX2.begin());
113 const double kEps = 1.0E-4;
115 for (
unsigned int i = 0; i <
n; ++i) {
132 const double kEps = 1.0E-4;
139 mutable std::vector<double>
fX2;
178 if (
this == &rhs)
return *
this;
224 virtual double CovMatrix(
unsigned int ,
unsigned int )
const;
LSResidualFunc & operator=(const LSResidualFunc &rhs)
~GSLNLSMinimizer()
Destructor (no operations)
virtual const double * Errors() const
return errors at the minimum
Interface (abstract class) for multi-dimensional functions providing a gradient calculation.
std::vector< double > fErrors
Namespace for new ROOT classes and functions.
const ROOT::Math::FitMethodFunction * fChi2Func
virtual double CovMatrix(unsigned int, unsigned int) const
return covariance matrices elements if the variable is fixed the matrix is zero The ordering of the v...
GSLMultiFit, internal class for implementing GSL non linear least square GSL fitting.
double DoEval(const double *x) const
virtual int CovMatrixStatus() const
return covariance matrix status
GSLNLSMinimizer(const GSLNLSMinimizer &)
Copy constructor.
Base Minimizer class, which defines the basic funcionality of various minimizer implementations (apar...
ROOT::Math::GSLMultiFit * fGSLMultiFit
std::vector< double > fCovMatrix
std::vector< double > fX2
virtual void SetFunction(const ROOT::Math::IMultiGenFunction &func)
set the function to minimize
IMultiGenFunction * Clone() const
Clone a function.
virtual unsigned int NCalls() const
number of function calls to reach the minimum
virtual double Edm() const
return expected distance reached from the minimum
Documentation for the abstract class IBaseFunctionMultiDim.
GSLNLSMinimizer(int type=0)
Default constructor.
double DoDerivative(const double *x, unsigned int icoord) const
void Gradient(const double *x, double *g) const
void FdF(const double *x, double &f, double *g) const
virtual bool Minimize()
method to perform the minimization
virtual unsigned int NDim() const
Number of dimension (parameters) .
LSResidualFunc class description.
FitMethodFunction class Interface for objective functions (like chi2 and likelihood used in the fit) ...
GSLNLSMinimizer class for Non Linear Least Square fitting It Uses the Levemberg-Marquardt algorithm f...
virtual bool ProvidesError() const
number of free variables (real dimension of the problem) this is <= Function().NDim() which is the to...
const ROOT::Math::FitMethodFunction * fChi2
GSLNLSMinimizer & operator=(const GSLNLSMinimizer &rhs)
Assignment operator.
std::vector< LSResidualFunc > fResiduals
LSResidualFunc(const ROOT::Math::FitMethodFunction &func, unsigned int i)
Namespace for new Math classes and functions.
virtual unsigned int NCalls() const
return the total number of function calls (overrided if needed)
LSResidualFunc(const LSResidualFunc &rhs)
virtual const double * MinGradient() const
return pointer to gradient values at the minimum
unsigned int NDim() const
Retrieve the dimension of the function.
virtual double DataElement(const double *x, unsigned int i, double *g=0) const =0
method returning the data i-th contribution to the fit objective function For example the residual fo...
static constexpr double g