DoxyExample Class Reference

A class for setting an example for Doxygen documentation. More...

#include <CorrelatedGaussianObservables.h>

Collaboration diagram for DoxyExample:
[legend]

Detailed Description

A class for setting an example for Doxygen documentation.

Author
HEPfit Collaboration

This class shows how different members of a class and the class itself can be documneted in Doxygen.

Definition at line 28 of file doc/Developer Support/Doxygen Support/CorrelatedGaussianObservables.h.

Public Member Functions

void AddObs (Observable &Obs_i)
 A method to add observables to the list of Doxygen. More...
 
void ComputeCov (gslpp::matrix< double > Corr)
 Computes the covariance matrix for the Doxygen set. More...
 
 DoxyExample (std::string name_i)
 The default constructor. More...
 
 DoxyExample (const DoxyExample &orig)
 The copy constructor. More...
 
gslpp::matrix< double > getCov () const
 A get method to access the covariance matrix of the Doxygen. More...
 
std::string getName () const
 A get method to access the name of the Doxygen set. More...
 
std::vector< ObservablegetObs () const
 A get method to access the vector of observables that are defined in one Doxygen set. More...
 
void setName (std::string name)
 A set method to fix the name of the set of Doxygen. More...
 
virtual ~DoxyExample ()
 The default destructor. More...
 

Private Attributes

gslpp::matrix< double > * Cov
 
std::string name
 
std::vector< ObservableObs
 

Constructor & Destructor Documentation

DoxyExample::DoxyExample ( std::string  name_i)

The default constructor.

Parameters
[in]name_ia given name for the set of Doxygen observables

Definition at line 10 of file doc/Developer Support/Doxygen Support/CorrelatedGaussianObservables.cpp.

DoxyExample::DoxyExample ( const DoxyExample orig)

The copy constructor.

Definition at line 15 of file doc/Developer Support/Doxygen Support/CorrelatedGaussianObservables.cpp.

16 {
17  Obs = orig.Obs;
18  name = orig.name;
19  Cov = new gslpp::matrix<double>(*orig.Cov);
20 }
A class for constructing and defining operations on real matrices.
DoxyExample::~DoxyExample ( )
virtual

The default destructor.

Definition at line 22 of file doc/Developer Support/Doxygen Support/CorrelatedGaussianObservables.cpp.

23 {
24  if(Cov != NULL)
25  delete(Cov);
26 }

Member Function Documentation

void DoxyExample::AddObs ( Observable Obs_i)

A method to add observables to the list of Doxygen.

Parameters
obs_ireference to an object of type Observable()

Definition at line 28 of file doc/Developer Support/Doxygen Support/CorrelatedGaussianObservables.cpp.

29 {
30  Obs.push_back(Obs_i);
31 }
void DoxyExample::ComputeCov ( gslpp::matrix< double >  Corr)

Computes the covariance matrix for the Doxygen set.

Parameters
Corrthe correlation matrix for the Doxygen set

Definition at line 33 of file doc/Developer Support/Doxygen Support/CorrelatedGaussianObservables.cpp.

34 {
35  int size = Obs.size();
36  if (Corr.size_i() != size || Corr.size_j() != size)
37  throw std::runtime_error("The size of the correlated observables in "+name+" does not match the size of the correlation matrix!");
38  Cov = new gslpp::matrix<double>(size,size,0.);
39  for(int i = 0; i < size; i++)
40  for(int j = 0; j < size; j++)
41  (*Cov)(i,j) = Obs.at(i).getErrg()*Corr(i,j)*Obs.at(j).getErrg();
42  *Cov = Cov->inverse();
43 }
A class for constructing and defining operations on real matrices.
gslpp::matrix<double> DoxyExample::getCov ( ) const
inline

A get method to access the covariance matrix of the Doxygen.

Parameters
thecovariance matrix

Definition at line 91 of file doc/Developer Support/Doxygen Support/CorrelatedGaussianObservables.h.

92  {
93  return *Cov;
94  }
std::string DoxyExample::getName ( ) const
inline

A get method to access the name of the Doxygen set.

Returns
the name

Definition at line 73 of file doc/Developer Support/Doxygen Support/CorrelatedGaussianObservables.h.

std::vector<Observable> DoxyExample::getObs ( ) const
inline

A get method to access the vector of observables that are defined in one Doxygen set.

Returns
a vector of type Observable()

Definition at line 64 of file doc/Developer Support/Doxygen Support/CorrelatedGaussianObservables.h.

65  {
66  return Obs;
67  }
void DoxyExample::setName ( std::string  name)
inline

A set method to fix the name of the set of Doxygen.

Parameters
namethe name

Definition at line 82 of file doc/Developer Support/Doxygen Support/CorrelatedGaussianObservables.h.

Member Data Documentation

gslpp::matrix<double>* DoxyExample::Cov
private

The covariance matrix.

Definition at line 98 of file doc/Developer Support/Doxygen Support/CorrelatedGaussianObservables.h.

std::string DoxyExample::name
private

The name of the correlated Gaussian Observables set.

Definition at line 99 of file doc/Developer Support/Doxygen Support/CorrelatedGaussianObservables.h.

std::vector<Observable> DoxyExample::Obs
private

A vector of observables whose correlation will be calculated.

Definition at line 97 of file doc/Developer Support/Doxygen Support/CorrelatedGaussianObservables.h.


The documentation for this class was generated from the following files: