AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator Class Reference

An iterator for SubMap, based on MapIterator. More...

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

Inheritance diagram for axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator:

Public Types

using iterator_category = std::random_access_iterator_tag
 
using value_type = DataType
 
using reference = DataRefType
 
using pointer = DataType *
 
using difference_type = SetPosition
 
using IterBase = IteratorBase< Iterator, SetPosition >
 
using iter = Iterator
 
using PositionType = SetPosition
 
Equality and relational operators
using iterator = IteratorBase< Iterator, SetPosition >
 

Public Member Functions

AXOM_HOST_DEVICE Iterator (PositionType pos, SubMap sMap)
 
AXOM_HOST_DEVICE DataRefType operator* () const
 Returns the current iterator value. More...
 
pointer operator-> () const
 
DataRefType operator[] (PositionType n) const
 Returns the first component value after n increments.
More...
 
IndexType index () const
 Returns the Set element at the iterator's position. 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...
 
PositionType numComp () const
 Returns the number of component per element in the SubMap. More...
 
Iterator advance and distance operators
AXOM_HOST_DEVICE Iteratoroperator++ ()
 Pre-increment operator. More...
 
Iterator operator++ (int)
 Post-increment operator. More...
 
Iteratoroperator-- ()
 Pre-decrement operator. More...
 
Iterator operator-- (int)
 Post-decrement operator. More...
 
Iteratoroperator+= (SetPosition n)
 Addition-assignment operator. More...
 
Iteratoroperator-= (SetPosition n)
 Subtraction-assignment operator. More...
 

Protected Member Functions

AXOM_HOST_DEVICE void advance (PositionType pos)
 

Protected Attributes

SetPosition m_pos
 

Detailed Description

template<typename SuperMapType, typename SubsetType, typename InterfacePolicy = policies::VirtualInterface>
class axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator

An iterator for SubMap, based on MapIterator.

See also
MapIterator

Member Typedef Documentation

◆ iterator_category

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
using axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::iterator_category = std::random_access_iterator_tag

◆ value_type

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
using axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::value_type = DataType

◆ reference

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
using axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::reference = DataRefType

◆ pointer

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
using axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::pointer = DataType*

◆ difference_type

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
using axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::difference_type = SetPosition

◆ IterBase

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
using axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::IterBase = IteratorBase<Iterator, SetPosition>

◆ iter

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
using axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::iter = Iterator

◆ PositionType

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
using axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::PositionType = SetPosition

◆ iterator

Constructor & Destructor Documentation

◆ Iterator()

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
AXOM_HOST_DEVICE axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::Iterator ( PositionType  pos,
SubMap  sMap 
)
inline

Member Function Documentation

◆ operator*()

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
AXOM_HOST_DEVICE DataRefType axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::operator* ( ) const
inline

Returns the current iterator value.

◆ operator->()

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
pointer axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::operator-> ( ) const
inline

◆ operator[]()

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
DataRefType axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::operator[] ( PositionType  n) const
inline

Returns the first component value after n increments.

◆ index()

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
IndexType axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::index ( ) const
inline

Returns the Set element at the iterator's position.

◆ compIndex()

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
PositionType axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::compIndex ( ) const
inline

Returns the component index pointed to by this iterator.

◆ flatIndex()

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
SetPosition axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::flatIndex ( ) const
inline

Returns the flat index pointed to by this iterator.

◆ numComp()

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
PositionType axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::numComp ( ) const
inline

Returns the number of component per element in the SubMap.

◆ advance()

template<typename SuperMapType , typename SubsetType , typename InterfacePolicy = policies::VirtualInterface>
AXOM_HOST_DEVICE void axom::slam::SubMap< SuperMapType, SubsetType, InterfacePolicy >::Iterator::advance ( PositionType  pos)
inlineprotected

◆ operator++() [1/2]

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

Pre-increment operator.

◆ operator++() [2/2]

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

Post-increment operator.

◆ operator--() [1/2]

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

Pre-decrement operator.

◆ operator--() [2/2]

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

Post-decrement operator.

◆ operator+=()

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

Addition-assignment operator.

◆ operator-=()

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

Subtraction-assignment operator.

Member Data Documentation

◆ m_pos

SetPosition axom::IteratorBase< Iterator , SetPosition >::m_pos
protectedinherited

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