incrementaly maintain average of data sequence More...
#include <average.h>
Public Member Functions | |
Average () | |
double | add (const double &x) |
Add an element x. | |
void | merge (const Average &r) |
void | clear () |
double | getAverage () const |
int | numElements () const |
Private Attributes | |
double | average |
int | elements |
osl::stat::Average::Average | ( | ) | [inline] |
double osl::stat::Average::add | ( | const double & | x | ) | [inline] |
Add an element x.
Reimplemented in osl::stat::Variance.
Definition at line 27 of file average.h.
References average, and elements.
Referenced by osl::stat::TwoDimensionalStatistics::Data::add(), osl::stat::Ratio::add(), osl::stat::Variance::add(), osl::search::AlphaBeta3::search(), show(), and test_position().
void osl::stat::Average::clear | ( | ) | [inline] |
Definition at line 42 of file average.h.
References average, and elements.
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 average.
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 average, and elements.
Referenced by osl::stat::TwoDimensionalStatistics::Data::merge().
int osl::stat::Average::numElements | ( | ) | const [inline] |
Definition at line 49 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().
double osl::stat::Average::average [private] |
int osl::stat::Average::elements [private] |