Public Member Functions | Private Attributes
ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type > Class Template Reference

#include <cumulative_statistics.hpp>

List of all members.

Public Member Functions

void clear ()
 CumulativeStatistics ()
mean () const
 Current cumulative calculation of mean.
void push_back (const T &x)
size () const
variance () const
 Current cumulative calculation of variance.

Private Attributes

new_mean
new_variance
number_of_data
old_mean
old_variance

Detailed Description

template<typename T>
class ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >

Calculate cumulative mean and variance (i.e. without storage).

Definition at line 41 of file cumulative_statistics.hpp.


Constructor & Destructor Documentation

template<typename T >
ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::CumulativeStatistics ( ) [inline]

Definition at line 43 of file cumulative_statistics.hpp.


Member Function Documentation

template<typename T >
void ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::clear ( ) [inline]

Definition at line 45 of file cumulative_statistics.hpp.

template<typename T >
T ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::mean ( ) const [inline]

Current cumulative calculation of mean.

Returns:
T or 0.0 if there is not yet data.

Definition at line 83 of file cumulative_statistics.hpp.

template<typename T >
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.

Parameters:
x: new data

Definition at line 55 of file cumulative_statistics.hpp.

template<typename T >
T ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::size ( ) const [inline]

Number of data used for statistics

Returns:
T

Definition at line 77 of file cumulative_statistics.hpp.

template<typename T >
T ecl::CumulativeStatistics< T, typename ecl::enable_if< ecl::is_float< T > >::type >::variance ( ) const [inline]

Current cumulative calculation of variance.

Returns:
T or 0.0 if there is not yet data.

Definition at line 89 of file cumulative_statistics.hpp.


Member Data Documentation

template<typename T >
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.

template<typename T >
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.

template<typename T >
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.

template<typename T >
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.

template<typename T >
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.


The documentation for this class was generated from the following file:


ecl_statistics
Author(s): Daniel Stonier
autogenerated on Thu Jun 6 2019 21:17:39