Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
MnApplication.h
Go to the documentation of this file.
1// @(#)root/minuit2:$Id$
2// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7 * *
8 **********************************************************************/
9
10#ifndef ROOT_Minuit2_MnApplication
11#define ROOT_Minuit2_MnApplication
12
14#include "Minuit2/MnStrategy.h"
15
16#include <vector>
17
18namespace ROOT {
19
20namespace Minuit2 {
21
22class FunctionMinimum;
23class MinuitParameter;
24class MnMachinePrecision;
25class ModularFunctionMinimizer;
26class FCNBase;
27
28//___________________________________________________________________________
29/**
30 application interface class for minimizers (migrad, simplex, Minimize,
31 Scan)
32 User normally instantiates the derived class like ROOT::Minuit2::MnMigrad
33 for using Migrad for minimization
34 */
35
37
38public:
39 /// constructor from non-gradient functions
40 MnApplication(const FCNBase &fcn, const MnUserParameterState &state, const MnStrategy &stra, unsigned int nfcn = 0);
41
42 virtual ~MnApplication() {}
43
44 /**
45 Minimize the function
46 @param maxfcn : max number of function calls (if = 0) default is used which is set to
47 200 + 100 * npar + 5 * npar**2
48 @param tolerance : value used for terminating iteration procedure.
49 For example, MIGRAD will stop iterating when edm (expected distance from minimum) will be:
50 edm < tolerance * 10**-3
51 Default value of tolerance used is 0.1
52 */
53 virtual FunctionMinimum operator()(unsigned int maxfcn = 0, double tolerance = 0.1);
54
56 virtual const ModularFunctionMinimizer &Minimizer() const = 0;
57
58 const MnMachinePrecision &Precision() const { return fState.Precision(); }
60 const MnUserParameterState &State() const { return fState; }
61 const MnUserParameters &Parameters() const { return fState.Parameters(); }
62 const MnUserCovariance &Covariance() const { return fState.Covariance(); }
63 virtual const FCNBase &Fcnbase() const { return fFCN; }
64 const MnStrategy &Strategy() const { return fStrategy; }
65 unsigned int NumOfCalls() const { return fNumCall; }
66
67protected:
68 const FCNBase &fFCN;
71 unsigned int fNumCall;
72};
73
74} // namespace Minuit2
75
76} // namespace ROOT
77
78#endif // ROOT_Minuit2_MnApplication
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
Definition FCNBase.h:49
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
application interface class for minimizers (migrad, simplex, Minimize, Scan) User normally instantiat...
const MnUserParameters & Parameters() const
unsigned int NumOfCalls() const
MnUserParameterState fState
const MnStrategy & Strategy() const
const MnUserParameterState & State() const
virtual ModularFunctionMinimizer & Minimizer()=0
virtual FunctionMinimum operator()(unsigned int maxfcn=0, double tolerance=0.1)
Minimize the function.
virtual const FCNBase & Fcnbase() const
MnUserParameterState & State()
const MnMachinePrecision & Precision() const
virtual const ModularFunctionMinimizer & Minimizer() const =0
const MnUserCovariance & Covariance() const
MnApplication(const FCNBase &fcn, const MnUserParameterState &state, const MnStrategy &stra, unsigned int nfcn=0)
constructor from non-gradient functions
Sets the relative floating point (double) arithmetic precision.
API class for defining four levels of strategies: low (0), medium (1), high (2), very high (>=3); act...
Definition MnStrategy.h:27
Class containing the covariance matrix data represented as a vector of size n*(n+1)/2 Used to hide in...
class which holds the external user and/or internal Minuit representation of the parameters and error...
const MnMachinePrecision & Precision() const
const MnUserParameters & Parameters() const
const MnUserCovariance & Covariance() const
API class for the user interaction with the parameters; serves as input to the minimizer as well as o...
Base common class providing the API for all the minimizer Various Minimize methods are provided varyi...