b-tree-plus-alpha
Loading...
Searching...
No Matches
stool::bptree::DynamicWaveletMatrixForRangeSearch::YRankIterator Class Reference

Random-access iterator traversing elements in y-rank order. More...

#include <dynamic_wavelet_matrix_for_range_search.hpp>

Collaboration diagram for stool::bptree::DynamicWaveletMatrixForRangeSearch::YRankIterator:

Public Types

using iterator_category = std::random_access_iterator_tag
 
using value_type = uint64_t
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

 YRankIterator ()
 Default constructor creating an invalid end iterator.
 
 YRankIterator (const DynamicWaveletMatrixForRangeSearch *container, uint64_t x_rank, uint64_t y_rank)
 Construct an iterator at a given position.
 
uint64_t operator* () const noexcept
 Return the x-rank at the current y-rank position.
 
YRankIteratoroperator++ () noexcept
 Pre-increment: advance to the next y-rank and update the x-rank.
 
YRankIterator operator++ (int) noexcept
 Post-increment: advance to the next y-rank and return the previous iterator.
 
YRankIteratoroperator-- () noexcept
 Pre-decrement: move to the previous y-rank and update the x-rank.
 
YRankIterator operator-- (int) noexcept
 Post-decrement: move to the previous y-rank and return the previous iterator.
 
YRankIteratoroperator+= (difference_type n) noexcept
 Advance the iterator by n y-rank positions.
 
YRankIteratoroperator-= (difference_type n) noexcept
 Move the iterator back by n y-rank positions.
 

Public Attributes

const DynamicWaveletMatrixForRangeSearchcontainer = nullptr
 
uint64_t x_rank = 0
 
uint64_t y_rank = 0
 

Friends

YRankIterator operator+ (YRankIterator it, difference_type n) noexcept
 Return an iterator advanced by n y-rank positions.
 
YRankIterator operator+ (difference_type n, YRankIterator it) noexcept
 Return an iterator advanced by n y-rank positions.
 
YRankIterator operator- (YRankIterator it, difference_type n) noexcept
 Return an iterator moved back by n y-rank positions.
 
difference_type operator- (YRankIterator a, YRankIterator b) noexcept
 Return the difference in y-rank between two iterators.
 
bool operator== (YRankIterator a, YRankIterator b) noexcept
 Equality comparison based on y-rank.
 
bool operator!= (YRankIterator a, YRankIterator b) noexcept
 Inequality comparison based on y-rank.
 
bool operator< (YRankIterator a, YRankIterator b) noexcept
 Less-than comparison based on y-rank.
 
bool operator> (YRankIterator a, YRankIterator b) noexcept
 Greater-than comparison based on y-rank.
 
bool operator<= (YRankIterator a, YRankIterator b) noexcept
 Less-than-or-equal comparison based on y-rank.
 
bool operator>= (YRankIterator a, YRankIterator b) noexcept
 Greater-than-or-equal comparison based on y-rank.
 

Detailed Description

Random-access iterator traversing elements in y-rank order.

Dereferencing yields the x-rank of the element at the current y-rank position.

Constructor & Destructor Documentation

◆ YRankIterator()

stool::bptree::DynamicWaveletMatrixForRangeSearch::YRankIterator::YRankIterator ( const DynamicWaveletMatrixForRangeSearch container,
uint64_t  x_rank,
uint64_t  y_rank 
)
inline

Construct an iterator at a given position.

Parameters
containerPointer to the parent structure.
x_rankThe x-rank at the current position.
y_rankThe y-rank position.

Member Function Documentation

◆ operator+=()

YRankIterator & stool::bptree::DynamicWaveletMatrixForRangeSearch::YRankIterator::operator+= ( difference_type  n)
inlinenoexcept

Advance the iterator by n y-rank positions.

Parameters
nNumber of positions to advance (may be negative).
Here is the call graph for this function:

◆ operator-=()

YRankIterator & stool::bptree::DynamicWaveletMatrixForRangeSearch::YRankIterator::operator-= ( difference_type  n)
inlinenoexcept

Move the iterator back by n y-rank positions.

Parameters
nNumber of positions to retreat.
Here is the call graph for this function:

The documentation for this class was generated from the following file: