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

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

#include <dynamic_wavelet_matrix_for_range_search.hpp>

Collaboration diagram for stool::bptree::DynamicWaveletMatrixForRangeSearch::XRankIterator:

Public Types

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

Public Member Functions

 XRankIterator ()
 Default constructor creating an invalid end iterator.
 
 XRankIterator (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 y-rank at the current x-rank position.
 
XRankIteratoroperator++ () noexcept
 Pre-increment: advance to the next x-rank and update the y-rank.
 
XRankIterator operator++ (int) noexcept
 Post-increment: advance to the next x-rank and return the previous iterator.
 
XRankIteratoroperator-- () noexcept
 Pre-decrement: move to the previous x-rank and update the y-rank.
 
XRankIterator operator-- (int) noexcept
 Post-decrement: move to the previous x-rank and return the previous iterator.
 
XRankIteratoroperator+= (difference_type n) noexcept
 Advance the iterator by n x-rank positions.
 
XRankIteratoroperator-= (difference_type n) noexcept
 Move the iterator back by n x-rank positions.
 

Public Attributes

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

Friends

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

Detailed Description

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

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

Constructor & Destructor Documentation

◆ XRankIterator()

stool::bptree::DynamicWaveletMatrixForRangeSearch::XRankIterator::XRankIterator ( 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 position.
y_rankThe y-rank at the current position.

Member Function Documentation

◆ operator+=()

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

Advance the iterator by n x-rank positions.

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

◆ operator-=()

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

Move the iterator back by n x-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: