Go to the documentation of this file.
8 #ifndef UFO_UTILS_SPATIALBINSELECTOR_H_
9 #define UFO_UTILS_SPATIALBINSELECTOR_H_
115 #endif // UFO_UTILS_SPATIALBINSELECTOR_H_
Represents a partition of a sphere into a number of subsets (bins).
SpatialBinSelector(IndexType numLatitudeBins, SpatialBinCountRoundingMode roundingMode)
Partition a sphere into bins whose centers lie on a reduced Gaussian grid.
IndexType latitudeBin(ValueType latitude) const
Return the index of the zonal band of bins containing points with a given latitude (in degrees,...
ValueType inverseLongitudeBinWidth(IndexType latitudeBin) const
Return the inverse of the zonal width of each bin in the band of bins with index latitudeBin.
static IndexType roundNumBins(float idealNumBins, SpatialBinCountRoundingMode roundingMode)
Return idealNumBins rounded to a positive integer according to the rounding strategy roundingMode.
static constexpr ValueType latitudeUpperBound_
static constexpr ValueType longitudeLowerBound_
static constexpr ValueType latitudeLowerBound_
std::vector< EquispacedBinSelector > longitudeBinSelectors_
ValueType longitudeBinWidth(IndexType latitudeBin) const
Return the zonal width of each bin in the band of bins with index latitudeBin.
ValueType latitudeBinWidth() const
Return the width of each zonal band of bins.
IndexType longitudeBin(IndexType latitudeBin, ValueType longitude) const
Return the index of the bin within the zonal band of index latitudeBin containing points with a given...
EquispacedBinSelector latitudeBinSelector_
ValueType binWidth() const
Return the width of each bin.
ValueType binCenter(IndexType bin) const
Return the value lying at the center of the bin with index bin.
ValueType longitudeBinCenter(IndexType latitudeBin, IndexType longitudeBin) const
Return the longitude at the center of the bin with index latitudeBin lying in the zonal band of bins ...
ValueType inverseBinWidth() const
Return the inverse of the width of each bin.
Represents a set of consecutive intervals (bins) of the same width.
ValueType latitudeBinCenter(IndexType latitudeBin) const
Return the latitude at the center of the zonal band of bins with index latitudeBin.
IndexType bin(ValueType value) const
Return the (0-based) index of the bin containing value, or the nearest bin if value lies outside all ...
static constexpr ValueType longitudeUpperBound_
ValueType inverseLatitudeBinWidth() const
Return the inverse of the width of each zonal band of bins.
IndexType totalNumBins() const
Return the number of bins into which the sphere is split.
SpatialBinCountRoundingMode