osl::stat::Average Class Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Attributes | List of all members
osl::stat::Average Class Reference

incrementaly maintain average of data sequence More...

`#include <average.h>`

Inheritance diagram for osl::stat::Average:
[legend]

## Public Member Functions
| Average ()
double | add (const double &x)
| Add an element x. More...
void | merge (const Average &r)
void | clear (double a=0.0, int e=0)
double | getAverage () const
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

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

Definition at line 19 of file average.h.

## Member Function Documentation

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.

References elements, and mean.

Referenced by osl::stat::TwoDimensionalStatistics::Data::add(), osl::stat::Ratio::add(), osl::stat::Variance::add(), osl::search::AlphaBeta3::search(), show(), and test_position().

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

Definition at line 49 of file average.h.

References mean.

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

Definition at line 42 of file average.h.

References elements, and mean.

Referenced by osl::stat::Ratio::clear(), osl::stat::TwoDimensionalStatistics::Data::clear(), and osl::search::AlphaBeta3::computeBestMoveIteratively().

double osl::stat::Average::getAverage | ( | ) |  | const
| inline

Definition at line 48 of file average.h.

References mean.

Referenced by osl::search::AlphaBeta3::computeBestMoveIteratively(), main(), osl::stat::Ratio::ratio(), and osl::checkmate::DualDfpn::Shared::showStats().

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

Definition at line 34 of file average.h.

References elements, and mean.

Referenced by osl::stat::TwoDimensionalStatistics::Data::merge().

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

Definition at line 50 of file average.h.

References elements.

Referenced by osl::stat::Variance::add(), osl::checkmate::DualDfpn::Shared::showStats(), osl::stat::Variance::variance(), and osl::stat::Ratio::~Ratio().

## Member Data Documentation

int osl::stat::Average::elements
| private

Definition at line 16 of file average.h.

Referenced by add(), clear(), merge(), and numElements().

double osl::stat::Average::mean
| private

Definition at line 15 of file average.h.

Referenced by add(), average(), clear(), getAverage(), and merge().

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

- average.h