Logo ROOT  
Reference Guide
SimplexParameters.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_SimplexParameters
11 #define ROOT_Minuit2_SimplexParameters
12 
13 #include <cassert>
14 
15 #include "Minuit2/MnMatrix.h"
16 
17 #include <vector>
18 #include <utility>
19 
20 namespace ROOT {
21 
22  namespace Minuit2 {
23 
24 /**
25  class describing the simplex set of points (f(x), x ) which evolve during the minimization
26  iteration process.
27  */
28 
29 class SimplexParameters {
30 
31 public:
32 
33  SimplexParameters(const std::vector<std::pair<double, MnAlgebraicVector> >& simpl, unsigned int jh, unsigned int jl) : fSimplexParameters(simpl), fJHigh(jh), fJLow(jl) {}
34 
36 
37  void Update(double, const MnAlgebraicVector&);
38 
39  const std::vector<std::pair<double, MnAlgebraicVector> >& Simplex() const {
40  return fSimplexParameters;
41  }
42 
43  const std::pair<double, MnAlgebraicVector>& operator()(unsigned int i) const {
44  assert(i < fSimplexParameters.size());
45  return fSimplexParameters[i];
46  }
47 
48  unsigned int Jh() const {return fJHigh;}
49  unsigned int Jl() const {return fJLow;}
50  double Edm() const {return fSimplexParameters[Jh()].first - fSimplexParameters[Jl()].first;}
52 
53 private:
54 
55  std::vector<std::pair<double, MnAlgebraicVector> > fSimplexParameters;
56  unsigned int fJHigh;
57  unsigned int fJLow;
58 };
59 
60  } // namespace Minuit2
61 
62 } // namespace ROOT
63 
64 #endif // ROOT_Minuit2_SimplexParameters
ROOT::Minuit2::SimplexParameters::fJHigh
unsigned int fJHigh
Definition: SimplexParameters.h:68
ROOT::Minuit2::LAVector
Definition: LAVector.h:41
MnMatrix.h
ROOT::Minuit2::SimplexParameters::Update
void Update(double, const MnAlgebraicVector &)
Definition: SimplexParameters.cxx:25
ROOT::Minuit2::SimplexParameters::operator()
const std::pair< double, MnAlgebraicVector > & operator()(unsigned int i) const
Definition: SimplexParameters.h:55
ROOT::Minuit2::SimplexParameters::~SimplexParameters
~SimplexParameters()
Definition: SimplexParameters.h:47
ROOT::Minuit2::SimplexParameters::Dirin
MnAlgebraicVector Dirin() const
Definition: SimplexParameters.cxx:39
ROOT::Minuit2::SimplexParameters::fSimplexParameters
std::vector< std::pair< double, MnAlgebraicVector > > fSimplexParameters
Definition: SimplexParameters.h:67
ROOT::Minuit2::SimplexParameters::Simplex
const std::vector< std::pair< double, MnAlgebraicVector > > & Simplex() const
Definition: SimplexParameters.h:51
ROOT::Minuit2::SimplexParameters::SimplexParameters
SimplexParameters(const std::vector< std::pair< double, MnAlgebraicVector > > &simpl, unsigned int jh, unsigned int jl)
Definition: SimplexParameters.h:45
ROOT::Minuit2::SimplexParameters::Jh
unsigned int Jh() const
Definition: SimplexParameters.h:60
ROOT::Minuit2::SimplexParameters::Edm
double Edm() const
Definition: SimplexParameters.h:62
ROOT::Minuit2::SimplexParameters::Jl
unsigned int Jl() const
Definition: SimplexParameters.h:61
ROOT::Minuit2::SimplexParameters::fJLow
unsigned int fJLow
Definition: SimplexParameters.h:69
ROOT
VSD Structures.
Definition: StringConv.hxx:21