Logo ROOT  
Reference Guide
MinimumState.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_MinimumState
11 #define ROOT_Minuit2_MinimumState
12 
15 
16 namespace ROOT {
17 
18  namespace Minuit2 {
19 
20 
21 class MinimumParameters;
22 class MinimumError;
23 class FunctionGradient;
24 
25 /** MinimumState keeps the information (position, Gradient, 2nd deriv, etc)
26  after one minimization step (usually in MinimumBuilder).
27  */
28 
29 class MinimumState {
30 
31 public:
32 
33  /** invalid state */
34  MinimumState(unsigned int n) :
35  fData(MnRefCountedPointer<BasicMinimumState>(new BasicMinimumState(n,0.,0.,0.))) {}
36  /** state without parameters and errors (only function value an, edm and nfcn) */
37  MinimumState(double fval, double edm, int nfcn) :
38  fData(MnRefCountedPointer<BasicMinimumState>(new BasicMinimumState(0, fval, edm, nfcn))) {}
39  /** state with parameters only (from stepping methods like Simplex, Scan) */
40  MinimumState(const MinimumParameters& states, double edm, int nfcn) :
42 
43  /** state with parameters, Gradient and covariance (from Gradient methods
44  such as Migrad) */
45  MinimumState(const MinimumParameters& states, const MinimumError& err,
46  const FunctionGradient& grad, double edm, int nfcn) :
47  fData(MnRefCountedPointer<BasicMinimumState>(new BasicMinimumState(states, err, grad, edm, nfcn))) {}
48 
49  ~MinimumState() {}
50 
51  MinimumState(const MinimumState& state) : fData(state.fData) {}
52 
54  fData = state.fData;
55  return *this;
56  }
57 
58  const MinimumParameters& Parameters() const {return fData->Parameters();}
59  const MnAlgebraicVector& Vec() const {return fData->Vec();}
60  int size() const {return fData->size();}
61 
62  const MinimumError& Error() const {return fData->Error();}
63  const FunctionGradient& Gradient() const {return fData->Gradient();}
64  double Fval() const {return fData->Fval();}
65  double Edm() const {return fData->Edm();}
66  int NFcn() const {return fData->NFcn();}
67 
68  bool IsValid() const {return fData->IsValid();}
69 
70  bool HasParameters() const {return fData->HasParameters();}
71  bool HasCovariance() const {return fData->HasCovariance();}
72 
73 private:
74 
76 };
77 
78  } // namespace Minuit2
79 
80 } // namespace ROOT
81 
82 #endif // ROOT_Minuit2_MinimumState
n
const Int_t n
Definition: legend1.C:16
ROOT::Minuit2::MinimumState::Edm
double Edm() const
Definition: MinimumState.h:73
ROOT::Minuit2::MinimumState::HasCovariance
bool HasCovariance() const
Definition: MinimumState.h:79
ROOT::Minuit2::MinimumState
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
Definition: MinimumState.h:37
ROOT::Minuit2::LAVector
Definition: LAVector.h:41
ROOT::Minuit2::MinimumState::IsValid
bool IsValid() const
Definition: MinimumState.h:76
ROOT::Minuit2::MinimumState::Gradient
const FunctionGradient & Gradient() const
Definition: MinimumState.h:71
ROOT::Minuit2::MinimumState::MinimumState
MinimumState(double fval, double edm, int nfcn)
state without parameters and errors (only function value an, edm and nfcn)
Definition: MinimumState.h:45
MnRefCountedPointer.h
ROOT::Minuit2::MinimumState::NFcn
int NFcn() const
Definition: MinimumState.h:74
ROOT::Minuit2::FunctionGradient
Definition: FunctionGradient.h:29
ROOT::Minuit2::MinimumState::MinimumState
MinimumState(unsigned int n)
invalid state
Definition: MinimumState.h:42
ROOT::Minuit2::MinimumState::~MinimumState
~MinimumState()
Definition: MinimumState.h:57
ROOT::Minuit2::BasicMinimumState
Definition: BasicMinimumState.h:34
ROOT::Minuit2::MinimumParameters
Definition: MinimumParameters.h:29
ROOT::Minuit2::MinimumState::Error
const MinimumError & Error() const
Definition: MinimumState.h:70
BasicMinimumState.h
ROOT::Minuit2::MinimumState::Fval
double Fval() const
Definition: MinimumState.h:72
ROOT::Minuit2::MnRefCountedPointer
Definition: MnRefCountedPointer.h:28
ROOT::Minuit2::MinimumState::size
int size() const
Definition: MinimumState.h:68
ROOT::Minuit2::MinimumState::Vec
const MnAlgebraicVector & Vec() const
Definition: MinimumState.h:67
ROOT::Minuit2::MinimumError
MinimumError keeps the inv.
Definition: MinimumError.h:34
ROOT::Minuit2::MinimumState::Parameters
const MinimumParameters & Parameters() const
Definition: MinimumState.h:66
ROOT::Minuit2::MinimumState::fData
MnRefCountedPointer< BasicMinimumState > fData
Definition: MinimumState.h:83
ROOT::Minuit2::MinimumState::HasParameters
bool HasParameters() const
Definition: MinimumState.h:78
ROOT::Minuit2::MinimumState::operator=
MinimumState & operator=(const MinimumState &state)
Definition: MinimumState.h:61
ROOT
VSD Structures.
Definition: StringConv.hxx:21