SpECTRE  v2024.05.11
Spectral::Swsh::CoefficientsMetadata::CoefficientsIndexIterator Class Reference

An iterator for easily traversing a libsharp-compatible spin-weighted spherical harmonic modal representation. The operator*() returns a LibsharpCoefficientInfo, which contains two offsets, transform_of_real_part_offset and transform_of_imag_part_offset, and the l_max, l and m associated with the values at those offsets. More...

#include <SwshCoefficients.hpp>

Public Member Functions

 CoefficientsIndexIterator (const size_t l_max, const size_t start_l=0, const size_t start_m=0)
 
LibsharpCoefficientInfo operator* () const
 
CoefficientsIndexIteratoroperator++ ()
 advance the iterator by one position (prefix)
 
const CoefficientsIndexIterator operator++ (int)
 advance the iterator by one position (postfix)
 
CoefficientsIndexIteratoroperator-- ()
 retreat the iterator by one position (prefix)
 
const CoefficientsIndexIterator operator-- (int)
 retreat the iterator by one position (postfix)
 
bool operator== (const CoefficientsIndexIterator &rhs) const
 (In)Equivalence checks the object as well as the l and m current position.
 
bool operator!= (const CoefficientsIndexIterator &rhs) const
 (In)Equivalence checks the object as well as the l and m current position.
 

Detailed Description

An iterator for easily traversing a libsharp-compatible spin-weighted spherical harmonic modal representation. The operator*() returns a LibsharpCoefficientInfo, which contains two offsets, transform_of_real_part_offset and transform_of_imag_part_offset, and the l_max, l and m associated with the values at those offsets.

Note
this currently assumes, as do many of the utilities in this file, that the libsharp representation is chosen to be the triangular coefficient representation. If alternative representations are desired, alterations will be needed.

The documentation for this class was generated from the following file: