UFO
|
A finite or infinite collection of non-overlapping intervals (bins) of the same width. More...
#include <EquispacedBinSelectorBase.h>
Public Types | |
typedef float | ValueType |
typedef int | IndexType |
Public Member Functions | |
virtual | ~EquispacedBinSelectorBase () |
virtual IndexType | bin (ValueType value) const =0 |
Return the index of the bin containing value , or the nearest bin if value lies outside all bins. More... | |
virtual boost::optional< IndexType > | numBins () const =0 |
Return the number of bins or boost::none if the bin collection is infinite. More... | |
virtual ValueType | binWidth () const =0 |
Return the width of each bin. More... | |
virtual ValueType | inverseBinWidth () const =0 |
Return the inverse of the width of each bin. More... | |
virtual ValueType | binCenter (IndexType bin) const =0 |
Return the value lying at the center of the bin with index bin . More... | |
A finite or infinite collection of non-overlapping intervals (bins) of the same width.
Call the bin() function to find the bin containing a particular value.
Definition at line 19 of file EquispacedBinSelectorBase.h.
typedef int ufo::EquispacedBinSelectorBase::IndexType |
Definition at line 23 of file EquispacedBinSelectorBase.h.
typedef float ufo::EquispacedBinSelectorBase::ValueType |
Definition at line 22 of file EquispacedBinSelectorBase.h.
|
inlinevirtual |
Definition at line 25 of file EquispacedBinSelectorBase.h.
Return the index of the bin containing value
, or the nearest bin if value
lies outside all bins.
Implemented in ufo::TruncatingEquispacedBinSelector, and ufo::RoundingEquispacedBinSelector.
Return the value lying at the center of the bin with index bin
.
Implemented in ufo::TruncatingEquispacedBinSelector, and ufo::RoundingEquispacedBinSelector.
|
pure virtual |
Return the width of each bin.
Implemented in ufo::TruncatingEquispacedBinSelector, and ufo::RoundingEquispacedBinSelector.
|
pure virtual |
Return the inverse of the width of each bin.
Implemented in ufo::TruncatingEquispacedBinSelector, and ufo::RoundingEquispacedBinSelector.
|
pure virtual |
Return the number of bins or boost::none if the bin collection is infinite.
Implemented in ufo::TruncatingEquispacedBinSelector, and ufo::RoundingEquispacedBinSelector.