AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const > Class Template Reference

An iterator type for a map. Each increment operation advances the iterator to the element at the next flat index. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/slam/Map.hpp>

Inheritance diagram for axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >:

Public Types

using DataRefType = std::conditional_t< Const, ConstValueType, ValueType >
 
using DataType = std::remove_reference_t< DataRefType >
 
using iterator_category = std::random_access_iterator_tag
 
using value_type = DataType
 
using reference = DataRefType
 
using pointer = value_type *
 
using difference_type = SetPosition
 
using IterBase = IteratorBase< MapIterator, SetPosition >
 
using MapConstPtr = std::conditional_t< Const, const Map *, Map * >
 
using iter = MapIterator
 
using PositionType = SetPosition
 
Equality and relational operators
using iterator = IteratorBase< MapIterator< Const >, SetPosition >
 

Public Member Functions

 MapIterator (PositionType pos, MapConstPtr oMap)
 
AXOM_HOST_DEVICE reference operator* () const
 Returns the current iterator value. More...
 
AXOM_HOST_DEVICE pointer operator-> () const
 
SetElement index () const
 Returns the set element mapped by this iterator. More...
 
PositionType compIndex () const
 Returns the component index pointed to by this iterator. More...
 
SetPosition flatIndex () const
 Returns the flat index pointed to by this iterator. More...
 
Iterator advance and distance operators
AXOM_HOST_DEVICE MapIterator< Const > & operator++ ()
 Pre-increment operator. More...
 
MapIterator< Const > operator++ (int)
 Post-increment operator. More...
 
MapIterator< Const > & operator-- ()
 Pre-decrement operator. More...
 
MapIterator< Const > operator-- (int)
 Post-decrement operator. More...
 
MapIterator< Const > & operator+= (SetPosition n)
 Addition-assignment operator. More...
 
MapIterator< Const > & operator-= (SetPosition n)
 Subtraction-assignment operator. More...
 

Public Attributes

PosType m_pos
 

Protected Member Functions

AXOM_HOST_DEVICE void advance (PositionType n)
 

Detailed Description

template<typename T, typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
class axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >

An iterator type for a map. Each increment operation advances the iterator to the element at the next flat index.

Member Typedef Documentation

◆ DataRefType

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::DataRefType = std::conditional_t<Const, ConstValueType, ValueType>

◆ DataType

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::DataType = std::remove_reference_t<DataRefType>

◆ iterator_category

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::iterator_category = std::random_access_iterator_tag

◆ value_type

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::value_type = DataType

◆ reference

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::reference = DataRefType

◆ pointer

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::pointer = value_type*

◆ difference_type

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::difference_type = SetPosition

◆ IterBase

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::IterBase = IteratorBase<MapIterator, SetPosition>

◆ MapConstPtr

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::MapConstPtr = std::conditional_t<Const, const Map*, Map*>

◆ iter

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::iter = MapIterator

◆ PositionType

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
using axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::PositionType = SetPosition

◆ iterator

Constructor & Destructor Documentation

◆ MapIterator()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::MapIterator ( PositionType  pos,
MapConstPtr  oMap 
)
inline

Member Function Documentation

◆ operator*()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
AXOM_HOST_DEVICE reference axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::operator* ( ) const
inline

◆ operator->()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
AXOM_HOST_DEVICE pointer axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::operator-> ( ) const
inline

◆ index()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
SetElement axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::index ( ) const
inline

Returns the set element mapped by this iterator.

References axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::m_pos.

◆ compIndex()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
PositionType axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::compIndex ( ) const
inline

Returns the component index pointed to by this iterator.

References axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::m_pos.

◆ flatIndex()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
SetPosition axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::flatIndex ( ) const
inline

Returns the flat index pointed to by this iterator.

References axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::m_pos.

◆ advance()

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
AXOM_HOST_DEVICE void axom::slam::Map< T, S, IndPol, StrPol, IfacePol >::MapIterator< Const >::advance ( PositionType  n)
inlineprotected

◆ operator++() [1/2]

AXOM_HOST_DEVICE MapIterator< Const > & axom::IteratorBase< MapIterator< Const > , SetPosition >::operator++ ( )
inlineinherited

Pre-increment operator.

◆ operator++() [2/2]

MapIterator< Const > axom::IteratorBase< MapIterator< Const > , SetPosition >::operator++ ( int  )
inlineinherited

Post-increment operator.

◆ operator--() [1/2]

MapIterator< Const > & axom::IteratorBase< MapIterator< Const > , SetPosition >::operator-- ( )
inlineinherited

Pre-decrement operator.

◆ operator--() [2/2]

MapIterator< Const > axom::IteratorBase< MapIterator< Const > , SetPosition >::operator-- ( int  )
inlineinherited

Post-decrement operator.

◆ operator+=()

MapIterator< Const > & axom::IteratorBase< MapIterator< Const > , SetPosition >::operator+= ( SetPosition  n)
inlineinherited

Addition-assignment operator.

◆ operator-=()

MapIterator< Const > & axom::IteratorBase< MapIterator< Const > , SetPosition >::operator-= ( SetPosition  n)
inlineinherited

Subtraction-assignment operator.

Member Data Documentation

◆ m_pos

template<typename T , typename S = Set<>, typename IndPol = policies::STLVectorIndirection<typename S::PositionType, T>, typename StrPol = policies::StrideOne<typename S::PositionType>, typename IfacePol = policies::VirtualInterface>
template<bool Const>
PosType axom::IteratorBase< IterType, PosType >::m_pos

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