#include <misc_stat.h>
Public Member Functions | |
Stat () | |
Default constructor. | |
virtual | ~Stat () |
Destructor. | |
virtual void | clear () |
Clear statistics. | |
virtual void | sample (const double s, const bool overflow=false) |
Register a sample and flag for overflow. | |
int | n_overflows () const |
Number of reported overflows. | |
int | n_samples () const |
Number of samples. | |
int | n_zeros () const |
Number of zero samples. | |
double | avg () const |
Average over all samples. | |
double | max () const |
Maximum sample. | |
double | min () const |
Minimum sample. | |
double | sigma () const |
Standard deviation of all samples. | |
double | sqr_sum () const |
Squared sum of all samples. | |
double | sum () const |
Sum of all samples. | |
vec | histogram () const |
Histogram over all samples (not implemented yet). | |
Protected Attributes | |
int | _n_overflows |
Number of reported overflows. | |
int | _n_samples |
Number of samples. | |
int | _n_zeros |
Number of zero samples. | |
double | _max |
Maximum sample. | |
double | _min |
Minimum sample. | |
double | _sqr_sum |
Squared sum of all samples. | |
double | _sum |
Sum of all samples. |