Accum computes minimum, maximum, mean-value, divergence and number of samples (size) according to the simulation time (see Tally). A value of 1 hold for 4 time units together with a value of 0 hold for 1 time unit will result in a mean value of (1*4 + 0*1)/5 = 0.2 .
Public Member Functions | |
Accum (Simulation *s, Label title="") | |
Construction. | |
virtual | ~Accum () |
Destruction. | |
virtual void | update (double v) |
Update statistics. | |
virtual void | reset () |
Reset statistics. | |
unsigned int | getSize () const |
Get number of samples. | |
double | getMin () const |
Get minimum. | |
double | getMax () const |
Get maximum. | |
double | getMean () const |
Get average (over time). | |
double | getDivergence () const |
Get divergence. | |
virtual void | report (Report *r) |
Report generation. | |
Protected Attributes | |
double | sumt |
double | sumsqt |
double | min |
double | max |
double | lasttime |
double | lastv |