Go to the documentation of this file.
6 #ifndef OPENMPCD_HISTOGRAM_HPP
7 #define OPENMPCD_HISTOGRAM_HPP
41 : bins(binCount, 0), underflows(0), overflows(0), lowEnd(low), highEnd(high),
42 binSize((high-low)/binCount)
124 void save(
const std::string& filename,
const FP binPoint=0.5)
const;
FP getIntegral() const
Returns the integral of the histogram.
Represents the configuration of the simulation.
FP getHighEnd() const
Returns the upper end of the histogram.
FP getLowEnd() const
Returns the lower end of the histogram.
Histogram(const FP low, const FP high, const unsigned int binCount)
The constructor.
BinContent getUnderflows() const
Returns the number of underflows.
const Graph getNormalizedGraph(const FP binPoint=0.5) const
Returns the graph corresponding to this histogram, with the area normalized to 1.
FP getBinSize() const
Returns the bin size.
BinContent getOverflows() const
Returns the number of overflows.
void save(const std::string &filename, const FP binPoint=0.5) const
Saves the histogram at the given path.
unsigned long BinContent
The type of bin contents.
double FP
Default floating point type.
void fill(const FP val)
Adds an entry to the histogram.
Histogram(const std::string &name, const Configuration &conf)
The constructor.
const Container & getBins() const
Returns the bins.
std::vector< BinContent > Container
The container for bins.