#ifndef ROOT_Minuit2_Minuit2Minimizer
#define ROOT_Minuit2_Minuit2Minimizer
#ifndef ROOT_Math_Minimizer
#include "Math/Minimizer.h"
#endif
#ifndef ROOT_Minuit2_MnUserParameterState
#include "Minuit2/MnUserParameterState.h"
#endif
#ifndef ROOT_Math_IFunctionfwd
#include "Math/IFunctionfwd.h"
#endif
#ifndef ROOT_Math_IParamFunctionfwd
#include "Math/IParamFunctionfwd.h"
#endif
namespace ROOT {
namespace Minuit2 {
class ModularFunctionMinimizer;
class FCNBase;
class FunctionMinimum;
enum EMinimizerType {
kMigrad,
kSimplex,
kCombined,
kScan,
kFumili
};
}
namespace Minuit2 {
class Minuit2Minimizer : public ROOT::Math::Minimizer {
public:
Minuit2Minimizer (ROOT::Minuit2::EMinimizerType type = ROOT::Minuit2::kMigrad);
Minuit2Minimizer (const char * type);
virtual ~Minuit2Minimizer ();
private:
Minuit2Minimizer(const Minuit2Minimizer &);
Minuit2Minimizer & operator = (const Minuit2Minimizer & rhs);
public:
virtual void Clear();
virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func);
virtual void SetFunction(const ROOT::Math::IMultiGradFunction & func);
virtual bool SetVariable(unsigned int ivar, const std::string & name, double val, double step);
virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double lower );
virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double upper );
virtual bool SetLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double , double );
virtual bool SetFixedVariable(unsigned int , const std::string & , double );
virtual bool SetVariableValue(unsigned int ivar, double val);
virtual bool SetVariableValues(const double * val);
virtual std::string VariableName(unsigned int ivar) const;
virtual bool Minimize();
virtual double MinValue() const { return fState.Fval(); }
virtual double Edm() const { return fState.Edm(); }
virtual const double * X() const {
fValues=fState.Params();
return &fValues.front();
}
virtual const double * MinGradient() const { return 0; }
virtual unsigned int NCalls() const { return fState.NFcn(); }
virtual unsigned int NDim() const { return fDim; }
virtual unsigned int NFree() const { return fState.VariableParameters(); }
virtual bool ProvidesError() const { return true; }
virtual const double * Errors() const {
fErrors = fState.Errors();
return &fErrors.front();
}
virtual double CovMatrix(unsigned int i, unsigned int j) const;
virtual double Correlation(unsigned int i, unsigned int j ) const;
virtual double GlobalCC(unsigned int i) const;
virtual bool GetMinosError(unsigned int i, double & errLow, double & errUp);
virtual bool Scan(unsigned int i, unsigned int & nstep, double * x, double * y, double xmin = 0, double xmax = 0);
virtual bool Contour(unsigned int i, unsigned int j, unsigned int & npoints, double *xi, double *xj);
protected:
virtual const ROOT::Minuit2::ModularFunctionMinimizer * GetMinimizer() const { return fMinimizer; }
virtual void SetMinimizer( ROOT::Minuit2::ModularFunctionMinimizer * m) { fMinimizer = m; }
void SetMinimizerType( ROOT::Minuit2::EMinimizerType type);
virtual const ROOT::Minuit2::FCNBase * GetFCN() const { return fMinuitFCN; }
bool ExamineMinimum(const ROOT::Minuit2::FunctionMinimum & min);
private:
unsigned int fDim;
int fErrorCode;
bool fUseFumili;
ROOT::Minuit2::MnUserParameterState fState;
ROOT::Minuit2::ModularFunctionMinimizer * fMinimizer;
ROOT::Minuit2::FCNBase * fMinuitFCN;
ROOT::Minuit2::FunctionMinimum * fMinimum;
mutable std::vector<double> fValues;
mutable std::vector<double> fErrors;
};
}
}
#endif /* ROOT_Minuit2_Minuit2Minimizer */
Last change: Fri Dec 12 12:11:56 2008
Last generated: 2008-12-12 12:11
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.