hpp::statistics::Bin Class Referenceabstract

Abstract class representing a bin. More...

#include <hpp/statistics/bin.hh>

Inheritance diagram for hpp::statistics::Bin:
[legend]

Public Member Functions

const std::size_t & freq () const
 Return the number of element in the bin. More...
 
std::size_t operator++ ()
 Add an occurence. More...
 
std::size_t operator++ (int)
 Add an occurence. More...
 
virtual std::ostream & print (std::ostream &os) const
 Print the bin. More...
 
virtual std::ostream & printValue (std::ostream &os) const =0
 Print the inner value of the bin. More...
 

Protected Member Functions

 Bin ()
 Constructor. More...
 

Detailed Description

Abstract class representing a bin.

Bins are use for statistics. They keep the number of of apparition of a given value. Inherited class should also implement comparison and equality operators.

Constructor & Destructor Documentation

hpp::statistics::Bin::Bin ( )
inlineprotected

Constructor.

Member Function Documentation

const std::size_t& hpp::statistics::Bin::freq ( ) const
inline

Return the number of element in the bin.

std::size_t hpp::statistics::Bin::operator++ ( )
inline

Add an occurence.

Returns
The frequency after increment;
std::size_t hpp::statistics::Bin::operator++ ( int  )
inline

Add an occurence.

Returns
The frequency before increment;
virtual std::ostream& hpp::statistics::Bin::print ( std::ostream &  os) const
inlinevirtual

Print the bin.

Referenced by hpp::statistics::operator<<().

virtual std::ostream& hpp::statistics::Bin::printValue ( std::ostream &  os) const
pure virtual

Print the inner value of the bin.