Template class to do statistics. More...
#include <hpp/statistics/fwd.hh>
Public Types | |
typedef std::list< T > | Container |
typedef Container::iterator | iterator |
typedef Container::const_iterator | const_iterator |
Public Member Functions | |
virtual size_t | freq (const T &bin) const |
Return the number of occurence of a Bin. More... | |
virtual Proba_t | relativeFreq (const T &bin) const |
Return the relative frequency of a Bin. More... | |
unsigned int | numberOfObservations () const |
Return the number of times a observation has recorded. More... | |
virtual std::ostream & | print (std::ostream &os) const |
Put the results in a stream. More... | |
const_iterator | find (const T &bin) const |
template<typename U > | |
const_iterator | find (const U &value) const |
const_iterator | begin () const |
Return an iterator pointing at the beginning of the set of bins. More... | |
const_iterator | end () const |
Return an iterator pointing at the end of the set of bins. More... | |
Protected Member Functions | |
Statistics () | |
Constructor. More... | |
virtual T & | increment (const T &bin) __attribute__((deprecated)) |
Increment a Bin. More... | |
virtual iterator | insert (const T &bin) |
insert a Bin. More... | |
Template class to do statistics.
You should derivate class Bin and construct a class Statistics < YourBin >.
typedef Container::const_iterator hpp::statistics::Statistics< T >::const_iterator |
typedef std::list< T > hpp::statistics::Statistics< T >::Container |
typedef Container::iterator hpp::statistics::Statistics< T >::iterator |
|
protected |
Constructor.
|
inline |
Return an iterator pointing at the beginning of the set of bins.
Referenced by hpp::statistics::Statistics< SuccessBin >::increment(), and hpp::statistics::Statistics< SuccessBin >::insert().
|
inline |
Return an iterator pointing at the end of the set of bins.
Referenced by hpp::statistics::Statistics< SuccessBin >::find().
Statistics< T >::const_iterator hpp::statistics::Statistics< T >::find | ( | const T & | bin | ) | const |
Statistics< T >::const_iterator hpp::statistics::Statistics< T >::find | ( | const U & | value | ) | const |
|
virtual |
Return the number of occurence of a Bin.
bin | a Bin for which only the value is useful. |
Referenced by hpp::statistics::Statistics< SuccessBin >::freq(), and hpp::statistics::Statistics< SuccessBin >::relativeFreq().
|
protectedvirtual |
Increment a Bin.
|
protectedvirtual |
insert a Bin.
|
inline |
Return the number of times a observation has recorded.
It is the total number of observations.
|
virtual |
Put the results in a stream.
|
virtual |