|
ADS
Algorithms and Data Structures
|
the random-access iterator on the items of a circular vector of the capacity \( c \) whose first item is at the place \( \mathit{head} \), the item \( i \) at the place \( ( \mathit{head} + i ) \bmod c \) More...
#include <ADS/Iterators.h>
Public types | |
| using | iterator_category = std::random_access_iterator_tag |
| random access | |
| using | value_type = T |
| the items | |
| using | difference_type = std::ptrdiff_t |
| the distances | |
| using | reference = Item & |
| a reference to an item | |
| using | pointer = Item * |
| a pointer to an item | |
Public member functions | |
| CircularIterator (void)=default | |
| an iterator on no vector | |
| CircularIterator (Item *A, std::size_t head, std::size_t capacity, difference_type i) | |
| on the item \( i \) from the head of the vector \( A \) | |
| template<bool K> requires ( Const && ! K ) | |
| CircularIterator (const CircularIterator< T, K > &o) | |
| the constant iterator from the mutable one | |
| reference | operator* (void) const |
| the item | |
| pointer | operator-> (void) const |
| the address of the item | |
| reference | operator[] (difference_type k) const |
| the item \( k \) places on, at the place \( ( \mathit{head} + i + k ) \bmod c \) | |
| CircularIterator & | operator++ (void) |
| to the next item | |
| CircularIterator & | operator-- (void) |
| to the previous item | |
| CircularIterator | operator++ (int) |
| to the next item, returning the iterator before the step | |
| CircularIterator | operator-- (int) |
| to the previous item, returning the iterator before the step | |
| CircularIterator & | operator+= (difference_type k) |
| \( k \) items on | |
| CircularIterator & | operator-= (difference_type k) |
| \( k \) items back | |
| bool | operator== (const CircularIterator &o) const |
| equal on the same index from the head | |
| std::strong_ordering | operator<=> (const CircularIterator &o) const |
| the order of the indices from the head | |
| Item * | base (void) const |
| the vector | |
| std::size_t | head (void) const |
| the place of the first item | |
| std::size_t | capacity (void) const |
| the capacity \( c \) of the vector | |
| difference_type | index (void) const |
| the index \( i \) of the item from the head | |
Friends | |
| CircularIterator | operator+ (CircularIterator a, difference_type k) |
| CircularIterator | operator+ (difference_type k, CircularIterator a) |
| CircularIterator | operator- (CircularIterator a, difference_type k) |
| difference_type | operator- (const CircularIterator &a, const CircularIterator &b) |
the random-access iterator on the items of a circular vector of the capacity \( c \) whose first item is at the place \( \mathit{head} \), the item \( i \) at the place \( ( \mathit{head} + i ) \bmod c \)
| using ADS::CircularIterator< T, Const >::difference_type = std::ptrdiff_t |
the distances
| using ADS::CircularIterator< T, Const >::iterator_category = std::random_access_iterator_tag |
random access
| using ADS::CircularIterator< T, Const >::pointer = Item * |
a pointer to an item
| using ADS::CircularIterator< T, Const >::reference = Item & |
a reference to an item
| using ADS::CircularIterator< T, Const >::value_type = T |
the items
|
default |
an iterator on no vector
|
inline |
on the item \( i \) from the head of the vector \( A \)
|
inline |
the constant iterator from the mutable one
|
inlinenodiscard |
the vector
|
inlinenodiscard |
the capacity \( c \) of the vector
|
inlinenodiscard |
the place of the first item
|
inlinenodiscard |
the index \( i \) of the item from the head
|
inline |
the item
|
inline |
to the next item, returning the iterator before the step
|
inline |
to the next item
|
inline |
\( k \) items on
|
inline |
to the previous item, returning the iterator before the step
|
inline |
to the previous item
|
inline |
\( k \) items back
|
inline |
the address of the item
|
inline |
the order of the indices from the head
|
inline |
equal on the same index from the head
|
inline |
the item \( k \) places on, at the place \( ( \mathit{head} + i + k ) \bmod c \)
|
friend |
|
friend |
|
friend |
|
friend |