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
16namespace ROOT {
17
18 namespace Minuit2 {
19
20
21class MinimumParameters;
22class MinimumError;
23class FunctionGradient;
24
25/** MinimumState keeps the information (position, Gradient, 2nd deriv, etc)
26 after one minimization step (usually in MinimumBuilder).
27 */
28
30
31public:
32
33 /** invalid state */
34 MinimumState(unsigned int n) :
36 /** state without parameters and errors (only function value an, edm and nfcn) */
37 MinimumState(double fval, double edm, int 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
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
73private:
74
76};
77
78 } // namespace Minuit2
79
80} // namespace ROOT
81
82#endif // ROOT_Minuit2_MinimumState
MinimumError keeps the inv.
Definition: MinimumError.h:26
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
Definition: MinimumState.h:29
MnRefCountedPointer< BasicMinimumState > fData
Definition: MinimumState.h:75
MinimumState(const MinimumParameters &states, const MinimumError &err, const FunctionGradient &grad, double edm, int nfcn)
state with parameters, Gradient and covariance (from Gradient methods such as Migrad)
Definition: MinimumState.h:45
MinimumState(unsigned int n)
invalid state
Definition: MinimumState.h:34
MinimumState(const MinimumParameters &states, double edm, int nfcn)
state with parameters only (from stepping methods like Simplex, Scan)
Definition: MinimumState.h:40
const MinimumError & Error() const
Definition: MinimumState.h:62
MinimumState(const MinimumState &state)
Definition: MinimumState.h:51
const MnAlgebraicVector & Vec() const
Definition: MinimumState.h:59
const MinimumParameters & Parameters() const
Definition: MinimumState.h:58
MinimumState & operator=(const MinimumState &state)
Definition: MinimumState.h:53
const FunctionGradient & Gradient() const
Definition: MinimumState.h:63
MinimumState(double fval, double edm, int nfcn)
state without parameters and errors (only function value an, edm and nfcn)
Definition: MinimumState.h:37
const Int_t n
Definition: legend1.C:16
VSD Structures.
Definition: StringConv.hxx:21