SDSL 3.0.1
Succinct Data Structure Library
Loading...
Searching...
No Matches
sdsl::random_access_const_iterator< t_rac > Class Template Reference

Generic iterator for a random access container. More...

#include <iterators.hpp>

Public Types

using iterator_category = std::random_access_iterator_tag
 
using value_type = typename t_rac::value_type
 
using difference_type = typename t_rac::difference_type
 
using pointer = value_type *
 
using reference = value_type &
 
typedef const t_rac::value_type const_reference
 
typedef t_rac::size_type size_type
 
typedef random_access_const_iterator< t_rac > iterator
 

Public Member Functions

 random_access_const_iterator (const t_rac *rac, size_type idx=0)
 Constructor.
 
const_reference operator* () const
 Dereference operator for the Iterator.
 
iteratoroperator++ ()
 Prefix increment of the Iterator.
 
iterator operator++ (int)
 Postfix increment of the Iterator.
 
iteratoroperator-- ()
 Prefix decrement of the Iterator.
 
iterator operator-- (int)
 Postfix decrement of the Iterator.
 
iteratoroperator+= (difference_type i)
 
iteratoroperator-= (difference_type i)
 
iterator operator+ (difference_type i) const
 
iterator operator- (difference_type i) const
 
const_reference operator[] (difference_type i) const
 
bool operator== (const iterator &it) const
 
bool operator!= (const iterator &it) const
 
bool operator< (const iterator &it) const
 
bool operator> (const iterator &it) const
 
bool operator>= (const iterator &it) const
 
bool operator<= (const iterator &it) const
 

Friends

template<class t_RAC >
random_access_const_iterator< t_RAC >::difference_type operator- (const random_access_const_iterator< t_RAC > &x, const random_access_const_iterator< t_RAC > &y)
 

Detailed Description

template<class t_rac>
class sdsl::random_access_const_iterator< t_rac >

Generic iterator for a random access container.

Template Parameters
t_racType of random access container.

Definition at line 23 of file iterators.hpp.

Member Typedef Documentation

◆ const_reference

template<class t_rac >
typedef const t_rac::value_type sdsl::random_access_const_iterator< t_rac >::const_reference

Definition at line 32 of file iterators.hpp.

◆ difference_type

template<class t_rac >
using sdsl::random_access_const_iterator< t_rac >::difference_type = typename t_rac::difference_type

Definition at line 28 of file iterators.hpp.

◆ iterator

template<class t_rac >
typedef random_access_const_iterator<t_rac> sdsl::random_access_const_iterator< t_rac >::iterator

Definition at line 34 of file iterators.hpp.

◆ iterator_category

template<class t_rac >
using sdsl::random_access_const_iterator< t_rac >::iterator_category = std::random_access_iterator_tag

Definition at line 26 of file iterators.hpp.

◆ pointer

template<class t_rac >
using sdsl::random_access_const_iterator< t_rac >::pointer = value_type *

Definition at line 29 of file iterators.hpp.

◆ reference

template<class t_rac >
using sdsl::random_access_const_iterator< t_rac >::reference = value_type &

Definition at line 30 of file iterators.hpp.

◆ size_type

template<class t_rac >
typedef t_rac::size_type sdsl::random_access_const_iterator< t_rac >::size_type

Definition at line 33 of file iterators.hpp.

◆ value_type

template<class t_rac >
using sdsl::random_access_const_iterator< t_rac >::value_type = typename t_rac::value_type

Definition at line 27 of file iterators.hpp.

Constructor & Destructor Documentation

◆ random_access_const_iterator()

template<class t_rac >
sdsl::random_access_const_iterator< t_rac >::random_access_const_iterator ( const t_rac *  rac,
size_type  idx = 0 
)
inline

Constructor.

Definition at line 47 of file iterators.hpp.

Member Function Documentation

◆ operator!=()

template<class t_rac >
bool sdsl::random_access_const_iterator< t_rac >::operator!= ( const iterator it) const
inline

Definition at line 115 of file iterators.hpp.

◆ operator*()

template<class t_rac >
const_reference sdsl::random_access_const_iterator< t_rac >::operator* ( ) const
inline

Dereference operator for the Iterator.

Definition at line 53 of file iterators.hpp.

◆ operator+()

template<class t_rac >
iterator sdsl::random_access_const_iterator< t_rac >::operator+ ( difference_type  i) const
inline

Definition at line 99 of file iterators.hpp.

◆ operator++() [1/2]

template<class t_rac >
iterator & sdsl::random_access_const_iterator< t_rac >::operator++ ( )
inline

Prefix increment of the Iterator.

Definition at line 56 of file iterators.hpp.

◆ operator++() [2/2]

template<class t_rac >
iterator sdsl::random_access_const_iterator< t_rac >::operator++ ( int  )
inline

Postfix increment of the Iterator.

Definition at line 63 of file iterators.hpp.

◆ operator+=()

template<class t_rac >
iterator & sdsl::random_access_const_iterator< t_rac >::operator+= ( difference_type  i)
inline

Definition at line 85 of file iterators.hpp.

◆ operator-()

template<class t_rac >
iterator sdsl::random_access_const_iterator< t_rac >::operator- ( difference_type  i) const
inline

Definition at line 105 of file iterators.hpp.

◆ operator--() [1/2]

template<class t_rac >
iterator & sdsl::random_access_const_iterator< t_rac >::operator-- ( )
inline

Prefix decrement of the Iterator.

Definition at line 71 of file iterators.hpp.

◆ operator--() [2/2]

template<class t_rac >
iterator sdsl::random_access_const_iterator< t_rac >::operator-- ( int  )
inline

Postfix decrement of the Iterator.

Definition at line 78 of file iterators.hpp.

◆ operator-=()

template<class t_rac >
iterator & sdsl::random_access_const_iterator< t_rac >::operator-= ( difference_type  i)
inline

Definition at line 92 of file iterators.hpp.

◆ operator<()

template<class t_rac >
bool sdsl::random_access_const_iterator< t_rac >::operator< ( const iterator it) const
inline

Definition at line 117 of file iterators.hpp.

◆ operator<=()

template<class t_rac >
bool sdsl::random_access_const_iterator< t_rac >::operator<= ( const iterator it) const
inline

Definition at line 123 of file iterators.hpp.

◆ operator==()

template<class t_rac >
bool sdsl::random_access_const_iterator< t_rac >::operator== ( const iterator it) const
inline

Definition at line 113 of file iterators.hpp.

◆ operator>()

template<class t_rac >
bool sdsl::random_access_const_iterator< t_rac >::operator> ( const iterator it) const
inline

Definition at line 119 of file iterators.hpp.

◆ operator>=()

template<class t_rac >
bool sdsl::random_access_const_iterator< t_rac >::operator>= ( const iterator it) const
inline

Definition at line 121 of file iterators.hpp.

◆ operator[]()

template<class t_rac >
const_reference sdsl::random_access_const_iterator< t_rac >::operator[] ( difference_type  i) const
inline

Definition at line 111 of file iterators.hpp.

Friends And Related Function Documentation

◆ operator-

template<class t_rac >
template<class t_RAC >
random_access_const_iterator< t_RAC >::difference_type operator- ( const random_access_const_iterator< t_RAC > &  x,
const random_access_const_iterator< t_RAC > &  y 
)
friend

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