the iterator on the pairs by increasing keys: a leaf, a place in it and the parent of the leaf
More...
|
| using | value_type = std::pair< K , V > |
| | the pairs ( key , value ) by value, which own their copies
|
| using | reference = PairRef< const K & , const V & > |
| | a pair of references, by value
|
| using | difference_type = std::ptrdiff_t |
| | the type of the distances
|
| using | iterator_concept = std::bidirectional_iterator_tag |
| | the category of the iterator for the concepts of C++20, bidirectional
|
| using | iterator_category = std::input_iterator_tag |
| | input for the older algorithms, since *it is a value
|
template<class K, class V, class Less = std::less< K >, std::size_t B = 512, bool R = false, class A = HugePageAllocator< std::pair< const K , V > >>
class ADS::BTreeMap< K, V, Less, B, R, A >::const_iterator
the iterator on the pairs by increasing keys: a leaf, a place in it and the parent of the leaf
template<class K, class V, class Less = std::less< K >, std::size_t B = 512, bool R = false, class A = HugePageAllocator< std::pair< const K , V > >>
| using ADS::BTreeMap< K, V, Less, B, R, A >::const_iterator::difference_type = std::ptrdiff_t |
the type of the distances
template<class K, class V, class Less = std::less< K >, std::size_t B = 512, bool R = false, class A = HugePageAllocator< std::pair< const K , V > >>
| using ADS::BTreeMap< K, V, Less, B, R, A >::const_iterator::iterator_category = std::input_iterator_tag |
input for the older algorithms, since *it is a value
template<class K, class V, class Less = std::less< K >, std::size_t B = 512, bool R = false, class A = HugePageAllocator< std::pair< const K , V > >>
| using ADS::BTreeMap< K, V, Less, B, R, A >::const_iterator::iterator_concept = std::bidirectional_iterator_tag |
the category of the iterator for the concepts of C++20, bidirectional
template<class K, class V, class Less = std::less< K >, std::size_t B = 512, bool R = false, class A = HugePageAllocator< std::pair< const K , V > >>
| using ADS::BTreeMap< K, V, Less, B, R, A >::const_iterator::reference = PairRef< const K & , const V & > |
a pair of references, by value
template<class K, class V, class Less = std::less< K >, std::size_t B = 512, bool R = false, class A = HugePageAllocator< std::pair< const K , V > >>
| using ADS::BTreeMap< K, V, Less, B, R, A >::const_iterator::value_type = std::pair< K , V > |
the pairs ( key , value ) by value, which own their copies
template<class K, class V, class Less = std::less< K >, std::size_t B = 512, bool R = false, class A = HugePageAllocator< std::pair< const K , V > >>
to the next pair, returning the iterator before the step
template<class K, class V, class Less = std::less< K >, std::size_t B = 512, bool R = false, class A = HugePageAllocator< std::pair< const K , V > >>
to the next pair, to the next leaf through the parent at the end of a leaf
In pseudocode (beyond the book), \( ( l , i ) \) the leaf and the place, \( ( p , c ) \) the parent and the child that is \( l \):
\[\class{pseudocode}{\begin{array}{r@{\quad}l}
1 & \textbf{procedure}\ \mathrm{next}() \cr
2 & \quad i \gets i + 1;\ \textbf{if}\ i < l.n\ \textbf{then return}
\cr
3 & \quad i \gets 0 \cr
4 & \quad \textbf{if}\ p = \textbf{nil}\ \textbf{then}\ l \gets
l.\mathit{next};\ \textbf{return} \cr
5 & \quad \textbf{if}\ c = p.n\ \textbf{then}\ p \gets
p.\mathit{next};\ c \gets 0\ \textbf{else}\ c \gets c + 1 \cr
6 & \quad \textbf{if}\ p = \textbf{nil}\ \textbf{then}\ l \gets
\textbf{nil}\ \textbf{else}\ l \gets p.c[ c ];\ \text{prefetch }
\text{the leaf 4 children ahead}
\end{array}}
\]
template<class K, class V, class Less = std::less< K >, std::size_t B = 512, bool R = false, class A = HugePageAllocator< std::pair< const K , V > >>
to the previous pair, returning the iterator before the step
template<class K, class V, class Less = std::less< K >, std::size_t B = 512, bool R = false, class A = HugePageAllocator< std::pair< const K , V > >>
to the previous pair, from the end to the last pair, through the parent at the start of a leaf