|
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 |
|
inline |
|
inline |
return sample standard deviation computed till last sample
|
inline |
|
friend |
short-hand operator to read new sample from input stream
e.g.: std::cin >> stats1;