hpp::statistics::Bin Class Reference

Abstract class representing a bin. More...

#include <hpp/statistics/bin.hh>

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

List of all members.

Public Member Functions

const std::size_t & freq () const
 Return the number of element in the bin.
std::size_t operator++ ()
 Add an occurence.
std::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

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 [inline, virtual]

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.