AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
An iterator type for a map. Each increment operation advances the iterator to the next set element. To access the jth component values of the iterator's current element, use iter(j)
.
More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/slam/Map.hpp>
Public Types | |
using | IterBase = IteratorBase< MapRangeIterator, SetPosition > |
using | MapConstPtr = std::conditional_t< Const, const Map *, Map * > |
using | DataRefType = std::conditional_t< Const, ConstValueType, ValueType > |
using | DataType = std::remove_reference_t< DataRefType > |
using | PositionType = SetPosition |
using | StrideIndexType = typename StridePolicyType::IndexType |
using | iterator_category = std::random_access_iterator_tag |
using | value_type = axom::ArrayView< DataType, Dims > |
using | reference = const value_type & |
using | pointer = const value_type * |
using | difference_type = SetPosition |
Equality and relational operators | |
using | iterator = IteratorBase< MapRangeIterator< Const >, SetPosition > |
Public Member Functions | |
MapRangeIterator (MapConstPtr oMap, PositionType pos) | |
AXOM_HOST_DEVICE reference | operator* () const |
Returns the current iterator value. More... | |
AXOM_HOST_DEVICE pointer | operator-> () const |
template<typename... ComponentIndex> | |
AXOM_HOST_DEVICE DataRefType | operator() (ComponentIndex... comp_idx) const |
Returns the iterator's value at the specified component. Returns the first component if comp_idx is not specified. More... | |
template<typename ComponentIndex > | |
AXOM_HOST_DEVICE DataRefType | value (ComponentIndex comp_idx) const |
template<typename... ComponentIndex> | |
AXOM_HOST_DEVICE DataRefType | value (ComponentIndex... comp_idx) const |
value_type | operator[] (PositionType n) const |
SetElement | index () const |
Returns the set element mapped by this iterator. More... | |
SetPosition | flatIndex () const |
Returns the flat index pointed to by this iterator. More... | |
PositionType | numComp () const |
Returns the number of components per element in the Map. More... | |
Iterator advance and distance operators | |
AXOM_HOST_DEVICE MapRangeIterator< Const > & | operator++ () |
Pre-increment operator. More... | |
MapRangeIterator< Const > | operator++ (int) |
Post-increment operator. More... | |
MapRangeIterator< Const > & | operator-- () |
Pre-decrement operator. More... | |
MapRangeIterator< Const > | operator-- (int) |
Post-decrement operator. More... | |
MapRangeIterator< Const > & | operator+= (SetPosition n) |
Addition-assignment operator. More... | |
MapRangeIterator< Const > & | operator-= (SetPosition n) |
Subtraction-assignment operator. More... | |
Static Public Attributes | |
constexpr static int | Dims = StridePolicyType::NumDims |
Protected Member Functions | |
AXOM_HOST_DEVICE void | advance (PositionType n) |
Protected Attributes | |
SetPosition | m_pos |
An iterator type for a map. Each increment operation advances the iterator to the next set element. To access the jth component values of the iterator's current element, use iter(j)
.
iter[off]
) and the parenthesis operator ( iter(j)
). iter[off]
returns the value of the first component of the element at offset off
from the currently pointed to element.iter(j)
returns the value of the jth component of the currently pointed to element (where 0 <= j < numComp()).iter[off]
is the same as (iter+off)(0)
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapRangeIterator< Const >::IterBase = IteratorBase<MapRangeIterator, SetPosition> |
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapRangeIterator< Const >::MapConstPtr = std::conditional_t<Const, const Map*, Map*> |
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapRangeIterator< Const >::DataRefType = std::conditional_t<Const, ConstValueType, ValueType> |
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapRangeIterator< Const >::DataType = std::remove_reference_t<DataRefType> |
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapRangeIterator< Const >::PositionType = SetPosition |
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapRangeIterator< Const >::StrideIndexType = typename StridePolicyType::IndexType |
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapRangeIterator< Const >::iterator_category = std::random_access_iterator_tag |
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapRangeIterator< Const >::value_type = axom::ArrayView<DataType, Dims> |
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapRangeIterator< Const >::reference = const value_type& |
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapRangeIterator< Const >::pointer = const value_type* |
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapRangeIterator< Const >::difference_type = SetPosition |
|
inherited |
|
inline |
|
inline |
Returns the current iterator value.
|
inline |
|
inline |
Returns the iterator's value at the specified component. Returns the first component if comp_idx is not specified.
comp_idx | Zero-based index of the component. |
References axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapRangeIterator< Const >::value().
|
inline |
|
inline |
|
inline |
|
inline |
Returns the set element mapped by this iterator.
References axom::IteratorBase< MapRangeIterator< Const >, SetPosition >::m_pos.
|
inline |
Returns the flat index pointed to by this iterator.
References axom::IteratorBase< MapRangeIterator< Const >, SetPosition >::m_pos.
|
inline |
Returns the number of components per element in the Map.
|
inlineprotected |
Implementation of advance() as required by IteratorBase
References axom::IteratorBase< MapRangeIterator< Const >, SetPosition >::m_pos.
|
inlineinherited |
Pre-increment operator.
|
inlineinherited |
Post-increment operator.
|
inlineinherited |
Pre-decrement operator.
|
inlineinherited |
Post-decrement operator.
|
inlineinherited |
Addition-assignment operator.
|
inlineinherited |
Subtraction-assignment operator.
|
staticconstexpr |
|
protectedinherited |