#include <Histogram.h>
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 |
Histogram class.
| Key | usually some number type. Key must support operators <,>,==,+,-,* and /. |
| Value | the value type, which can be added to bins. |
| BinType | the bin type. BinType must have operator+=(const Value& v). |
Definition at line 50 of file Histogram.h.
typedef std::vector<BinType> Histogram< Key, Value, BinType >::Bins [protected] |
Definition at line 70 of file Histogram.h.
| typedef OutOfRangeException Histogram< Key, Value, BinType >::OutOfRange |
Definition at line 53 of file Histogram.h.
| Histogram< Key, Value, BinType >::Histogram | ( | const Key & | min, |
| const Key & | max, | ||
| const Key & | binSize | ||
| ) | [inline] |
Constructor.
| min | minimum key value (inclusive). |
| max | maximum key value (inclusive). The key max itself is allocated to the last bin. |
| binSize | the size of one bin. |
Definition at line 60 of file Histogram.h.
| void Histogram< Key, Value, BinType >::addToBin | ( | const Key & | k, |
| const Value & | v | ||
| ) | [inline] |
Definition at line 65 of file Histogram.h.
| BinType& Histogram< Key, Value, BinType >::bin | ( | const Key & | k | ) | [inline] |
Definition at line 63 of file Histogram.h.
| const BinType& Histogram< Key, Value, BinType >::bin | ( | const Key & | k | ) | const [inline] |
Definition at line 64 of file Histogram.h.
| size_t Histogram< Key, Value, BinType >::getIdx | ( | const Key & | k | ) | const [protected] |
Definition at line 78 of file Histogram.h.
| Key Histogram< Key, Value, BinType >::getKey | ( | const size_t & | idx | ) | const [protected] |
Definition at line 88 of file Histogram.h.
| void Histogram< Key, Value, BinType >::getMaxBin | ( | BinType & | bin, |
| Key & | k | ||
| ) | const [inline] |
Definition at line 66 of file Histogram.h.
| void Histogram< Key, Value, BinType >::getMaxBin | ( | BinType & | bin, |
| Key & | k, | ||
| Comp | comp | ||
| ) | const |
Definition at line 95 of file Histogram.h.
Bins Histogram< Key, Value, BinType >::mBins [protected] |
Definition at line 74 of file Histogram.h.
Key Histogram< Key, Value, BinType >::mBinSize [protected] |
Definition at line 73 of file Histogram.h.
Key Histogram< Key, Value, BinType >::mMax [protected] |
Definition at line 73 of file Histogram.h.
Key Histogram< Key, Value, BinType >::mMin [protected] |
Definition at line 73 of file Histogram.h.