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 
14 
15 #include <memory>
16 
17 namespace ROOT {
18 
19 namespace Minuit2 {
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  /** invalid state */
33  MinimumState(unsigned int n) : fData(std::make_shared<BasicMinimumState>(n, 0., 0., 0.)) {}
34  /** state without parameters and errors (only function value an, edm and nfcn) */
35  MinimumState(double fval, double edm, int nfcn) : fData(std::make_shared<BasicMinimumState>(0, fval, edm, nfcn)) {}
36  /** state with parameters only (from stepping methods like Simplex, Scan) */
37  MinimumState(const MinimumParameters &states, double edm, int nfcn)
38  : fData(std::make_shared<BasicMinimumState>(states, edm, nfcn))
39  {
40  }
41 
42  /** state with parameters, Gradient and covariance (from Gradient methods
43  such as Migrad) */
44  MinimumState(const MinimumParameters &states, const MinimumError &err, const FunctionGradient &grad, double edm,
45  int nfcn)
46  : fData(std::make_shared<BasicMinimumState>(states, err, grad, edm, nfcn))
47  {
48  }
49 
50  const MinimumParameters &Parameters() const { return fData->Parameters(); }
51  const MnAlgebraicVector &Vec() const { return fData->Vec(); }
52  int size() const { return fData->size(); }
53 
54  const MinimumError &Error() const { return fData->Error(); }
55  const FunctionGradient &Gradient() const { return fData->Gradient(); }
56  double Fval() const { return fData->Fval(); }
57  double Edm() const { return fData->Edm(); }
58  int NFcn() const { return fData->NFcn(); }
59 
60  bool IsValid() const { return fData->IsValid(); }
61 
62  bool HasParameters() const { return fData->HasParameters(); }
63  bool HasCovariance() const { return fData->HasCovariance(); }
64 
65 private:
66  std::shared_ptr<BasicMinimumState> fData;
67 };
68 
69 } // namespace Minuit2
70 
71 } // namespace ROOT
72 
73 #endif // ROOT_Minuit2_MinimumState
n
const Int_t n
Definition: legend1.C:16
ROOT::Minuit2::MinimumState::Edm
double Edm() const
Definition: MinimumState.h:57
ROOT::Minuit2::MinimumState::HasCovariance
bool HasCovariance() const
Definition: MinimumState.h:63
ROOT::Minuit2::MinimumState
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
Definition: MinimumState.h:29
ROOT::Minuit2::LAVector
Definition: LAVector.h:32
ROOT::Minuit2::MinimumState::IsValid
bool IsValid() const
Definition: MinimumState.h:60
ROOT::Minuit2::MinimumState::Gradient
const FunctionGradient & Gradient() const
Definition: MinimumState.h:55
ROOT::Minuit2::MinimumState::fData
std::shared_ptr< BasicMinimumState > fData
Definition: MinimumState.h:66
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:35
ROOT::Minuit2::MinimumState::MinimumState
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:44
ROOT::Minuit2::MinimumState::NFcn
int NFcn() const
Definition: MinimumState.h:58
ROOT::Minuit2::FunctionGradient
Definition: FunctionGradient.h:21
ROOT::Minuit2::MinimumState::MinimumState
MinimumState(unsigned int n)
invalid state
Definition: MinimumState.h:33
ROOT::Minuit2::MinimumState::MinimumState
MinimumState(const MinimumParameters &states, double edm, int nfcn)
state with parameters only (from stepping methods like Simplex, Scan)
Definition: MinimumState.h:37
ROOT::Minuit2::BasicMinimumState
Definition: BasicMinimumState.h:25
ROOT::Minuit2::MinimumParameters
Definition: MinimumParameters.h:21
ROOT::Minuit2::MinimumState::Error
const MinimumError & Error() const
Definition: MinimumState.h:54
BasicMinimumState.h
ROOT::Minuit2::MinimumState::Fval
double Fval() const
Definition: MinimumState.h:56
ROOT::Minuit2::MinimumState::size
int size() const
Definition: MinimumState.h:52
ROOT::Minuit2::MinimumState::Vec
const MnAlgebraicVector & Vec() const
Definition: MinimumState.h:51
ROOT::Minuit2::MinimumError
MinimumError keeps the inv.
Definition: MinimumError.h:26
ROOT::Minuit2::MinimumState::Parameters
const MinimumParameters & Parameters() const
Definition: MinimumState.h:50
ROOT::Minuit2::MinimumState::HasParameters
bool HasParameters() const
Definition: MinimumState.h:62
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: EExecutionPolicy.hxx:4