14 #ifndef ROOT_Math_BasicMinimizer
15 #define ROOT_Math_BasicMinimizer
17 #ifndef ROOT_Math_Minimizer
22 #ifndef ROOT_Math_IFunctionfwd
26 #ifndef ROOT_Math_IParamFunctionfwd
30 #ifndef ROOT_Math_MinimTransformVariable
45 class MinimTransformFunction;
89 if (
this == &rhs)
return *
this;
102 virtual bool SetVariable(
unsigned int ivar,
const std::string &
name,
double val,
double step);
110 virtual bool SetLimitedVariable(
unsigned int ivar ,
const std::string &
name ,
double val ,
double step ,
double ,
double );
112 virtual bool SetFixedVariable(
unsigned int ,
const std::string & ,
double );
135 virtual std::string
VariableName(
unsigned int ivar)
const;
147 virtual const double *
X()
const {
return &
fValues.front(); }
153 virtual unsigned int NFree()
const;
197 std::map< unsigned int, std::pair<double, double> >
fBounds;
Interface (abstract class) for multi-dimensional functions providing a gradient calculation.
virtual bool SetVariableUpperLimit(unsigned int ivar, double upper)
set the upper-limit of an already existing variable
std::vector< ROOT::Math::EMinimVariableType > fVarTypes
Namespace for new ROOT classes and functions.
virtual bool SetVariableStepSize(unsigned int ivar, double step)
set the step size of an already existing variable
virtual bool SetFixedVariable(unsigned int, const std::string &, double)
set fixed variable (override if minimizer supports them )
virtual int VariableIndex(const std::string &name) const
get index of variable given a variable given a name return -1 if variable is not found ...
virtual bool SetUpperLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double upper)
set upper limit variable (override if minimizer supports them )
Class, describing value, limits and step size of the parameters Provides functionality also to set/re...
virtual bool SetVariableValues(const double *x)
set the values of all existing variables (array must be dimensioned to the size of existing parameter...
BasicMinimizer(const BasicMinimizer &)
Copy constructor.
void PrintResult() const
print result of minimization
virtual bool SetVariableLowerLimit(unsigned int ivar, double lower)
set the lower-limit of an already existing variable
Base Minimizer class, which defines the basic funcionality of various minimizer implementations (apar...
MinimTransformFunction * CreateTransformation(std::vector< double > &startValues, const ROOT::Math::IMultiGradFunction *func=0)
virtual bool SetVariableLimits(unsigned int ivar, double lower, double upper)
set the limits of an already existing variable
virtual bool SetVariable(unsigned int ivar, const std::string &name, double val, double step)
set free variable
virtual bool SetLowerLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double lower)
set lower limit variable (override if minimizer supports them )
const ROOT::Math::IMultiGenFunction * fObjFunc
virtual bool GetVariableSettings(unsigned int ivar, ROOT::Fit::ParameterSettings &varObj) const
get variable settings in a variable object (like ROOT::Fit::ParamsSettings)
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2, Minuit, GSL, etc..) Plug-in's exist in ROOT to be able to instantiate the derived classes like ROOT::Math::GSLMinimizer or ROOT::Math::Minuit2Minimizer via the plug-in manager.
void SetMinValue(double val)
std::vector< double > fValues
std::map< unsigned int, std::pair< double, double > > fBounds
std::vector< double > fSteps
virtual unsigned int NDim() const
number of dimensions
virtual bool Minimize()
method to perform the minimization
void SetFinalValues(const double *x)
const ROOT::Math::MinimTransformFunction * TransformFunction() const
return transformation function (NULL if not having a transformation)
virtual double MinValue() const
return minimum function value
virtual std::string VariableName(unsigned int ivar) const
get name of variables (override if minimizer support storing of variable names)
virtual const double * X() const
return pointer to X values at the minimum
bool CheckObjFunction() const
virtual bool FixVariable(unsigned int ivar)
fix an existing variable
virtual void SetFunction(const ROOT::Math::IMultiGenFunction &func)
set the function to minimize
const ROOT::Math::IMultiGradFunction * GradObjFunction() const
return pointer to used gradient object function (NULL if gradient is not supported) ...
bool CheckDimension() const
virtual unsigned int NPar() const
total number of parameter defined
const ROOT::Math::IMultiGenFunction * ObjFunction() const
return pointer to used objective function
virtual unsigned int NFree() const
number of free variables (real dimension of the problem)
double func(double *x, double *p)
Namespace for new Math classes and functions.
BasicMinimizer & operator=(const BasicMinimizer &rhs)
Assignment operator.
virtual bool ReleaseVariable(unsigned int ivar)
release an existing variable
virtual bool SetLimitedVariable(unsigned int ivar, const std::string &name, double val, double step, double, double)
set upper/lower limited variable (override if minimizer supports them )
virtual bool IsFixedVariable(unsigned int ivar) const
query if an existing variable is fixed (i.e.
std::vector< std::string > fNames
BasicMinimizer()
Default constructor.
Documentation for the abstract class IBaseFunctionMultiDim.
virtual bool SetVariableValue(unsigned int ivar, double val)
set the value of an existing variable
virtual const double * StepSizes() const
accessor methods
virtual ~BasicMinimizer()
Destructor.