GLAC  1.0
Public Member Functions
ObservableStorer Class Reference

A class for storing the observable data. More...

#include <observablestorer.h>

Public Member Functions

 ObservableStorer (unsigned long int NSize)
 ObservableStorer::ObservableStorer. More...
 
 ~ObservableStorer ()
 
double & operator[] (unsigned long int iObs)
 
void gatherResults ()
 ObservableStorer::gatherResults. More...
 
void runStatistics ()
 ObservableStorer::runStatistics. More...
 
void printStatistics ()
 
void writeObservableToFile (double acceptanceRatio)
 ObservableStorer::writeObservableToFile. More...
 
void writeFlowObservableToFile (unsigned long int configNumber)
 ObservableStorer::writeFlowObservableToFile. More...
 
std::vector< double > getObservableArray ()
 
double getObservable (unsigned long int iObs)
 
std::string getObservableName ()
 
void setObservableName (std::string observableName)
 
void setNormalizeObservableByProcessor (bool norm)
 
void reset ()
 ObservableStorer::reset set all the members for observable storage to zero. More...
 

Detailed Description

A class for storing the observable data.

Contains methods for printing statistics, writing to file, setting observables and reseting ect.

Author
Mathias M. Vege
Version
1.0
Date
2017-2019

Constructor & Destructor Documentation

◆ ObservableStorer()

ObservableStorer::ObservableStorer ( unsigned long int  NSize)

ObservableStorer::ObservableStorer.

Parameters
NSizethe number of observables to allow storage for.

Stores two arrays, one for observables, and one for observables squared.

◆ ~ObservableStorer()

ObservableStorer::~ObservableStorer ( )

Member Function Documentation

◆ gatherResults()

void ObservableStorer::gatherResults ( )

ObservableStorer::gatherResults.

Performs a MPI reduce between all the data gathered and, if set - divides by the number of processors.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getObservable()

double ObservableStorer::getObservable ( unsigned long int  iObs)
inline
Here is the caller graph for this function:

◆ getObservableArray()

std::vector<double> ObservableStorer::getObservableArray ( )
inline
Here is the caller graph for this function:

◆ getObservableName()

std::string ObservableStorer::getObservableName ( )
inline
Here is the caller graph for this function:

◆ operator[]()

double& ObservableStorer::operator[] ( unsigned long int  iObs)
inline

◆ printStatistics()

void ObservableStorer::printStatistics ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void ObservableStorer::reset ( )

ObservableStorer::reset set all the members for observable storage to zero.

Here is the caller graph for this function:

◆ runStatistics()

void ObservableStorer::runStatistics ( )

ObservableStorer::runStatistics.

Performs simple statistics such as mean, variance and standard deviation.

Here is the caller graph for this function:

◆ setNormalizeObservableByProcessor()

void ObservableStorer::setNormalizeObservableByProcessor ( bool  norm)
inline
Here is the caller graph for this function:

◆ setObservableName()

void ObservableStorer::setObservableName ( std::string  observableName)
inline
Here is the caller graph for this function:

◆ writeFlowObservableToFile()

void ObservableStorer::writeFlowObservableToFile ( unsigned long int  configNumber)

ObservableStorer::writeFlowObservableToFile.

Parameters
configNumberconfiguration number

Writes to file using the IO::writeFlowObservableToFile method.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeObservableToFile()

void ObservableStorer::writeObservableToFile ( double  acceptanceRatio)

ObservableStorer::writeObservableToFile.

Parameters
acceptanceRatiofrom the Metropolis algorithm

Writes to file using the IO::writeObservablesToFile method.

Here is the call graph for this function:
Here is the caller graph for this function:

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