UFO
|
Represents a set of consecutive intervals (bins) of the same width. More...
#include <EquispacedBinSelector.h>
Public Types | |
typedef float | ValueType |
typedef int | IndexType |
Public Member Functions | |
EquispacedBinSelector (ValueType lowerBound, ValueType upperBound, IndexType numBins) | |
Partition the interval [lowerBound , upperBound ] into numBins bins of the same width. More... | |
IndexType | bin (ValueType value) const |
Return the (0-based) index of the bin containing value , or the nearest bin if value lies outside all bins. More... | |
IndexType | numBins () const |
Return the number of bins. More... | |
ValueType | binWidth () const |
Return the width of each bin. More... | |
ValueType | inverseBinWidth () const |
Return the inverse of the width of each bin. More... | |
ValueType | binCenter (IndexType bin) const |
Return the value lying at the center of the bin with index bin . More... | |
Private Attributes | |
ValueType | lowerBound_ |
ValueType | binWidth_ |
ValueType | inverseBinWidth_ |
IndexType | numBins_ |
Represents a set of consecutive intervals (bins) of the same width.
Call the bin() function to find the bin containing a particular value.
Definition at line 21 of file EquispacedBinSelector.h.
typedef int ufo::EquispacedBinSelector::IndexType |
Definition at line 26 of file EquispacedBinSelector.h.
typedef float ufo::EquispacedBinSelector::ValueType |
Definition at line 25 of file EquispacedBinSelector.h.
|
inline |
Partition the interval [lowerBound
, upperBound
] into numBins
bins of the same width.
Definition at line 30 of file EquispacedBinSelector.h.
Return the (0-based) index of the bin containing value
, or the nearest bin if value
lies outside all bins.
Definition at line 42 of file EquispacedBinSelector.h.
Return the value lying at the center of the bin with index bin
.
Definition at line 65 of file EquispacedBinSelector.h.
|
inline |
Return the width of each bin.
Definition at line 55 of file EquispacedBinSelector.h.
|
inline |
Return the inverse of the width of each bin.
Definition at line 60 of file EquispacedBinSelector.h.
|
inline |
Return the number of bins.
Definition at line 50 of file EquispacedBinSelector.h.
|
private |
Definition at line 71 of file EquispacedBinSelector.h.
|
private |
Definition at line 72 of file EquispacedBinSelector.h.
|
private |
Definition at line 70 of file EquispacedBinSelector.h.
|
private |
Definition at line 73 of file EquispacedBinSelector.h.