SpECTRE
v2024.09.29
|
IndexIterator iterates over a unique set of Index. More...
#include <IndexIterator.hpp>
Public Member Functions | |
IndexIterator (Index< Dim > extents) | |
Construct from an Index. | |
IndexIterator ()=delete | |
It does not make sense to default construct an IndexIterator. | |
operator bool () const | |
Returns false if the end of the Index iteration is reached. | |
IndexIterator< Dim > & | operator++ () |
Advance to next Index. | |
const Index< Dim > & | operator* () const |
const Index< Dim > * | operator-> () const |
const Index< Dim > & | operator() () const |
Returns an index representing the (i, j, ...)th values that the iterator currently represents. | |
size_t | collapsed_index () const |
Get the collapsed index into a 1D array of the data corresponding to the current Index of the IndexIterator. Note that the first dimension of the Index varies fastest when computing the collapsed index. | |
IndexIterator iterates over a unique set of Index.
Each integer of the Index will vary from 0 to extents[d] - 1, with the lowest dimension varying the fastest.