|
Ocean
|
This class implements a base class for data arrays. More...
#include <SpatialDistribution.h>
Public Member Functions | |
| Scalar | left () const |
| Returns the left position of the distribution area. | |
| Scalar | top () const |
| Returns the top position of the distribution area. | |
| Scalar | width () const |
| Returns the width of the distribution area. | |
| Scalar | height () const |
| Returns the height of the distribution area. | |
| unsigned int | horizontalBins () const |
| Returns the number of horizontal distribution bins. | |
| unsigned int | verticalBins () const |
| Returns the number of vertical distribution bins. | |
| unsigned int | bins () const |
| Returns the number of bins this distribution holds. | |
| unsigned int | index (const Scalar x, const Scalar y) const |
| Returns the bin index for a given position. | |
| int | horizontalBin (const Scalar x) const |
| Returns the horizontal bin of a given horizontal position. | |
| int | verticalBin (const Scalar y) const |
| Returns the vertical bin of a given vertical position. | |
| int | clampedHorizontalBin (const Scalar x) const |
| Returns the horizontal bin of a given horizontal position. | |
| int | clampedVerticalBin (const Scalar y) const |
| Returns the vertical bin of a given vertical position. | |
| template<unsigned int tRadius> | |
| unsigned int | beginBinHorizontal (const unsigned int centerBinX) const |
| Returns the (inclusive) begin bin in horizontal direction for a neighborhood search. | |
| template<unsigned int tRadius> | |
| unsigned int | endBinHorizontal (const unsigned int centerBinX) const |
| Returns the (exclusive) end bin in horizontal direction for a neighborhood search. | |
| template<unsigned int tRadius> | |
| unsigned int | beginBinVertical (const unsigned int centerBinY) const |
| Returns the (inclusive) begin bin in vertical direction for a neighborhood search. | |
| template<unsigned int tRadius> | |
| unsigned int | endBinVertical (const unsigned int centerBinY) const |
| Returns the (exclusive) end bin in vertical direction for a neighborhood search. | |
| bool | isValid () const |
| Returns whether this object holds a valid distribution. | |
| bool | operator== (const Array &right) const |
| Returns whether two Array objects are identical. | |
| bool | operator!= (const Array &right) const |
| Returns whether two Array objects are not identical. | |
| operator bool () const | |
| Returns whether this object holds a valid distribution. | |
Protected Member Functions | |
| Array ()=default | |
| Creates an empty array object. | |
| Array (const Array &object)=default | |
| Copy constructor. | |
| Array (Array &&object) noexcept | |
| Move constructor. | |
| Array (const Scalar left, const Scalar top, const Scalar width, const Scalar height, const unsigned int horizontalBins, const unsigned int verticalBins) | |
| Creates a new array object. | |
| Array & | operator= (const Array &object) |
| Assign operator. | |
| Array & | operator= (Array &&object) noexcept |
| Move operator. | |
Protected Attributes | |
| Scalar | areaLeft_ = Scalar(0) |
| Left position of the distribution area. | |
| Scalar | areaTop_ = Scalar(0) |
| Top position of the distribution area. | |
| Scalar | areaWidth_ = Scalar(0) |
| Width of the distribution area. | |
| Scalar | areaHeight_ = Scalar(0) |
| Height of the distribution area. | |
| unsigned int | horizontalBins_ = 0u |
| Number of horizontal distribution bins. | |
| unsigned int | verticalBins_ = 0u |
| Number of vertical distribution bins. | |
| Scalar | horizontalPoint2Bin_ = Scalar(0) |
| Horizontal position to bin factor. | |
| Scalar | verticalPoint2Bin_ = Scalar(0) |
| Vertical position to bin factor. | |
This class implements a base class for data arrays.
|
protecteddefault |
Creates an empty array object.
|
protecteddefault |
Copy constructor.
| object | The array object to be copied |
|
inlineprotectednoexcept |
Move constructor.
| object | The array object to be moved |
|
inlineprotected |
Creates a new array object.
| left | The left area position, with range (-infinity, infinity) |
| top | The top area position, with range (-infinity, infinity) |
| width | The width of the distribution area, with range (0, infinity) |
| height | The height of the distribution area, with range (0, infinity) |
| horizontalBins | Number of horizontal distribution bins, with range [1, infinity) |
| verticalBins | Number of vertical distribution bins, with range [1, infinity) |
|
inline |
Returns the (inclusive) begin bin in horizontal direction for a neighborhood search.
The resulting bin is clamped to the valid range [0, horizontalBins()).
| centerBinX | The center horizontal bin, with range [0, horizontalBins() - 1] |
| tRadius | The radius of the neighborhood, in bins, with range [1, infinity) |
|
inline |
Returns the (inclusive) begin bin in vertical direction for a neighborhood search.
The resulting bin is clamped to the valid range [0, verticalBins()).
| centerBinY | The center vertical bin, with range [0, verticalBins() - 1] |
| tRadius | The radius of the neighborhood, in bins, with range [1, infinity) |
|
inline |
Returns the number of bins this distribution holds.
|
inline |
Returns the horizontal bin of a given horizontal position.
Beware: The resulting bin is clamped into the range [0, number of bins - 1).
| x | Horizontal position, with range (-infinity, infinity) |
|
inline |
Returns the vertical bin of a given vertical position.
Beware: The resulting bin is clamped into the range [0, number of bins - 1).
| y | Vertical position, with range (-infinity, infinity) |
|
inline |
Returns the (exclusive) end bin in horizontal direction for a neighborhood search.
The resulting bin is clamped to the valid range [0, horizontalBins()].
| centerBinX | The center horizontal bin, with range [0, horizontalBins() - 1] |
| tRadius | The radius of the neighborhood, in bins, with range [1, infinity) |
|
inline |
Returns the (exclusive) end bin in vertical direction for a neighborhood search.
The resulting bin is clamped to the valid range [0, verticalBins()].
| centerBinY | The center vertical bin, with range [0, verticalBins() - 1] |
| tRadius | The radius of the neighborhood, in bins, with range [1, infinity) |
|
inline |
Returns the height of the distribution area.
|
inline |
Returns the horizontal bin of a given horizontal position.
Beware: The resulting bin can exceed the bin-ranges of the array.
| x | Horizontal position, with range (-infinity, infinity) |
|
inline |
Returns the number of horizontal distribution bins.
|
inline |
Returns whether this object holds a valid distribution.
|
inline |
Returns the left position of the distribution area.
|
inlineexplicit |
Returns whether this object holds a valid distribution.
|
inline |
Returns whether two Array objects are not identical.
| right | The second array object to compare |
|
inlineprotectednoexcept |
Move operator.
| object | The object to be moved |
|
inlineprotected |
Assign operator.
| object | The object to be assigned |
|
inline |
Returns whether two Array objects are identical.
| right | The second array object to compare |
|
inline |
Returns the top position of the distribution area.
|
inline |
Returns the vertical bin of a given vertical position.
Beware: The resulting bin can exceed the bin-ranges of the array.
| y | Vertical position, with range (-infinity, infinity) |
|
inline |
Returns the number of vertical distribution bins.
|
inline |
Returns the width of the distribution area.
Height of the distribution area.
Left position of the distribution area.
Top position of the distribution area.
Width of the distribution area.
|
protected |
Number of horizontal distribution bins.
Horizontal position to bin factor.
|
protected |
Number of vertical distribution bins.
Vertical position to bin factor.