|
NSUNI/NSLAR Library a250670
|
Provides a few utility containers. More...
Classes | |
| class | nnl::utl::Array3D< T > |
| A 3-dimensional array template class. More... | |
| class | nnl::utl::StaticSet< T, max_size > |
| Fixed-size sorted set implementation. More... | |
| class | nnl::utl::static_vector< T, Capacity > |
| std::vector like class with a fixed-size inline storage (aka std::inplace_vector) More... | |
Provides a few utility containers.
| class nnl::utl::Array3D |
A 3-dimensional array template class.
Provides access to elements via 3D coordinates, utilizing a linear array under the hood for efficient storage.
| T | The type of elements stored in the array. |
Public Member Functions | |
| Array3D (std::size_t z, std::size_t y, std::size_t x) | |
| Constructs a 3D array with specified dimensions. | |
| void | Resize (std::size_t z, std::size_t y, std::size_t x) |
| Resizes the 3D array to specified dimensions. | |
| std::size_t | SizeZ () const noexcept |
| Returns the size of the array in the z dimension. | |
| std::size_t | SizeY () const noexcept |
| Returns the size of the array in the y dimension. | |
| std::size_t | SizeX () const noexcept |
| Returns the size of the array in the x dimension. | |
| T & | At (std::size_t z, std::size_t y, std::size_t x) |
| Accesses an element at specified coordinates with bounds checking. | |
| const T & | At (std::size_t z, std::size_t y, std::size_t x) const |
| Accesses an element at specified coordinates with bounds checking. | |
| T & | operator() (std::size_t z, std::size_t y, std::size_t x) noexcept |
| Accesses an element at specified coordinates (no bounds checking). | |
| const T & | operator() (std::size_t z, std::size_t y, std::size_t x) const noexcept |
| Accesses an element at specified coordinates (no bounds checking). | |
|
inline |
Constructs a 3D array with specified dimensions.
| z | The size in the z dimension. |
| y | The size in the y dimension. |
| x | The size in the x dimension. |
|
inline |
Accesses an element at specified coordinates with bounds checking.
| z | The z coordinate of the element. |
| y | The y coordinate of the element. |
| x | The x coordinate of the element. |
|
inline |
Accesses an element at specified coordinates with bounds checking.
| z | The z coordinate of the element. |
| y | The y coordinate of the element. |
| x | The x coordinate of the element. |
|
inlinenoexcept |
Accesses an element at specified coordinates (no bounds checking).
| z | The z coordinate of the element. |
| y | The y coordinate of the element. |
| x | The x coordinate of the element. |
|
inlinenoexcept |
Accesses an element at specified coordinates (no bounds checking).
| z | The z coordinate of the element. |
| y | The y coordinate of the element. |
| x | The x coordinate of the element. |
|
inline |
Resizes the 3D array to specified dimensions.
| z | The new size in the z dimension. |
| y | The new size in the y dimension. |
| x | The new size in the x dimension. |
|
inlinenoexcept |
Returns the size of the array in the x dimension.
|
inlinenoexcept |
Returns the size of the array in the y dimension.
|
inlinenoexcept |
Returns the size of the array in the z dimension.
| class nnl::utl::StaticSet |
Fixed-size sorted set implementation.
| T | Arithmetic type for elements |
| max_size | Maximum number of elements |
| class nnl::utl::static_vector |
std::vector like class with a fixed-size inline storage (aka std::inplace_vector)
Key differences include: