AddValue()
, providing raw data, pdf and CDF.
More...
#include <dehistogram.h>
Public Member Functions | |
DEHistogram (double _BinWidth=1.0, double _BinStart=0.0) | |
Constructs a Histogram with spacified parameters. | |
bool | SetParams (double _BinWidth=1.0, double _BinStart=0.0) |
Set parameters for the Histogram. | |
void | Reset () |
Resets all collected statistics. | |
void | AddValue (double x) |
Add value x to currently collected statistics. | |
double | Mean () |
Returns the mean of the collected data. | |
double | SqMean () |
Returns the square mean of the collected data. | |
double | Variance () |
Returns the variance of the collected data. | |
double | Num () |
Returns the number of collected data. | |
void | printHisto (ostream &s) |
Prints the histogram in readable form on stream s. |
AddValue()
, providing raw data, pdf and CDF.
This class automatically generates an histogram of the observed values, grouped in bins.
The number of the bins is automatically expanded, so it is unnecessary to define them a-priori. Each bin width and the bin start (i.e., if the bins are zero-centered or not) can be specified in the probe constructor. Note that to have a zero-centered histogram (i.e., where the central bin is centered in zero), BinStart must be equal to BinWidth/2.
The class measures the (
),
(
) and
(
), where
is the value of bin
, as is the number of observed values falling in the
-th bin.
|
Constructs a Histogram with spacified parameters.
|
|
Prints the histogram in readable form on stream s. The output file format is: # N = number of observations
# Mean =
# Square Mean =
# Variance = # BinWidth = your bin width # BinStart = your bin start
start of bin 0 TAB
start of bin 1 TAB etc. |
|
Set parameters for the Histogram.
|