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

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

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

Inheritance diagram for axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator:

Public Types

using iterator_category = std::random_access_iterator_tag
 
using value_type = DataType
 
using difference_type = SetPosition
 
using IterBase = IteratorBase< SubMapIterator, SetPosition >
 
using iter = SubMapIterator
 
using PositionType = SetPosition
 

Public Member Functions

 SubMapIterator (PositionType pos, SubMap *sMap)
 
DataType & operator* ()
 Returns the current iterator value. If the SubMap has multiple components, this will return the first component. To access the other components, use iter(comp) More...
 
DataType & operator() (IndexType comp=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 (IndexType comp=0)
 Same as operator() More...
 
IndexType index ()
 Returns the Set element at the iterator's position. More...
 
PositionType numComp () const
 Returns the number of component per element in the SubMap. More...
 
Iterator advance and distance operators
SubMapIteratoroperator++ ()
 Pre-increment operator. More...
 
SubMapIterator operator++ (int)
 Post-increment operator. More...
 
SubMapIteratoroperator-- ()
 Pre-decrement operator. More...
 
SubMapIterator operator-- (int)
 Post-decrement operator. More...
 
SubMapIteratoroperator+= (SetPosition n)
 Addition-assignment operator. More...
 
SubMapIteratoroperator-= (SetPosition n)
 Subtraction-assignment operator. More...
 

Protected Member Functions

void advance (PositionType pos)
 

Protected Attributes

SetPosition m_pos
 

Detailed Description

template<typename SetType, typename DataType, typename SuperMapType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
class axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator

An iterator for SubMap, based on MapIterator.

See also
MapIterator

Member Typedef Documentation

◆ iterator_category

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
using axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::iterator_category = std::random_access_iterator_tag

◆ value_type

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
using axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::value_type = DataType

◆ difference_type

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
using axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::difference_type = SetPosition

◆ IterBase

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
using axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::IterBase = IteratorBase<SubMapIterator, SetPosition>

◆ iter

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
using axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::iter = SubMapIterator

◆ PositionType

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
using axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::PositionType = SetPosition

Constructor & Destructor Documentation

◆ SubMapIterator()

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::SubMapIterator ( PositionType  pos,
SubMap sMap 
)
inline

Member Function Documentation

◆ operator*()

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
DataType& axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::operator* ( )
inline

Returns the current iterator value. If the SubMap has multiple components, this will return the first component. To access the other components, use iter(comp)

References axom::slam::IteratorBase< SubMapIterator, SetPosition >::m_pos.

◆ operator()()

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
DataType& axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::operator() ( IndexType  comp = 0)
inline

Returns the iterator's value at the specified component. Returns the first component if comp_idx is not specified.

Parameters
comp_idx(Optional) Zero-based index of the component.

References axom::slam::IteratorBase< SubMapIterator, SetPosition >::m_pos.

◆ operator[]()

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
DataType& axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::operator[] ( PositionType  n)
inline

Returns the first component value after n increments.

◆ value()

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
DataType& axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::value ( IndexType  comp = 0)
inline

◆ index()

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
IndexType axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::index ( )
inline

◆ numComp()

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
PositionType axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::numComp ( ) const
inline

Returns the number of component per element in the SubMap.

References axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::numComp().

◆ advance()

template<typename SetType , typename DataType , typename SuperMapType , typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
void axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::SubMapIterator::advance ( PositionType  pos)
inlineprotected

◆ operator++() [1/2]

SubMapIterator & axom::slam::IteratorBase< SubMapIterator , SetPosition >::operator++ ( )
inlineinherited

Pre-increment operator.

◆ operator++() [2/2]

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

Post-increment operator.

◆ operator--() [1/2]

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

Pre-decrement operator.

◆ operator--() [2/2]

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

Post-decrement operator.

◆ operator+=()

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

Addition-assignment operator.

◆ operator-=()

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

Subtraction-assignment operator.

Member Data Documentation

◆ m_pos


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