ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
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;}
51  MnAlgebraicVector Dirin() const;
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
#define assert(cond)
Definition: unittest.h:542
const std::pair< double, MnAlgebraicVector > & operator()(unsigned int i) const
std::vector< std::pair< double, MnAlgebraicVector > > fSimplexParameters
void Update(double, const MnAlgebraicVector &)
class describing the simplex set of points (f(x), x ) which evolve during the minimization iteration ...
const std::vector< std::pair< double, MnAlgebraicVector > > & Simplex() const
SimplexParameters(const std::vector< std::pair< double, MnAlgebraicVector > > &simpl, unsigned int jh, unsigned int jl)
MnAlgebraicVector Dirin() const