osl::stat::Variance Class Reference

incrementaly maintain average and variance of data sequence More...

`#include <variance.h>`

Inheritance diagram for osl::stat::Variance:

## Public Member Functions

| Variance ()
void | add (const double &x)
double | variance () const
double | average () const
int | numElements () const

## Private Types

typedef Average | base_t

## Private Attributes

double | m_variance

## Additional Inherited Members

Private Member Functions inherited from osl::stat::Average
| Average ()
double | add (const double &x)
| Add an element x.
void | merge (const Average &r)
void | clear (double a=0.0, int e=0)
double | average () const
int | numElements () const

## Detailed Description

incrementaly maintain average and variance of data sequence

Definition at line 14 of file variance.h.

## Member Typedef Documentation

## base_t

typedef Average osl::stat::Variance::base_t

private

Definition at line 17 of file variance.h.

## Constructor & Destructor Documentation

## Variance()

osl::stat::Variance::Variance | ( |  | ) |

inline

Definition at line 20 of file variance.h.

References m_variance.

## Member Function Documentation

## add()

void osl::stat::Variance::add | ( | const double & | x | ) |

inline

Definition at line 24 of file variance.h.

References osl::stat::Average::add(), m_variance, and numElements().

## average()

double osl::stat::Average::average | ( |  | ) | const

inline

Definition at line 48 of file average.h.

## numElements()

int osl::stat::Average::numElements | ( |  | ) | const

inline

Definition at line 49 of file average.h.

Referenced by add(), and variance().

## variance()

double osl::stat::Variance::variance | ( |  | ) | const

inline

Definition at line 33 of file variance.h.

References m_variance, and numElements().

## Member Data Documentation

## m_variance

double osl::stat::Variance::m_variance

private

Definition at line 16 of file variance.h.

Referenced by add(), Variance(), and variance().

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

- variance.h