Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Public Member Functions | |
void | new_val (T x) |
double | mean () const |
double | variance () const |
double | std () const |
Private Attributes | |
unsigned int | n = 0 |
double | Ex |
double | Ex2 |
T | K |
Friends | |
std::istream & | operator>> (std::istream &input, stats_computer1 &stat) |
continuous mean and variance computance using first value as an approximation for the mean. If the first number is much far form the mean, the algorithm becomes very inaccurate to compute variance and standard deviation.
|
inline |
return sample mean computed till last sample
|
inline |
Constructor
[in] | x | new data sample |
|
inline |
return sample standard deviation computed till last sample
|
inline |
return data variance computed till last sample
|
friend |