HistoStats Class Reference

HistoStats provides a histogram and additional statistical measures. More...

#include "HistoStats.hpp"

Public Types

typedef opals::Vector< std::pair< double, double > > PairOfDblVec
 vector of double pairs
typedef opals::Vector< std::pair< double, uint64_t > > DblInt64Vec
typedef DblInt64Vec AbsBinVector
 vector of histogram bins stored as std::pair More...
typedef PairOfDblVec RelBinVector
typedef RelBinVector BinVector
typedef PairOfDblVec QuantileVector
 deprecated: use AbsBinVector or RelBinVector instead More...

Public Member Functions

void setHistoStats (const long long &CountData, const long long &CountUsed, const double &Min, const double &Max, const double &Mean, const double &Median, const double &Mode, const double &StdDev, const double &Rms, const double &StdDevMAD, const double &Skewness, const opals::HistoMode &CalcMode, const QuantileVector &Quantiles, const AbsBinVector &Bins, const double &BinWidth)
 access functions
void setCountData (const double &Count)
void setCountUsed (const double &Count)
void setMin (const double &Min)
void setMax (const double &Max)
void setMean (const double &Mean)
void setMedian (const double &Median)
void setMode (const double &Mode)
void setStdDev (const double &StdDev)
void setRms (const double &Rms)
void setStdDevMAD (const double &StdDev)
void setSkewness (const double &Skewness)
void setQuantiles (const QuantileVector &Quantiles)
void setAbsBins (const AbsBinVector &Bins)
void setBinWidth (const double &BinWidth)
void setCalcMode (const opals::HistoMode CalcMode)
void setLabel (const opals::String &Label)
void setExactComputation (bool flag)
long long getCountData () const
 query functions
long long getCountUsed () const
double getMin () const
double getMax () const
double getMean () const
double getMedian () const
double getMode () const
double getStdDev () const
double getRms () const
double getStdDevMAD () const
double getSkewness () const
QuantileVector getQuantiles () const
RelBinVector getRelBins () const
 get bin vector with relative frequency values
double getBinWidth () const
opals::HistoMode getCalcMode () const
const opals::StringgetLabel () const
bool getExactComputation () const
BinVector getBins () const
String logHistoStats (bool absBins=true) const
 deprecated: use getRelBins instead More...
String printHistoStats (bool absBins=true, unsigned maxBins=0) const
 for xml output
String printRelBins (unsigned maxBins=0, double lowerQuantile=0.05, double upperQuantile=0.95) const
 for log output (in more readable format)
String printRelAbsBins () const

Detailed Description

HistoStats provides a histogram and additional statistical measures.

HistoStats provides a histogram and additional statistical measures like min, max, mean, median ... of certain data sample. The histogram in particular is stored as a std::vector of std:pairs, each of which stores the data of a single histogram bin (class) with its lower boundary (first) and relative frequency (second). The first bin contains all underflow values, followed by the regular bins of
constant width. The last class contains all overflow values. Absolute frequencies can be obtained by multiplying the relative frequencies with the total number of samples (countUsed). Additionally, several standard statistical values are provided (min, max, mean, median...)


Member Typedef Documentation

◆ AbsBinVector

vector of histogram bins stored as std::pair

first: lower bound of bin, second: absolute or relative frequency

◆ QuantileVector

deprecated: use AbsBinVector or RelBinVector instead

vector of quantiles first: probabilities (double: 0 <= p <= 1), second: according quantiles

Member Function Documentation

◆ logHistoStats()

String logHistoStats ( bool  absBins = true) const

deprecated: use getRelBins instead

output functions