UFO
|
Represents a partition of a sphere into a number of subsets (bins). More...
#include <SpatialBinSelector.h>
Public Types | |
typedef float | ValueType |
typedef int | IndexType |
Public Member Functions | |
SpatialBinSelector (IndexType numLatitudeBins, SpatialBinCountRoundingMode roundingMode) | |
Partition a sphere into bins whose centers lie on a reduced Gaussian grid. More... | |
SpatialBinSelector (IndexType numLatitudeBins, IndexType numLongitudeBins) | |
Partition a sphere into bins whose centers lie on a regular Gaussian grid. More... | |
IndexType | latitudeBin (ValueType latitude) const |
Return the index of the zonal band of bins containing points with a given latitude (in degrees, assumed to lie in the interval [-90, 90]). More... | |
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 latitude (in degrees, assumed to lie in the interval [0, 360)). More... | |
ValueType | latitudeBinCenter (IndexType latitudeBin) const |
Return the latitude at the center of the zonal band of bins with index latitudeBin . More... | |
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 with index latitudeBin . More... | |
IndexType | totalNumBins () const |
Return the number of bins into which the sphere is split. More... | |
ValueType | latitudeBinWidth () const |
Return the width of each zonal band of bins. More... | |
ValueType | longitudeBinWidth (IndexType latitudeBin) const |
Return the zonal width of each bin in the band of bins with index latitudeBin . More... | |
ValueType | inverseLatitudeBinWidth () const |
Return the inverse of the width of each zonal band of bins. More... | |
ValueType | inverseLongitudeBinWidth (IndexType latitudeBin) const |
Return the inverse of the zonal width of each bin in the band of bins with index latitudeBin . More... | |
Static Public Member Functions | |
static IndexType | roundNumBins (float idealNumBins, SpatialBinCountRoundingMode roundingMode) |
Return idealNumBins rounded to a positive integer according to the rounding strategy roundingMode . More... | |
Private Attributes | |
EquispacedBinSelector | latitudeBinSelector_ |
std::vector< EquispacedBinSelector > | longitudeBinSelectors_ |
Static Private Attributes | |
static constexpr ValueType | latitudeLowerBound_ = -90 |
static constexpr ValueType | latitudeUpperBound_ = 90 |
static constexpr ValueType | longitudeLowerBound_ = 0 |
static constexpr ValueType | longitudeUpperBound_ = 360 |
Represents a partition of a sphere into a number of subsets (bins).
Definition at line 25 of file SpatialBinSelector.h.
typedef int ufo::SpatialBinSelector::IndexType |
Definition at line 29 of file SpatialBinSelector.h.
typedef float ufo::SpatialBinSelector::ValueType |
Definition at line 28 of file SpatialBinSelector.h.
ufo::SpatialBinSelector::SpatialBinSelector | ( | IndexType | numLatitudeBins, |
SpatialBinCountRoundingMode | roundingMode | ||
) |
Partition a sphere into bins whose centers lie on a reduced Gaussian grid.
numLatitudeBins | The number of zonal bands of bins into which the sphere is split. |
roundingMode |
|
Definition at line 18 of file SpatialBinSelector.cc.
ufo::SpatialBinSelector::SpatialBinSelector | ( | IndexType | numLatitudeBins, |
IndexType | numLongitudeBins | ||
) |
Partition a sphere into bins whose centers lie on a regular Gaussian grid.
numLatitudeBins | The number of zonal bands of bins into which the sphere is split. |
numLongitudeBins | The number of meridional bands of bins into which the sphere is split. |
Definition at line 37 of file SpatialBinSelector.cc.
|
inline |
Return the inverse of the width of each zonal band of bins.
Definition at line 94 of file SpatialBinSelector.h.
Return the inverse of the zonal width of each bin in the band of bins with index latitudeBin
.
Definition at line 100 of file SpatialBinSelector.h.
Return the index of the zonal band of bins containing points with a given latitude (in degrees, assumed to lie in the interval [-90, 90]).
Definition at line 59 of file SpatialBinSelector.h.
Return the latitude at the center of the zonal band of bins with index latitudeBin
.
Definition at line 70 of file SpatialBinSelector.h.
|
inline |
Return the width of each zonal band of bins.
Definition at line 84 of file SpatialBinSelector.h.
|
inline |
Return the index of the bin within the zonal band of index latitudeBin
containing points with a given latitude (in degrees, assumed to lie in the interval [0, 360)).
Definition at line 65 of file SpatialBinSelector.h.
|
inline |
Return the longitude at the center of the bin with index latitudeBin
lying in the zonal band of bins with index latitudeBin
.
Definition at line 76 of file SpatialBinSelector.h.
Return the zonal width of each bin in the band of bins with index latitudeBin
.
Definition at line 89 of file SpatialBinSelector.h.
|
static |
Return idealNumBins
rounded to a positive integer according to the rounding strategy roundingMode
.
Definition at line 51 of file SpatialBinSelector.cc.
SpatialBinSelector::IndexType ufo::SpatialBinSelector::totalNumBins | ( | ) | const |
Return the number of bins into which the sphere is split.
Definition at line 44 of file SpatialBinSelector.cc.
|
private |
Definition at line 109 of file SpatialBinSelector.h.
|
staticconstexprprivate |
Definition at line 32 of file SpatialBinSelector.h.
|
staticconstexprprivate |
Definition at line 33 of file SpatialBinSelector.h.
|
private |
Definition at line 110 of file SpatialBinSelector.h.
|
staticconstexprprivate |
Definition at line 34 of file SpatialBinSelector.h.
|
staticconstexprprivate |
Definition at line 35 of file SpatialBinSelector.h.