osl::Average Class Reference

incrementaly maintain average of data sequence More...

`#include <average.h>`

Inheritance diagram for osl::Average:

## Public Member Functions

| 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

## Private Attributes

double | mean
int | elements

## Detailed Description

incrementaly maintain average of data sequence

Definition at line 13 of file average.h.

## Constructor & Destructor Documentation

## Average()

osl::stat::Average::Average | ( |  | ) |

inline

Definition at line 19 of file average.h.

## Member Function Documentation

## add()

double osl::stat::Average::add | ( | const double & | x | ) |

inline

Add an element x.

Returns
  difference between x and (old) mean

Definition at line 27 of file average.h.

## average()

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

inline

Definition at line 48 of file average.h.

## clear()

void osl::stat::Average::clear | ( | double | a = 0.0,
|  | int | e = 0 )

inline

Definition at line 42 of file average.h.

## merge()

void osl::stat::Average::merge | ( | const Average & | r | ) |

inline

Definition at line 34 of file average.h.

## numElements()

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

inline

Definition at line 49 of file average.h.

## Member Data Documentation

## elements

int osl::stat::Average::elements

private

Definition at line 16 of file average.h.

## mean

double osl::stat::Average::mean

private

Definition at line 15 of file average.h.

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

- average.h