UFO
|
Represents a finite set of consecutive intervals (bins) of the same width, each closed from the left and open from the right. More...
#include <TruncatingEquispacedBinSelector.h>
Public Types | |
typedef float | ValueType |
typedef int | IndexType |
![]() | |
typedef float | ValueType |
typedef int | IndexType |
Public Member Functions | |
TruncatingEquispacedBinSelector (ValueType lowerBound, ValueType upperBound, IndexType numBins) | |
Partition the interval [lowerBound , upperBound ) into numBins bins of the same width. More... | |
IndexType | bin (ValueType value) const override |
Return the index of the bin containing value , or the nearest bin if value lies outside all bins. More... | |
boost::optional< IndexType > | numBins () const override |
Return the number of bins or boost::none if the bin collection is infinite. More... | |
ValueType | binWidth () const override |
Return the width of each bin. More... | |
ValueType | inverseBinWidth () const override |
Return the inverse of the width of each bin. More... | |
ValueType | binCenter (IndexType bin) const override |
Return the value lying at the center of the bin with index bin . More... | |
![]() | |
virtual | ~EquispacedBinSelectorBase () |
Private Attributes | |
ValueType | lowerBound_ |
ValueType | binWidth_ |
ValueType | inverseBinWidth_ |
IndexType | numBins_ |
Represents a finite set of consecutive intervals (bins) of the same width, each closed from the left and open from the right.
Call the bin() function to find the bin containing a particular value.
Definition at line 23 of file TruncatingEquispacedBinSelector.h.
typedef int ufo::TruncatingEquispacedBinSelector::IndexType |
Definition at line 27 of file TruncatingEquispacedBinSelector.h.
typedef float ufo::TruncatingEquispacedBinSelector::ValueType |
Definition at line 26 of file TruncatingEquispacedBinSelector.h.
|
inline |
Partition the interval [lowerBound
, upperBound
) into numBins
bins of the same width.
Definition at line 31 of file TruncatingEquispacedBinSelector.h.
Return the index of the bin containing value
, or the nearest bin if value
lies outside all bins.
Implements ufo::EquispacedBinSelectorBase.
Definition at line 41 of file TruncatingEquispacedBinSelector.h.
|
inlineoverridevirtual |
Return the value lying at the center of the bin with index bin
.
Implements ufo::EquispacedBinSelectorBase.
Definition at line 60 of file TruncatingEquispacedBinSelector.h.
|
inlineoverridevirtual |
Return the width of each bin.
Implements ufo::EquispacedBinSelectorBase.
Definition at line 52 of file TruncatingEquispacedBinSelector.h.
|
inlineoverridevirtual |
Return the inverse of the width of each bin.
Implements ufo::EquispacedBinSelectorBase.
Definition at line 56 of file TruncatingEquispacedBinSelector.h.
|
inlineoverridevirtual |
Return the number of bins or boost::none if the bin collection is infinite.
Implements ufo::EquispacedBinSelectorBase.
Definition at line 48 of file TruncatingEquispacedBinSelector.h.
|
private |
Definition at line 66 of file TruncatingEquispacedBinSelector.h.
|
private |
Definition at line 67 of file TruncatingEquispacedBinSelector.h.
|
private |
Definition at line 65 of file TruncatingEquispacedBinSelector.h.
|
private |
Definition at line 68 of file TruncatingEquispacedBinSelector.h.