Shortcuts

Template Struct StaticMultidimSpace

Struct Documentation

template<size_t... Sizes>
struct ripple::StaticMultidimSpace

The StaticMultidimSpace struct defines spatial information over multiple dimensions, specifically the sizes of the dimensions and the steps required to get from one element to another in the dimensions of the space.

The StaticMultidimSpace struct defines spatial information over multiple dimensions.

The static nature of the space means that it can’t be modified, and the size and steps for the space are all known at compile time, which makes using this space more efficient, all be it with less flexibility.

Specifically, it defines the sizes of the dimensions and the steps required to get from one element to another in a given dimensions of the space. The static nature of the space means that it can’t be modified, and the size and steps for the space are all known at compile time, which makes using this space more efficient, all be it with less flexibility.

Template Parameters
  • Sizes: The sizes of the dimensions of the space.

Template Parameters
  • Sizes: The sizes of the dimensions of the space.

Public Functions

constexpr StaticMultidimSpace() = default

Default constructor.

constexpr StaticMultidimSpace(size_t padding) noexcept

Constructor to set the padding for the space.

Parameters
  • padding: The amount of padding for the space.

constexpr auto padding() noexcept -> size_t&

Gets the amount of padding for a single side of a single dimension of the space.

Return

The amount of padding for the space.

constexpr auto padding() const noexcept -> size_t

Gets the amount of padding fot a single size of a single dimension of the space.

Return

The amount of padding for the space.

constexpr auto dim_padding() const noexcept -> size_t

Gets the total amount of padding for the dimension, which is twice the padding amount of each side.

See

padding

Return

The total padding amount for both sides of the dimension.

constexpr auto dimensions() const noexcept -> size_t

Gets the number of dimensions for the space.

Return

The number of dimensions for the space.

constexpr auto size() const noexcept -> size_t

Gets the total size of the N dimensional space i.e the total number of elements in the space, including the padding for the space.

Note

This is the product sum of the dimension sizes including padding.

Return

the total number of elements in the space including padding.

template<typename Dim>
constexpr auto size(Dim &&dim) const noexcept -> size_t

Gets the size of the dimension with padding.

Return

The number of elements in the dimension, including padding.

Parameters
  • dim: The dimension to get the size for.

Template Parameters
  • Dim: The type of the dimension specifier.

template<typename Dim>
constexpr auto internal_size(Dim &&dim) const noexcept -> size_t

Gets the size of the given dimension, without padding.

Parameters
  • dim: The dimension to get the size of.

Template Parameters
  • Dim: The type of the dimension.

constexpr auto internal_size() const noexcept -> size_t

Computes the total size of the N dimensional space without paddding, which is the total number of computable elements in the space.

Return

The total number of elements in the space, excluding padding.

template<typename Dim>
constexpr auto step(Dim &&dim) const noexcept -> size_t

Gets the step size to from one element in the given dimension to the next element in same dimension.

Return

The step size between two elements in the dimension.

Parameters
  • dim: The dimension to get the step size in.

Template Parameters
  • Dim: The type of the dimension.

Docs

Access comprehensive developer documentation for Ripple

View Docs

Tutorials

Get tutorials to help with understand all features

View Tutorials

Examples

Find examples to help get started

View Examples