#ifndef ROOT_Minuit2_MnApplication
#define ROOT_Minuit2_MnApplication
#include "Minuit2/MnUserParameterState.h"
#include "Minuit2/MnStrategy.h"
namespace ROOT {
namespace Minuit2 {
class FunctionMinimum;
class MinuitParameter;
class MnMachinePrecision;
class ModularFunctionMinimizer;
class FCNBase;
class FCNGradientBase;
class MnApplication {
public:
MnApplication(const FCNBase& fcn, const MnUserParameterState& state, const MnStrategy& stra, unsigned int nfcn = 0);
MnApplication(const FCNGradientBase& fcn, const MnUserParameterState& state, const MnStrategy& stra, unsigned int nfcn = 0);
virtual ~MnApplication() { }
virtual FunctionMinimum operator()(unsigned int maxfcn = 0, double tolerance = 0.1);
virtual const ModularFunctionMinimizer& Minimizer() const = 0;
const MnMachinePrecision& Precision() const {return fState.Precision();}
const MnUserParameterState& State() const {return fState;}
const MnUserParameters& Parameters() const {return fState.Parameters();}
const MnUserCovariance& Covariance() const {return fState.Covariance();}
virtual const FCNBase& Fcnbase() const {return fFCN;}
const MnStrategy& Strategy() const {return fStrategy;}
unsigned int NumOfCalls() const {return fNumCall;}
protected:
const FCNBase& fFCN;
MnUserParameterState fState;
MnStrategy fStrategy;
unsigned int fNumCall;
bool fUseGrad;
public:
const std::vector<ROOT::Minuit2::MinuitParameter>& MinuitParameters() const;
std::vector<double> Params() const;
std::vector<double> Errors() const;
const MinuitParameter& Parameter(unsigned int i) const;
void Add(const char* Name, double val, double err);
void Add(const char* Name, double val, double err, double , double);
void Add(const char*, double);
void Fix(unsigned int);
void Release(unsigned int);
void SetValue(unsigned int, double);
void SetError(unsigned int, double);
void SetLimits(unsigned int, double, double);
void RemoveLimits(unsigned int);
double Value(unsigned int) const;
double Error(unsigned int) const;
void Fix(const char*);
void Release(const char*);
void SetValue(const char*, double);
void SetError(const char*, double);
void SetLimits(const char*, double, double);
void RemoveLimits(const char*);
void SetPrecision(double);
double Value(const char*) const;
double Error(const char*) const;
unsigned int Index(const char*) const;
const char* Name(unsigned int) const;
double Int2ext(unsigned int, double) const;
double Ext2int(unsigned int, double) const;
unsigned int IntOfExt(unsigned int) const;
unsigned int ExtOfInt(unsigned int) const;
unsigned int VariableParameters() const;
};
}
}
#endif // ROOT_Minuit2_MnApplication