Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
Histogram< Key, Value, BinType > Class Template Reference

Histogram class. More...

#include <Histogram.h>

List of all members.

Public Types

typedef OutOfRangeException OutOfRange

Public Member Functions

void addToBin (const Key &k, const Value &v)
BinType & bin (const Key &k)
const BinType & bin (const Key &k) const
void getMaxBin (BinType &bin, Key &k) const
template<class Comp >
void getMaxBin (BinType &bin, Key &k, Comp comp) const
 Histogram (const Key &min, const Key &max, const Key &binSize)
 Constructor.

Protected Types

typedef std::vector< BinType > Bins

Protected Member Functions

size_t getIdx (const Key &k) const
Key getKey (const size_t &idx) const

Protected Attributes

Bins mBins
Key mBinSize
Key mMax
Key mMin

Detailed Description

template<class Key, class Value, class BinType = Value>
class Histogram< Key, Value, BinType >

Histogram class.

Template Parameters:
Keyusually some number type. Key must support operators <,>,==,+,-,* and /.
Valuethe value type, which can be added to bins.
BinTypethe bin type. BinType must have operator+=(const Value& v).

Definition at line 50 of file Histogram.h.


Member Typedef Documentation

template<class Key, class Value, class BinType = Value>
typedef std::vector<BinType> Histogram< Key, Value, BinType >::Bins [protected]

Definition at line 70 of file Histogram.h.

template<class Key, class Value, class BinType = Value>
typedef OutOfRangeException Histogram< Key, Value, BinType >::OutOfRange

Definition at line 53 of file Histogram.h.


Constructor & Destructor Documentation

template<class Key, class Value, class BinType = Value>
Histogram< Key, Value, BinType >::Histogram ( const Key &  min,
const Key &  max,
const Key &  binSize 
) [inline]

Constructor.

Parameters:
minminimum key value (inclusive).
maxmaximum key value (inclusive). The key max itself is allocated to the last bin.
binSizethe size of one bin.

Definition at line 60 of file Histogram.h.


Member Function Documentation

template<class Key, class Value, class BinType = Value>
void Histogram< Key, Value, BinType >::addToBin ( const Key &  k,
const Value &  v 
) [inline]

Definition at line 65 of file Histogram.h.

template<class Key, class Value, class BinType = Value>
BinType& Histogram< Key, Value, BinType >::bin ( const Key &  k) [inline]

Definition at line 63 of file Histogram.h.

template<class Key, class Value, class BinType = Value>
const BinType& Histogram< Key, Value, BinType >::bin ( const Key &  k) const [inline]

Definition at line 64 of file Histogram.h.

template<class Key, class Value , class BinType >
size_t Histogram< Key, Value, BinType >::getIdx ( const Key &  k) const [protected]

Definition at line 78 of file Histogram.h.

template<class Key , class Value , class BinType >
Key Histogram< Key, Value, BinType >::getKey ( const size_t &  idx) const [protected]

Definition at line 88 of file Histogram.h.

template<class Key, class Value, class BinType = Value>
void Histogram< Key, Value, BinType >::getMaxBin ( BinType &  bin,
Key &  k 
) const [inline]

Definition at line 66 of file Histogram.h.

template<class Key, class Value , class BinType>
template<class Comp >
void Histogram< Key, Value, BinType >::getMaxBin ( BinType &  bin,
Key &  k,
Comp  comp 
) const

Definition at line 95 of file Histogram.h.


Member Data Documentation

template<class Key, class Value, class BinType = Value>
Bins Histogram< Key, Value, BinType >::mBins [protected]

Definition at line 74 of file Histogram.h.

template<class Key, class Value, class BinType = Value>
Key Histogram< Key, Value, BinType >::mBinSize [protected]

Definition at line 73 of file Histogram.h.

template<class Key, class Value, class BinType = Value>
Key Histogram< Key, Value, BinType >::mMax [protected]

Definition at line 73 of file Histogram.h.

template<class Key, class Value, class BinType = Value>
Key Histogram< Key, Value, BinType >::mMin [protected]

Definition at line 73 of file Histogram.h.


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


structure_coloring_fkie
Author(s): Bastian Gaspers
autogenerated on Sun Jan 5 2014 11:38:09