|
| | Shape () noexcept=default |
| | Creates an empty shape.
|
template<Integral... Dims>
requires (sizeof...(Dims) > 0) |
| | Shape (Dims... dims) |
| | Creates a shape from non-negative integer dimension lengths.
|
| | Shape (std::initializer_list< std::size_t > list, allow_zero_t allow_zero) |
| | Creates a shape from dimension lengths using the explicit zero-dimension tag.
|
| | Shape (const Buffer< std::size_t > &dims) |
| | Creates a shape by copying dimension lengths from a buffer.
|
| | Shape (const Buffer< std::size_t > &dims, allow_zero_t allow_zero) |
| | Creates a shape by copying dimension lengths using the explicit zero-dimension tag.
|
| | Shape (Buffer< std::size_t > &&dims) |
| | Creates a shape by taking ownership of dimension lengths from a buffer.
|
| | Shape (const std::vector< std::size_t > &dims) |
| | Creates a shape by copying dimension lengths from a standard vector.
|
|
| ~Shape ()=default |
| | Destroys the shape.
|
| std::size_t | elements () const |
| | Returns the total number of elements described by the shape.
|
| std::size_t | rank () const |
| | Returns the number of stored dimensions.
|
| const std::size_t & | operator() (std::size_t index) const |
| | Returns the length of a specific dimension.
|
| const std::size_t & | operator[] (std::ptrdiff_t index) const |
| | Returns the length of a specific dimension using signed indexing.
|
| bool | empty () const noexcept |
| | Returns whether the shape has no dimensions.
|
| bool | operator== (const Shape &other) const noexcept |
| | Compares two shapes for exact rank and dimension equality.
|
| bool | operator!= (const Shape &other) const noexcept |
| | Returns whether two shapes differ in rank or dimension values.
|
| iterator | begin () noexcept |
| | Returns an iterator to the first stored dimension.
|
| iterator | end () noexcept |
| | Returns an iterator one past the last stored dimension.
|
| const_iterator | begin () const noexcept |
| | Returns a const iterator to the first stored dimension.
|
| const_iterator | end () const noexcept |
| | Returns a const iterator one past the last stored dimension.
|
| const_iterator | cbegin () const noexcept |
| | Returns a const iterator to the first stored dimension.
|
| const_iterator | cend () const noexcept |
| | Returns a const iterator one past the last stored dimension.
|
| reverse_iterator | rbegin () noexcept |
| | Returns a reverse iterator to the last stored dimension.
|
| const_reverse_iterator | rbegin () const noexcept |
| | Returns a const reverse iterator to the last stored dimension.
|
| const_reverse_iterator | crbegin () const noexcept |
| | Returns a const reverse iterator to the last stored dimension.
|
| reverse_iterator | rend () noexcept |
| | Returns a reverse iterator before the first stored dimension.
|
| const_reverse_iterator | rend () const noexcept |
| | Returns a const reverse iterator before the first stored dimension.
|
| const_reverse_iterator | crend () const noexcept |
| | Returns a const reverse iterator before the first stored dimension.
|
| void | swap (Shape &other) noexcept |
| | Swaps the stored dimensions with another shape.
|
Stores a list of dimension lengths for an array shape.
Shape tracks rank, dimension sizes, and derived element counts for Stratax containers. It provides lightweight metadata only and does not own any element storage.
Definition at line 21 of file Shape.hpp.
template<Integral... Dims>
requires (sizeof...(Dims) > 0)
| stratax::core::Shape::Shape |
( |
Dims... | dims | ) |
|
|
inline |
Creates a shape from non-negative integer dimension lengths.
The dimensions are stored in order, from outermost axis to innermost axis. Boolean and character-like types are rejected by the Integral concept.
- Parameters
-
Definition at line 73 of file Shape.hpp.