MultiIndexIterator< MultiIndex > Class Template Reference
|
CPP API
|
Public Types |
Public Member Functions |
Private Member Functions |
Private Attributes |
List of all members
mio::MultiIndexIterator< MultiIndex > Class Template Reference
A Range that can be used to iterate over a MultiIndex. More...
#include <index_range.h>
Public Types | |
| using | difference_type = std::ptrdiff_t |
| using | iterator_category = std::forward_iterator_tag |
| using | pointer = void |
| using | reference = value_type |
| using | value_type = MultiIndex |
Public Member Functions | |
| MultiIndexIterator () | |
| Default constructed MultiIndexIterator. More... | |
| MultiIndexIterator (value_type index, reference dimensions) | |
| Iterator for MultiIndices. More... | |
| bool | operator!= (const MultiIndexIterator &other) const |
| Inequality operator. More... | |
| reference | operator* () const |
| Dereference operator. More... | |
| MultiIndexIterator & | operator++ () |
| Pre-increment operator. More... | |
| MultiIndexIterator | operator++ (int) |
| Post-increment operator. More... | |
| bool | operator== (const MultiIndexIterator &other) const |
| Equality operator. More... | |
Private Member Functions | |
| template<size_t I = MultiIndex::size - 1> | |
| void | increment_index () |
| Implementation of ++. More... | |
Private Attributes | |
| value_type | m_dims |
| Copy of range dimensions. More... | |
| value_type | m_index |
| Index used for iteration. More... | |
Detailed Description
template<class MultiIndex>
class mio::MultiIndexIterator< MultiIndex >
A Range that can be used to iterate over a MultiIndex.
- Template Parameters
-
MultiIndex A type mio::Index<Categories...> for some set of categories.
Member Typedef Documentation
◆ difference_type
template<class MultiIndex >
| using mio::MultiIndexIterator< MultiIndex >::difference_type = std::ptrdiff_t |
◆ iterator_category
template<class MultiIndex >
| using mio::MultiIndexIterator< MultiIndex >::iterator_category = std::forward_iterator_tag |
◆ pointer
template<class MultiIndex >
| using mio::MultiIndexIterator< MultiIndex >::pointer = void |
◆ reference
template<class MultiIndex >
| using mio::MultiIndexIterator< MultiIndex >::reference = value_type |
◆ value_type
template<class MultiIndex >
| using mio::MultiIndexIterator< MultiIndex >::value_type = MultiIndex |
Constructor & Destructor Documentation
◆ MultiIndexIterator() [1/2]
template<class MultiIndex >
|
inline |
Default constructed MultiIndexIterator.
This will not construct a valid iterator.
◆ MultiIndexIterator() [2/2]
template<class MultiIndex >
|
inline |
Iterator for MultiIndices.
- Parameters
-
index Initial value for the iterator position. dimensions A reference to the dimensions of the MultiIndex.
Member Function Documentation
◆ increment_index()
template<class MultiIndex >
template<size_t I = MultiIndex::size - 1>
|
inlineprivate |
Implementation of ++.
Increments m_index.
- Template Parameters
-
I position in the MultiIndex.
◆ operator!=()
template<class MultiIndex >
|
inline |
Inequality operator.
◆ operator*()
template<class MultiIndex >
|
inline |
Dereference operator.
◆ operator++() [1/2]
template<class MultiIndex >
|
inline |
Pre-increment operator.
◆ operator++() [2/2]
template<class MultiIndex >
|
inline |
Post-increment operator.
◆ operator==()
template<class MultiIndex >
|
inline |
Equality operator.
Member Data Documentation
◆ m_dims
template<class MultiIndex >
|
private |
Copy of range dimensions.
◆ m_index
template<class MultiIndex >
|
private |
Index used for iteration.
Generated by