hpp::statistics::SuccessStatistics Class Reference

#include <hpp/statistics/success-bin.hh>

Inheritance diagram for hpp::statistics::SuccessStatistics:
Collaboration diagram for hpp::statistics::SuccessStatistics:

Public Types

typedef Statistics< SuccessBinParent
 
- Public Types inherited from hpp::statistics::Statistics< SuccessBin >
typedef std::list< SuccessBinContainer
 
typedef Container::iterator iterator
 
typedef Container::const_iterator const_iterator
 

Public Member Functions

 SuccessStatistics ()
 Constructor. More...
 
void addSuccess ()
 Add a 'success'. More...
 
void addFailure (const SuccessBin::Reason &r=SuccessBin::REASON_UNKNOWN)
 Add a 'failure'. More...
 
unsigned int nbSuccess () const
 Count the number of success. More...
 
unsigned int nbFailure () const
 Count the number of failure, in total. More...
 
unsigned int nbFailure (const SuccessBin::Reason &r) const
 Count the number of a particular failure. More...
 
- Public Member Functions inherited from hpp::statistics::Statistics< SuccessBin >
virtual size_t freq (const SuccessBin &bin) const
 Return the number of occurence of a Bin. More...
 
virtual Proba_t relativeFreq (const SuccessBin &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 SuccessBin &bin) const
 
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...
 

Additional Inherited Members

- Protected Member Functions inherited from hpp::statistics::Statistics< SuccessBin >
 Statistics ()
 Constructor. More...
 
virtual SuccessBinincrement (const SuccessBin &bin) __attribute__((deprecated))
 Increment a Bin. More...
 
virtual iterator insert (const SuccessBin &bin)
 insert a Bin. More...
 

Member Typedef Documentation

◆ Parent

Constructor & Destructor Documentation

◆ SuccessStatistics()

hpp::statistics::SuccessStatistics::SuccessStatistics ( )

Constructor.

Member Function Documentation

◆ addFailure()

void hpp::statistics::SuccessStatistics::addFailure ( const SuccessBin::Reason r = SuccessBin::REASON_UNKNOWN)

Add a 'failure'.

Parameters
rthe reason of the 'failure'
Note
Use macro DEFINE_REASON_FAILURE (REASON_NAME, 'Reason details') to define a new reason.

◆ addSuccess()

void hpp::statistics::SuccessStatistics::addSuccess ( )

Add a 'success'.

◆ nbFailure() [1/2]

unsigned int hpp::statistics::SuccessStatistics::nbFailure ( ) const

Count the number of failure, in total.

◆ nbFailure() [2/2]

unsigned int hpp::statistics::SuccessStatistics::nbFailure ( const SuccessBin::Reason r) const

Count the number of a particular failure.

◆ nbSuccess()

unsigned int hpp::statistics::SuccessStatistics::nbSuccess ( ) const

Count the number of success.