This class implements a base class for data arrays.
More...
#include <SpatialDistribution.h>
|
| 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.
|
| |
| 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.
|
| |
This class implements a base class for data arrays.
◆ Array() [1/4]
| Ocean::Geometry::SpatialDistribution::Array::Array |
( |
| ) |
|
|
protecteddefault |
Creates an empty array object.
◆ Array() [2/4]
| Ocean::Geometry::SpatialDistribution::Array::Array |
( |
const Array & |
object | ) |
|
|
protecteddefault |
Copy constructor.
- Parameters
-
| object | The array object to be copied |
◆ Array() [3/4]
| Ocean::Geometry::SpatialDistribution::Array::Array |
( |
Array && |
object | ) |
|
|
inlineprotectednoexcept |
Move constructor.
- Parameters
-
| object | The array object to be moved |
◆ Array() [4/4]
| Ocean::Geometry::SpatialDistribution::Array::Array |
( |
const Scalar |
left, |
|
|
const Scalar |
top, |
|
|
const Scalar |
width, |
|
|
const Scalar |
height, |
|
|
const unsigned int |
horizontalBins, |
|
|
const unsigned int |
verticalBins |
|
) |
| |
|
inlineprotected |
Creates a new array object.
- Parameters
-
| 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) |
◆ bins()
| unsigned int Ocean::Geometry::SpatialDistribution::Array::bins |
( |
| ) |
const |
|
inline |
Returns the number of bins this distribution holds.
- Returns
- Bin number
◆ clampedHorizontalBin()
| int Ocean::Geometry::SpatialDistribution::Array::clampedHorizontalBin |
( |
const Scalar |
x | ) |
const |
|
inline |
Returns the horizontal bin of a given horizontal position.
Beware: The resulting bin is clamped into the range [0, number of bins - 1).
- Parameters
-
| x | Horizontal position, with range (-infinity, infinity) |
- Returns
- Horizontal bin, with range [0, horizontalBins() - 1]
- See also
- horizontalBin().
◆ clampedVerticalBin()
| int Ocean::Geometry::SpatialDistribution::Array::clampedVerticalBin |
( |
const Scalar |
y | ) |
const |
|
inline |
Returns the vertical bin of a given vertical position.
Beware: The resulting bin is clamped into the range [0, number of bins - 1).
- Parameters
-
| y | Vertical position, with range (-infinity, infinity) |
- Returns
- Vertical bin, with range [0, verticalBins() - 1]
- See also
- clampedVerticalBin().
◆ height()
| Scalar Ocean::Geometry::SpatialDistribution::Array::height |
( |
| ) |
const |
|
inline |
Returns the height of the distribution area.
- Returns
- Area height
◆ horizontalBin()
| int Ocean::Geometry::SpatialDistribution::Array::horizontalBin |
( |
const Scalar |
x | ) |
const |
|
inline |
Returns the horizontal bin of a given horizontal position.
Beware: The resulting bin can exceed the bin-ranges of the array.
- Parameters
-
| x | Horizontal position, with range (-infinity, infinity) |
- Returns
- Horizontal bin, with range (-infinity, infinity)
- See also
- clampedHorizontalBin().
◆ horizontalBins()
| unsigned int Ocean::Geometry::SpatialDistribution::Array::horizontalBins |
( |
| ) |
const |
|
inline |
Returns the number of horizontal distribution bins.
- Returns
- Number of bins
◆ index()
| unsigned int Ocean::Geometry::SpatialDistribution::Array::index |
( |
const Scalar |
x, |
|
|
const Scalar |
y |
|
) |
| const |
|
inline |
Returns the bin index for a given position.
Beware: Make sure that the given position is inside the specified range!
- Parameters
-
| x | Horizontal position, with range [0, width()) |
| y | Vertical position, with range [0, height()) |
- Returns
- Resulting bin index
◆ isValid()
| bool Ocean::Geometry::SpatialDistribution::Array::isValid |
( |
| ) |
const |
|
inline |
Returns whether this object holds a valid distribution.
- Returns
- True, if so
◆ left()
| Scalar Ocean::Geometry::SpatialDistribution::Array::left |
( |
| ) |
const |
|
inline |
Returns the left position of the distribution area.
- Returns
- Left position
◆ operator bool()
| Ocean::Geometry::SpatialDistribution::Array::operator bool |
( |
| ) |
const |
|
inlineexplicit |
Returns whether this object holds a valid distribution.
- Returns
- True, if so
◆ operator!=()
| bool Ocean::Geometry::SpatialDistribution::Array::operator!= |
( |
const Array & |
right | ) |
const |
|
inline |
Returns whether two Array objects are not identical.
- Parameters
-
| right | The second array object to compare |
- Returns
- True, if so
◆ operator=() [1/2]
Move operator.
- Parameters
-
| object | The object to be moved |
- Returns
- Reference to this object
◆ operator=() [2/2]
Assign operator.
- Parameters
-
| object | The object to be assigned |
- Returns
- Reference to this object
◆ operator==()
| bool Ocean::Geometry::SpatialDistribution::Array::operator== |
( |
const Array & |
right | ) |
const |
|
inline |
Returns whether two Array objects are identical.
- Parameters
-
| right | The second array object to compare |
- Returns
- True, if so
◆ top()
| Scalar Ocean::Geometry::SpatialDistribution::Array::top |
( |
| ) |
const |
|
inline |
Returns the top position of the distribution area.
- Returns
- Top position
◆ verticalBin()
| int Ocean::Geometry::SpatialDistribution::Array::verticalBin |
( |
const Scalar |
y | ) |
const |
|
inline |
Returns the vertical bin of a given vertical position.
Beware: The resulting bin can exceed the bin-ranges of the array.
- Parameters
-
| y | Vertical position, with range (-infinity, infinity) |
- Returns
- Vertical bin, with range (-infinity, infinity)
- See also
- clampedVerticalBin().
◆ verticalBins()
| unsigned int Ocean::Geometry::SpatialDistribution::Array::verticalBins |
( |
| ) |
const |
|
inline |
Returns the number of vertical distribution bins.
- Returns
- Number of bins
◆ width()
| Scalar Ocean::Geometry::SpatialDistribution::Array::width |
( |
| ) |
const |
|
inline |
Returns the width of the distribution area.
- Returns
- Area width
◆ areaHeight_
| Scalar Ocean::Geometry::SpatialDistribution::Array::areaHeight_ = Scalar(0) |
|
protected |
Height of the distribution area.
◆ areaLeft_
| Scalar Ocean::Geometry::SpatialDistribution::Array::areaLeft_ = Scalar(0) |
|
protected |
Left position of the distribution area.
◆ areaTop_
| Scalar Ocean::Geometry::SpatialDistribution::Array::areaTop_ = Scalar(0) |
|
protected |
Top position of the distribution area.
◆ areaWidth_
| Scalar Ocean::Geometry::SpatialDistribution::Array::areaWidth_ = Scalar(0) |
|
protected |
Width of the distribution area.
◆ horizontalBins_
| unsigned int Ocean::Geometry::SpatialDistribution::Array::horizontalBins_ = 0u |
|
protected |
Number of horizontal distribution bins.
◆ horizontalPoint2Bin_
| Scalar Ocean::Geometry::SpatialDistribution::Array::horizontalPoint2Bin_ = Scalar(0) |
|
protected |
Horizontal position to bin factor.
◆ verticalBins_
| unsigned int Ocean::Geometry::SpatialDistribution::Array::verticalBins_ = 0u |
|
protected |
Number of vertical distribution bins.
◆ verticalPoint2Bin_
| Scalar Ocean::Geometry::SpatialDistribution::Array::verticalPoint2Bin_ = Scalar(0) |
|
protected |
Vertical position to bin factor.
The documentation for this class was generated from the following file: