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);
106 virtual bool SetLowerLimitedVariable(
unsigned int ivar ,
const std::string & name ,
double val ,
double step ,
double lower );
108 virtual bool SetUpperLimitedVariable(
unsigned int ivar ,
const std::string & name ,
double val ,
double step ,
double upper );
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
virtual const double * X() const
return pointer to X values at the minimum
std::vector< ROOT::Math::EMinimVariableType > fVarTypes
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
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 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.
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 )
virtual double MinValue() const
return minimum function value
const ROOT::Math::IMultiGenFunction * fObjFunc
virtual std::string VariableName(unsigned int ivar) const
get name of variables (override if minimizer support storing of variable names)
virtual const double * StepSizes() const
accessor methods
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)
virtual unsigned int NPar() const
total number of parameter defined
std::vector< double > fValues
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 unsigned int NDim() const
number of dimensions
const ROOT::Math::IMultiGenFunction * ObjFunction() const
return pointer to used objective function
std::map< unsigned int, std::pair< double, double > > fBounds
std::vector< double > fSteps
virtual bool Minimize()
method to perform the minimization
void SetFinalValues(const double *x)
virtual bool FixVariable(unsigned int ivar)
fix an existing variable
const ROOT::Math::MinimTransformFunction * TransformFunction() const
return transformation function (NULL if not having a transformation)
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) ...
virtual unsigned int NFree() const
number of free variables (real dimension of the problem)
virtual bool IsFixedVariable(unsigned int ivar) const
query if an existing variable is fixed (i.e.
virtual bool GetVariableSettings(unsigned int ivar, ROOT::Fit::ParameterSettings &varObj) const
get variable settings in a variable object (like ROOT::Fit::ParamsSettings)
double func(double *x, double *p)
Namespace for new Math classes and functions.
BasicMinimizer & operator=(const BasicMinimizer &rhs)
Assignment operator.
bool CheckObjFunction() const
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 )
void PrintResult() const
print result of minimization
std::vector< std::string > fNames
BasicMinimizer()
Default constructor.
bool CheckDimension() const
Documentation for the abstract class IBaseFunctionMultiDim.
virtual bool SetVariableValue(unsigned int ivar, double val)
set the value of an existing variable
virtual ~BasicMinimizer()
Destructor.