CorrelatedGaussianParameters.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 HEPfit Collaboration
3  * All rights reserved.
4  *
5  * For the licensing terms see doc/COPYING.
6  */
7 
8 #ifndef CORRELATEDGAUSSIANPARAMETERS_H
9 #define CORRELATEDGAUSSIANPARAMETERS_H
10 
11 #include "ModelParameter.h"
12 #include "gslpp.h"
13 
30 public:
31 
36  CorrelatedGaussianParameters(std::string name_i);
37 
42 
47 
52 
58 
63  void AddPar(ModelParameter& Par_i);
64 
70  const std::vector<ModelParameter>& getPars() const
71  {
72  return Pars;
73  }
74 
80  ModelParameter getPar(int i) const
81  {
82  return (Pars.at(i));
83  }
84 
89  std::string getName() const
90  {
91  return name;
92  }
93 
98  {
99  return *Cov;
100  }
101 
106  const std::vector<ModelParameter>& getDiagPars() const
107  {
108  return DiagPars;
109  }
110 
111 
112  std::vector<double> getOrigParsValue(const std::vector<double>& DiagPars_i) const;
113 
124  int ParseCGP(std::vector<ModelParameter>& ModPars,
125  std::string& filename,
126  std::ifstream& ifile,
127  boost::tokenizer<boost::char_separator<char> >::iterator & beg,
128  int lineNo,
129  int rank);
130 
135  bool isEOF()
136  {
137  return IsEOF;
138  }
139 
140 private:
141  std::vector<ModelParameter> Pars;
143  std::string name;
146  std::vector<ModelParameter> DiagPars;
147  bool IsEOF;
148 };
149 
154 #endif /* CORRELATEDGAUSSIANPARAMETERS_H */
155 
virtual ~CorrelatedGaussianParameters()
The default destructor.
A class for correlated Gaussian parameters.
gslpp::matrix< double > getCov() const
A get method to access the covariance matrix of the correlated Gaussian parameters.
gslpp::vector< double > * e
The diagonalized parameters.
A class for constructing and defining operations on real matrices.
CorrelatedGaussianParameters()
The default Constructor.
std::vector< double > getOrigParsValue(const std::vector< double > &DiagPars_i) const
std::vector< ModelParameter > DiagPars
The eigenvector of the covariance matrix.
gslpp::matrix< double > * Cov
The covariance matrix.
const std::vector< ModelParameter > & getDiagPars() const
A get method to access the diagonalized parameters.
const std::vector< ModelParameter > & getPars() const
A get method to access the vector of parameters that are defined in one correlated Gaussian parameter...
std::string getName() const
A get method to access the name of the correlated Gaussian parameters set.
A class for model parameters.
void DiagonalizePars(gslpp::matrix< double > Corr)
Diagonalizes the correlated Gaussian parameters set.
std::vector< ModelParameter > Pars
A vector of parameters whose correlation will be calculated.
bool isEOF()
A method to check if the end of file has been reached.
gslpp::matrix< double > * v
The rotation matrix form the diagonalized parameters to the original parameters.
int ParseCGP(std::vector< ModelParameter > &ModPars, std::string &filename, std::ifstream &ifile, boost::tokenizer< boost::char_separator< char > >::iterator &beg, int lineNo, int rank)
The parser for CorrelatedGaussianParameters.
A class for constructing and defining operations on real vectors.
std::string name
The name of the correlated Gaussian Parameters set.
void AddPar(ModelParameter &Par_i)
A method to add parameters to the list of correlated Gaussian parameters.
ModelParameter getPar(int i) const
A get method to access an element of the vector of parameters that are defined in one correlated Gaus...