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/v0.5.0/src/axom/slam/Map.hpp>
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
class axom::slam::Map< SetType, DataType, StridePolicy >::MapIterator
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)
.
- Warning
- Note the difference between the subscript operator (
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.
And iter(j)
returns the value of the jth component of the currently pointed to element (where 0 <= j < numComp()).
For example: iter[off]
is the same as (iter+off)(0)
◆ iterator_category
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
◆ value_type
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
◆ difference_type
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
◆ IterBase
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
◆ iter
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
◆ PositionType
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
◆ MapIterator()
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
◆ operator*()
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
DataType& axom::slam::Map< SetType, DataType, StridePolicy >::MapIterator::operator* |
( |
| ) |
|
|
inline |
Returns the current iterator value. If the map has multiple components, this will return the first component. To access the other components, use iter(comp)
◆ operator()()
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
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. |
◆ operator[]() [1/2]
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
◆ operator[]() [2/2]
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
◆ numComp()
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
Returns the number of components per element in the Map.
◆ advance()
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
◆ operator++() [1/2]
◆ operator++() [2/2]
◆ operator--() [1/2]
◆ operator--() [2/2]
◆ operator+=()
Addition-assignment operator.
◆ operator-=()
Subtraction-assignment operator.
◆ m_mapPtr
template<typename SetType, typename DataType, typename StridePolicy = policies::StrideOne<typename SetType::PositionType>>
◆ m_pos
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/slam/Map.hpp