WYRDTEK Home Features Reference Downloads About



int es_sc_addmean( struct es_sc *scalc, double val );


struct es_sc *scalc Statistics calculator.
double val Data-point value to be added.


Add data-point (val) to dataset, but only for purposes of computing the mean. Use es_sc_addmeanstd() instead to compute both mean and standard deviation (including variance).

Mean and standard deviation are computed incrementally so the user must choose either es_sc_addmean() or es_sc_addmeanstd() for specifying all data-points in a dataset.

Returns the number of data-points in the dataset after val has been added. This number never exceeds the "window" size used to construct the calculator (see es_sc_new()).

[Back To Reference] [Back To Reference/es_sc]