AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
An iterator type for a BivariateMap, iterating via its ElementFlatIndex. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/slam/BivariateMap.hpp>
Public Types | |
using | PositionType = SetPosition |
Public Member Functions | |
BivariateMapIterator (BivariateMap *sMap, PositionType pos) | |
Construct a new BivariateMap Iterator given an ElementFlatIndex. More... | |
bool | operator== (const iter &other) const |
bool | operator!= (const iter &other) const |
DataType & | operator* () |
Returns the current iterator value. If the BivariateMap has multiple components, this will return the first component. To access the other components, use iter(comp) More... | |
DataType & | operator() (PositionType comp_idx=0) |
Returns the iterator's value at the specified component. Returns the first component if comp_idx is not specified. More... | |
DataType & | operator[] (PositionType n) |
Returns the first component value after n increments. More... | |
DataType & | value (PositionType comp=0) |
Return the value at the iterator's position. Same as operator() More... | |
PositionType | firstIndex () |
return the current iterator's first index into the BivariateSet More... | |
PositionType | secondIndex () |
return the current iterator's second index (DenseIndex) into the BivariateSet More... | |
PositionType | numComp () const |
Returns the number of components per element in the map. More... | |
Iterator advance and distance operators | |
BivariateMapIterator & | operator++ () |
Pre-increment operator. More... | |
BivariateMapIterator | operator++ (int) |
Post-increment operator. More... | |
BivariateMapIterator & | operator-- () |
Pre-decrement operator. More... | |
BivariateMapIterator | operator-- (int) |
Post-decrement operator. More... | |
BivariateMapIterator & | operator+= (SetPosition n) |
Addition-assignment operator. More... | |
BivariateMapIterator & | operator-= (SetPosition n) |
Subtraction-assignment operator. More... | |
Public Attributes | |
const PositionType | INVALID_POS = -2 |
Protected Member Functions | |
void | advance (PositionType n) |
Protected Attributes | |
SetPosition | m_pos |
An iterator type for a BivariateMap, iterating via its ElementFlatIndex.
This iterator class traverses the BivariateMap using its ElementFlatIndex. In addition to m_pos from IteratorBase, this class also keeps track of the iterator's first index (firstIdx), second dense index (secondIdx), and the second sparse index (secondSparseIdx). The advance() function is implemented to update those three additional indices.
using axom::slam::BivariateMap< SetType, DataType, StridePolicy >::BivariateMapIterator::PositionType = SetPosition |
|
inline |
Construct a new BivariateMap Iterator given an ElementFlatIndex.
Referenced by axom::slam::BivariateMap< SetType, DataType, StridePolicy >::begin(), and axom::slam::BivariateMap< SetType, DataType, StridePolicy >::end().
|
inline |
|
inline |
|
inline |
Returns the current iterator value. If the BivariateMap has multiple components, this will return the first component. To access the other components, use iter(comp)
|
inline |
Returns the iterator's value at the specified component. Returns the first component if comp_idx is not specified.
comp_idx | (Optional) Zero-based index of the component. |
|
inline |
Returns the first component value after n increments.
References axom::slam::IteratorBase< BivariateMapIterator, SetPosition >::operator+.
|
inline |
Return the value at the iterator's position. Same as operator()
|
inline |
return the current iterator's first index into the BivariateSet
|
inline |
return the current iterator's second index (DenseIndex) into the BivariateSet
References axom::slam::BivariateSet< PosType, ElemType >::at(), axom::slam::IteratorBase< BivariateMapIterator, SetPosition >::m_pos, and axom::slam::BivariateMap< SetType, DataType, StridePolicy >::set().
|
inline |
Returns the number of components per element in the map.
References axom::slam::BivariateSet< PosType, ElemType >::at(), axom::slam::BivariateMap< SetType, DataType, StridePolicy >::firstSetSize(), axom::slam::BivariateMap< SetType, DataType, StridePolicy >::BivariateMapIterator::INVALID_POS, axom::slam::IteratorBase< BivariateMapIterator, SetPosition >::m_pos, axom::slam::BivariateMap< SetType, DataType, StridePolicy >::numComp(), axom::slam::BivariateMap< SetType, DataType, StridePolicy >::set(), axom::slam::BivariateSet< PosType, ElemType >::size(), SLIC_ASSERT, and axom::slam::BivariateMap< SetType, DataType, StridePolicy >::totalSize().
|
inlineprotected |
Implementation of advance() as required by IteratorBase. It updates the three other indices as well.
References axom::slam::BivariateMap< SetType, DataType, StridePolicy >::firstSetSize(), axom::slam::BivariateMap< SetType, DataType, StridePolicy >::BivariateMapIterator::INVALID_POS, axom::slam::IteratorBase< BivariateMapIterator, SetPosition >::m_pos, axom::slam::BivariateMap< SetType, DataType, StridePolicy >::size(), and axom::slam::BivariateMap< SetType, DataType, StridePolicy >::totalSize().
|
inlineinherited |
Pre-increment operator.
|
inlineinherited |
Post-increment operator.
|
inlineinherited |
Pre-decrement operator.
|
inlineinherited |
Post-decrement operator.
|
inlineinherited |
Addition-assignment operator.
|
inlineinherited |
Subtraction-assignment operator.
const PositionType axom::slam::BivariateMap< SetType, DataType, StridePolicy >::BivariateMapIterator::INVALID_POS = -2 |
|
protectedinherited |
Referenced by axom::slam::BivariateMap< SetType, DataType, StridePolicy >::BivariateMapIterator::advance(), axom::slam::BivariateMap< SetType, DataType, StridePolicy >::BivariateMapIterator::numComp(), axom::slam::BivariateMap< SetType, DataType, StridePolicy >::BivariateMapIterator::operator==(), and axom::slam::BivariateMap< SetType, DataType, StridePolicy >::BivariateMapIterator::secondIndex().