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]

List of all members.

Public Types

typedef Statistics< SuccessBinParent

Public Member Functions

 SuccessStatistics (const std::string name="", const std::size_t &logRatio=2)
 Constructor.
 SuccessStatistics (const SuccessStatistics &other)
 Copy Constructor.
void addSuccess ()
 Add a 'success'.
void addFailure (const SuccessBin::Reason &r=SuccessBin::REASON_UNKNOWN)
 Add a 'failure'.
bool isLowRatio (const bool autoPrint=false) const
std::size_t nbSuccess () const
 Count the number of success.
std::size_t nbFailure () const
 Count the number of failure, in total.
std::size_t nbFailure (const SuccessBin::Reason &r) const
 Count the number of a particular failure.

Public Attributes

std::string name_
std::size_t logRatio_
 If nbSuccess() * logRatio < numberOfObservations(), write to log.

Member Typedef Documentation


Constructor & Destructor Documentation

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

Constructor.

hpp::statistics::SuccessStatistics::SuccessStatistics ( const SuccessStatistics other) [inline]

Copy Constructor.


Member Function Documentation

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

Add a 'failure'.

Parameters:
rthe reason of the 'failure'
Note:
Use macro DEFINE_REASON_FAILURE (REASON_NAME, 'Reason details') to define a new reason.
void hpp::statistics::SuccessStatistics::addSuccess ( ) [inline]

Add a 'success'.

bool hpp::statistics::SuccessStatistics::isLowRatio ( const bool  autoPrint = false) const [inline]

References hppDout.

std::size_t hpp::statistics::SuccessStatistics::nbFailure ( ) const [inline]

Count the number of failure, in total.

std::size_t hpp::statistics::SuccessStatistics::nbFailure ( const SuccessBin::Reason r) const [inline]

Count the number of a particular failure.

std::size_t hpp::statistics::SuccessStatistics::nbSuccess ( ) const [inline]

Count the number of success.


Member Data Documentation