|
SpECTRE
2021.08.02
|
An integer multi-index. More...
#include <Index.hpp>
Public Member Functions | |
| Index (const size_t i0=std::numeric_limits< size_t >::max()) noexcept | |
| Construct with each element set to the same value. | |
| template<typename... I, Requires<(sizeof...(I) > 1)> = nullptr> | |
| Index (I... i) noexcept | |
| Construct specifying value in each dimension. | |
| Index (std::array< size_t, Dim > i) noexcept | |
| size_t | operator[] (const size_t d) const noexcept |
| size_t & | operator[] (const size_t d) noexcept |
| 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 noexcept |
| template<int N = Dim, Requires<(N > 0)> = nullptr> | |
| constexpr size_t | product () const noexcept |
| The product of the indices. If Dim = 0, the product is defined as 1. | |
| template<size_t N = Dim, Requires<(N > 0)> = nullptr> | |
| Index< Dim - 1 > | slice_away (const size_t d) const noexcept |
| Return a smaller Index with the d-th element removed. More... | |
| const size_t * | data () const noexcept |
| size_t * | data () noexcept |
| const std::array< size_t, Dim > & | indices () const noexcept |
Friends | |
| template<size_t N> | |
| std::ostream & | operator<< (std::ostream &os, const Index< N > &i) noexcept |
An integer multi-index.
| Dim | the number of integers in the Index. |