hpp::statistics::Bin Class Reference

Abstract class representing a bin. More...

#include <hpp/statistics/bin.hh>

Inheritance diagram for hpp::statistics::Bin:

List of all members.

Public Member Functions

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

Protected Member Functions

 Bin ()
 Constructor.

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 ( ) [inline, protected]

Constructor.


Member Function Documentation

size_t hpp::statistics::Bin::freq ( ) const [inline]

Return the number of element in the bin.

size_t hpp::statistics::Bin::operator++ ( ) [inline]

Add an occurence.

Returns:
The frequency after increment;
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 [virtual]

Print the bin.

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

Print the inner value of the bin.