hpp-statistics: hpp::statistics::SuccessStatistics Class Reference

hpp-statistics 9.0.2 Classes for doing statistics.

Public Types | Public Member Functions | Public Attributes | List of all members
hpp::statistics::SuccessStatistics Class Reference

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

Inheritance diagram for hpp::statistics::SuccessStatistics:
[legend]
Collaboration diagram for hpp::statistics::SuccessStatistics:
[legend]

## Public Types
typedef Statistics< SuccessBin > | Parent
Public Types inherited from hpp::statistics::Statistics< SuccessBin >
typedef std::list< SuccessBin > | Container
typedef Container::iterator | iterator
typedef Container::const_iterator | const_iterator

## Public Member Functions
| SuccessStatistics (const std::string name="", const std::size_t &logRatio=2)
| Constructor. More...
| SuccessStatistics (const SuccessStatistics &other)
| Copy Constructor. More...
void | addSuccess ()
| Add a 'success'. More...
void | addFailure (const SuccessBin::Reason &r=SuccessBin::REASON_UNKNOWN)
bool | isLowRatio (const bool autoPrint=false) const
std::size_t | nbSuccess () const
| Count the number of success. More...
std::size_t | nbFailure () const
| Count the number of failure, in total. More...
std::size_t | nbFailure (const SuccessBin::Reason &r) const
| Count the number of a particular failure. More...
Public Member Functions inherited from hpp::statistics::Statistics< SuccessBin >
virtual std::size_t | freq (const SuccessBin &bin) const
virtual Proba_t | relativeFreq (const SuccessBin &bin) const
std::size_t | numberOfObservations () const
unsigned int | numberOfBins () const
| Return the number of bins. 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
const_iterator | end () const
void | clear ()
| Remove all element. More...

## Public Attributes
std::string | name_
std::size_t | logRatio_
| If nbSuccess() * logRatio < numberOfObservations(), write to log. More...

## Additional Inherited Members
Protected Member Functions inherited from hpp::statistics::Statistics< SuccessBin >
| Statistics ()
| Constructor. More...
virtual SuccessBin & | increment (const SuccessBin &bin) __attribute__((deprecated))
virtual iterator | insert (const SuccessBin &bin)

## Member Typedef Documentation

## ◆ Parent

typedef Statistics<SuccessBin> hpp::statistics::SuccessStatistics::Parent

## Constructor & Destructor Documentation

## ◆ SuccessStatistics() [1/2]

hpp::statistics::SuccessStatistics::SuccessStatistics | ( | const std::string | name = `""`,
|  | const std::size_t & | logRatio = `2`
| ) |  |
| inline

Constructor.

## ◆ SuccessStatistics() [2/2]

hpp::statistics::SuccessStatistics::SuccessStatistics | ( | const SuccessStatistics & | other | ) |
| inline

Copy Constructor.

## Member Function Documentation

## ◆ addFailure()

void hpp::statistics::SuccessStatistics::addFailure | ( | const SuccessBin::Reason & | r = `SuccessBin::REASON_UNKNOWN` | ) |
| inline

Add a 'failure'

Parameters

  r | the 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 | ( |  | ) |
| inline

Add a 'success'.

## ◆ isLowRatio()

bool hpp::statistics::SuccessStatistics::isLowRatio | ( | const bool | autoPrint = `false` | ) | const
| inline

## ◆ nbFailure() [1/2]

std::size_t hpp::statistics::SuccessStatistics::nbFailure | ( |  | ) | const
| inline

Count the number of failure, in total.

## ◆ nbFailure() [2/2]

std::size_t hpp::statistics::SuccessStatistics::nbFailure | ( | const SuccessBin::Reason & | r | ) | const
| inline

Count the number of a particular failure.

## ◆ nbSuccess()

std::size_t hpp::statistics::SuccessStatistics::nbSuccess | ( |  | ) | const
| inline

Count the number of success.

## Member Data Documentation

## ◆ logRatio_

std::size_t hpp::statistics::SuccessStatistics::logRatio_

If nbSuccess() * logRatio < numberOfObservations(), write to log.

## ◆ name_

std::string hpp::statistics::SuccessStatistics::name_

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

- include/hpp/statistics/success-bin.hh