#include <cumulative_statistics.hpp>
Public Member Functions | |
| void | clear () |
| CumulativeStatistics () | |
| T | mean () const |
| Current cumulative calculation of mean. | |
| void | push_back (const T &x) |
| T | size () const |
| T | variance () const |
| Current cumulative calculation of variance. | |
Private Attributes | |
| T | new_mean |
| T | new_variance |
| T | number_of_data |
| T | old_mean |
| T | old_variance |
Calculate cumulative mean and variance (i.e. without storage).
Definition at line 41 of file cumulative_statistics.hpp.
| ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::CumulativeStatistics | ( | ) | [inline] |
Definition at line 43 of file cumulative_statistics.hpp.
| void ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::clear | ( | ) | [inline] |
Definition at line 45 of file cumulative_statistics.hpp.
| T ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::mean | ( | ) | const [inline] |
Current cumulative calculation of mean.
Definition at line 83 of file cumulative_statistics.hpp.
| void ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::push_back | ( | const T & | x | ) | [inline] |
Catch the new data and update the cumulative calculations.
TODO it uses a float as a counter to increase the longevity of the cumulative calculation, however it really ought to handle the number_of_data rolling over problem.
| x | : new data |
Definition at line 55 of file cumulative_statistics.hpp.
| T ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::size | ( | ) | const [inline] |
Number of data used for statistics
Definition at line 77 of file cumulative_statistics.hpp.
| T ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::variance | ( | ) | const [inline] |
Current cumulative calculation of variance.
Definition at line 89 of file cumulative_statistics.hpp.
T ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::new_mean [private] |
Definition at line 94 of file cumulative_statistics.hpp.
T ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::new_variance [private] |
Definition at line 94 of file cumulative_statistics.hpp.
T ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::number_of_data [private] |
Definition at line 92 of file cumulative_statistics.hpp.
T ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::old_mean [private] |
Definition at line 93 of file cumulative_statistics.hpp.
T ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::old_variance [private] |
Definition at line 93 of file cumulative_statistics.hpp.