24void statistics::init(
const double& v,
unsigned int n) { min = max = v; sum = n*v; sms = n*v*v; cnt = n; }
54 double E2 = sms / cnt;
72std::ostream& operator << (std::ostream& os,
const statistics& s)
incrementally accumulate statistical information
double get_sum_of_squares() const
get the sum of the squares of the considered variables
void update(const double &v)
consider another value
unsigned int get_count() const
get the number of considered variables
double get_average() const
compute average of the considered values
double get_max() const
get the maximum of the considered variables
double get_standard_deviation() const
compute standard deviation of the considered values
double get_sum() const
get the sum of the considered variables
double get_min() const
get the minimum of the considered variables
statistics()
initialize with no value considered yet
double get_variance() const
compute variance of the considered values