ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
Iterators.h

The iterators that the containers of the library have in common, beyond the book. More...

Files

file  ADS/Iterators.h
 The iterators that the containers of the library have in common, beyond the book: they give a container the interface of the standard library (begin(), end(), the categories of the iterators), so that the range-for, the algorithms of std and of std::ranges, and those of Boost visit it.

Classes

class  ADS::LinkedIterator< C, V, Next, Value, Const >
 a forward iterator along the cells C linked by the member Next, on the items V in the member Value; nil is the end More...
class  ADS::IndexIterator< C, V, Next, Value, Const >
 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...
class  ADS::CircularIterator< T, Const >
 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...
class  ADS::RankIterator< C, T, Const >
 the random-access iterator on the items of a container C read by rank, c[ i ] the item \( i \), of the type T More...
class  ADS::IndirectIterator< I >
 the random-access iterator I on pointers read through them, *it being **base; the items are constant More...
class  ADS::SlotIterator< O, P >
 a bidirectional iterator on the occupied places of the table O, by the policy P with the static functions size( o ), occupied( o , i ) and read( o , i ); the items are constant More...
class  ADS::KeyIterator< I >
 the member first of what the iterator I reads, with the category of I up to bidirectional More...
class  ADS::PathIterator< O, P >
 a bidirectional iterator on the nodes of a binary tree of the owner O in symmetric order, by the policy P with the static functions root( o ), left( n ), right( n ) (nil for no child) and read( n ); the items are constant, and the end is the empty path More...
class  ADS::WalkIterator< O, H, P >
 a forward iterator on the nodes H (pointers or indices) of the owner O, from a first node, by the policy P with next( o , n , root ) and the constant none, the end, o being a pointer to the owner; *it is the node More...

Typedefs

template<class A, class B, class VA = std::remove_cvref_t< A >, class VB = std::remove_cvref_t< B >>
using ADS::PairRef
 the pair \( ( a , b ) \) that an iterator reads by value, in general two references into the container, whose value type is the pair of the copies \( ( V_A , V_B ) \), what std::ranges::range_value_t gives: the std::pair itself where the standard library declares the common reference of the two pairs (C++23, with \( V_A \) and \( V_B \) the types of \( a \) and \( b \)), a class derived from it that declares it otherwise

Detailed description

The iterators that the containers of the library have in common, beyond the book.

The definitions, the invariants and the costs of the area are in Theory of the foundations.

Typedef documentation

◆ PairRef

template<class A, class B, class VA = std::remove_cvref_t< A >, class VB = std::remove_cvref_t< B >>
using ADS::PairRef
Initial value:
std::conditional_t< detail::plainPair< A , B , VA , VB > ,
std::pair< A , B > ,
detail::PairProxy< A , B , VA , VB > >

the pair \( ( a , b ) \) that an iterator reads by value, in general two references into the container, whose value type is the pair of the copies \( ( V_A , V_B ) \), what std::ranges::range_value_t gives: the std::pair itself where the standard library declares the common reference of the two pairs (C++23, with \( V_A \) and \( V_B \) the types of \( a \) and \( b \)), a class derived from it that declares it otherwise