Logo ROOT   6.14/05
Reference Guide
MnSimplex.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_MnSimplex
11 #define ROOT_Minuit2_MnSimplex
12 
13 #include "Minuit2/MnApplication.h"
15 
16 namespace ROOT {
17 
18  namespace Minuit2 {
19 
20 
21 class FCNBase;
22 
23 //_________________________________________________________________________
24 /**
25  API class for minimization using the Simplex method, which does not need and use
26  the derivatives of the function, but only function values.
27  More information on the minimization method is available
28  <A HREF="http://seal.web.cern.ch/mathlibs/documents/minuit/mntutorial.pdf">here</A>.
29 
30  It allows for user interaction: set/change parameters, do minimization,
31  change parameters, re-do minimization etc.;
32  */
33 
34 class MnSimplex : public MnApplication {
35 
36 public:
37 
38  /// construct from FCNBase + std::vector for parameters and errors
39  MnSimplex(const FCNBase& fcn, const std::vector<double>& par, const std::vector<double>& err, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par,err), MnStrategy(stra)), fMinimizer(SimplexMinimizer()) {}
40 
41  /// construct from FCNBase + std::vector for parameters and covariance
42  MnSimplex(const FCNBase& fcn, const std::vector<double>& par, unsigned int nrow, const std::vector<double>& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov, nrow), MnStrategy(stra)), fMinimizer(SimplexMinimizer()) {}
43 
44  /// construct from FCNBase + std::vector for parameters and MnUserCovariance
45  MnSimplex(const FCNBase& fcn, const std::vector<double>& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(SimplexMinimizer()) {}
46 
47  /// construct from FCNBase + MnUserParameters
48  MnSimplex(const FCNBase& fcn, const MnUserParameters& par, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par), MnStrategy(stra)), fMinimizer(SimplexMinimizer()) {}
49 
50  /// construct from FCNBase + MnUserParameters + MnUserCovariance
51  MnSimplex(const FCNBase& fcn, const MnUserParameters& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(SimplexMinimizer()) {}
52 
53  /// construct from FCNBase + MnUserParameterState + MnStrategy
55 
56  MnSimplex(const MnSimplex& migr) : MnApplication(migr.Fcnbase(), migr.State(), migr.Strategy(), migr.NumOfCalls()), fMinimizer(migr.fMinimizer) {}
57 
59 
61 
62 private:
63 
65 
66 private:
67 
68  //forbidden assignment of migrad (const FCNBase& = )
69  MnSimplex& operator=(const MnSimplex&) {return *this;}
70 };
71 
72  } // namespace Minuit2
73 
74 } // namespace ROOT
75 
76 #endif // ROOT_Minuit2_MnSimplex
MnSimplex & operator=(const MnSimplex &)
Definition: MnSimplex.h:69
MnSimplex(const FCNBase &fcn, const std::vector< double > &par, unsigned int nrow, const std::vector< double > &cov, unsigned int stra=1)
construct from FCNBase + std::vector for parameters and covariance
Definition: MnSimplex.h:42
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
const ModularFunctionMinimizer & Minimizer() const
Definition: MnSimplex.h:60
MnSimplex(const FCNBase &fcn, const std::vector< double > &par, const MnUserCovariance &cov, unsigned int stra=1)
construct from FCNBase + std::vector for parameters and MnUserCovariance
Definition: MnSimplex.h:45
MnSimplex(const FCNBase &fcn, const MnUserParameters &par, unsigned int stra=1)
construct from FCNBase + MnUserParameters
Definition: MnSimplex.h:48
SimplexMinimizer fMinimizer
Definition: MnSimplex.h:64
MnSimplex(const FCNBase &fcn, const std::vector< double > &par, const std::vector< double > &err, unsigned int stra=1)
construct from FCNBase + std::vector for parameters and errors
Definition: MnSimplex.h:39
virtual const FCNBase & Fcnbase() const
Definition: MnApplication.h:67
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
Definition: FCNBase.h:47
const MnStrategy & Strategy() const
Definition: MnApplication.h:68
API class for minimization using the Simplex method, which does not need and use the derivatives of t...
Definition: MnSimplex.h:34
class which holds the external user and/or internal Minuit representation of the parameters and error...
MnSimplex(const MnSimplex &migr)
Definition: MnSimplex.h:56
API class for the user interaction with the parameters; serves as input to the minimizer as well as o...
unsigned int NumOfCalls() const
Definition: MnApplication.h:69
Class implementing the required methods for a minimization using Simplex.
MnSimplex(const FCNBase &fcn, const MnUserParameterState &par, const MnStrategy &str)
construct from FCNBase + MnUserParameterState + MnStrategy
Definition: MnSimplex.h:54
MnSimplex(const FCNBase &fcn, const MnUserParameters &par, const MnUserCovariance &cov, unsigned int stra=1)
construct from FCNBase + MnUserParameters + MnUserCovariance
Definition: MnSimplex.h:51
application interface class for minimizers (migrad, simplex, Minimize, Scan) User normally instantiat...
Definition: MnApplication.h:37
const MnUserParameterState & State() const
Definition: MnApplication.h:64
API class for defining three levels of strategies: low (0), medium (1), high (>=2); acts on: Migrad (...
Definition: MnStrategy.h:27
Base common class providing the API for all the minimizer Various Minimize methods are provided varyi...
Class containing the covariance matrix data represented as a vector of size n*(n+1)/2 Used to hide in...