|
SpECTRE
v2025.08.19
|
Iterate over all nonzero index permutations for a Levi-Civita symbol. More...
#include <LeviCivitaIterator.hpp>
Public Member Functions | |
| operator bool () const | |
| LeviCivitaIterator & | operator++ () |
| const std::array< size_t, Dim > | operator() () const |
Return a std::array containing the current multi-index, an ordered list of indices for the current permutation. | |
| const size_t & | operator[] (const size_t i) const |
| Return a specific index from the multi-index of the current permutation. | |
| int | sign () const |
| Return the sign of the Levi-Civita symbol for the current permutation. | |
Iterate over all nonzero index permutations for a Levi-Civita symbol.
This class provides an iterator that allows you to loop over only the nonzero index permutations of a Levi-Civita symbol of dimension dimension. Inside the loop, the operator () returns an std::array containing an ordered list of the indices of this permutation, the operator [] returns a specific index from the same std::array, and the function sign() returns the sign of the Levi-Civita symbol for this permutation.