|
SpECTRE
v2025.08.19
|
An integer multi-index. More...
#include <Index.hpp>
Public Member Functions | |
| Index (const size_t i0=std::numeric_limits< size_t >::max()) | |
| Construct with each element set to the same value. | |
|
template<std::integral... I> requires (sizeof...(I) == Dim and sizeof...(I) > 1) | |
| Index (I... i) | |
| Construct specifying value in each dimension. | |
| Index (std::array< size_t, Dim > i) | |
| size_t | operator[] (const size_t d) const |
| size_t & | operator[] (const size_t d) |
| std::array< size_t, Dim >::iterator | begin () |
| std::array< size_t, Dim >::const_iterator | begin () const |
| std::array< size_t, Dim >::iterator | end () |
| std::array< size_t, Dim >::const_iterator | end () const |
| size_t | size () const |
|
template<size_t N = Dim> requires (N > 0) | |
| constexpr size_t | product () const |
| The product of the indices. If Dim = 0, the product is defined as 1. | |
| template<size_t N = Dim> requires (N > 0) | |
| Index< Dim - 1 > | slice_away (const size_t d) const |
| Return a smaller Index with the d-th element removed. More... | |
| const size_t * | data () const |
| size_t * | data () |
| const std::array< size_t, Dim > & | indices () const |
Friends | |
| template<size_t N> | |
| std::ostream & | operator<< (std::ostream &os, const Index< N > &i) |
An integer multi-index.
| Dim | the number of integers in the Index. |
|
inline |
Return a smaller Index with the d-th element removed.
| d | the element to remove. |