|
ADS
Algorithms and Data Structures
|
a forward iterator along the cells C of a vector linked by the index in the member Next, on the items V in the member Value; -1 is the end More...
#include <ADS/Iterators.h>
Public types | |
| using | iterator_category = std::forward_iterator_tag |
| forward | |
| using | value_type = V |
| the items | |
| using | difference_type = std::ptrdiff_t |
| the distances | |
| using | reference = std::conditional_t< Const , const V & , V & > |
| a reference to an item, constant if Const | |
| using | pointer = std::conditional_t< Const , const V * , V * > |
| a pointer to an item, constant if Const | |
Public member functions | |
| IndexIterator (void)=default | |
| the end | |
| IndexIterator (Cells *A, int c) | |
| on the item of the cell \( A[ c ] \), the end if \( c = -1 \) | |
| template<bool K> requires ( Const && ! K ) | |
| IndexIterator (const IndexIterator< C, V, Next, Value, K > &o) | |
| the constant iterator from the mutable one | |
| reference | operator* (void) const |
| the item | |
| pointer | operator-> (void) const |
| the address of the item | |
| IndexIterator & | operator++ (void) |
| to the next cell, by the index Next | |
| IndexIterator | operator++ (int) |
| to the next cell, returning the iterator before the step | |
| bool | operator== (const IndexIterator &o) const |
| equal on the same cell; any two ends are equal | |
| Cells * | cells (void) const |
| the vector of the cells | |
| int | index (void) const |
| the index of the cell, -1 at the end | |
a forward iterator along the cells C of a vector linked by the index in the member Next, on the items V in the member Value; -1 is the end
| using ADS::IndexIterator< C, V, Next, Value, Const >::difference_type = std::ptrdiff_t |
the distances
| using ADS::IndexIterator< C, V, Next, Value, Const >::iterator_category = std::forward_iterator_tag |
forward
| using ADS::IndexIterator< C, V, Next, Value, Const >::pointer = std::conditional_t< Const , const V * , V * > |
a pointer to an item, constant if Const
| using ADS::IndexIterator< C, V, Next, Value, Const >::reference = std::conditional_t< Const , const V & , V & > |
a reference to an item, constant if Const
| using ADS::IndexIterator< C, V, Next, Value, Const >::value_type = V |
the items
|
default |
the end
|
inline |
on the item of the cell \( A[ c ] \), the end if \( c = -1 \)
|
inline |
the constant iterator from the mutable one
|
inlinenodiscard |
the vector of the cells
|
inlinenodiscard |
the index of the cell, -1 at the end
|
inline |
the item
|
inline |
to the next cell, returning the iterator before the step
|
inline |
to the next cell, by the index Next
|
inline |
the address of the item
|
inline |
equal on the same cell; any two ends are equal