Storm 1.10.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::storage::BitVector::const_reverse_iterator Class Reference

A class that enables iterating over the indices of the bit vector whose corresponding bits are set to true. More...

#include <BitVector.h>

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = uint_fast64_t
 
using difference_type = std::ptrdiff_t
 
using pointer = uint_fast64_t *
 
using reference = uint_fast64_t &
 

Public Member Functions

 const_reverse_iterator ()
 Constructs a reverse iterator over the indices of the set bits in the given bit vector, starting and stopping, respectively, at the given index range [lowerBound, upperBound).
 
 const_reverse_iterator (uint64_t const *dataPtr, uint64_t upperBound, uint64_t lowerBound=0ull, bool setOnFirstBit=true)
 
 const_reverse_iterator (const_reverse_iterator const &other)
 
const_reverse_iteratoroperator= (const_reverse_iterator const &other)
 
const_reverse_iteratoroperator++ ()
 Lets the iterator point to the previous bit with value 1.
 
const_reverse_iterator operator++ (int)
 Lets the iterator point to the previous bit with value 1.
 
const_reverse_iteratoroperator+= (size_t n)
 Lets the iterator point to the n'th previous bit with value 1.
 
uint_fast64_t operator* () const
 Returns the index of the current bit to which this iterator points.
 
bool operator!= (const_reverse_iterator const &other) const
 Compares the iterator with another iterator for inequality.
 
bool operator== (const_reverse_iterator const &other) const
 Compares the iterator with another iterator for equality.
 

Friends

class BitVector
 

Detailed Description

A class that enables iterating over the indices of the bit vector whose corresponding bits are set to true.

Note that this is a const iterator, which cannot alter the bit vector. The indices are iterated over from largest to smallest

Definition at line 125 of file BitVector.h.

Member Typedef Documentation

◆ difference_type

Definition at line 133 of file BitVector.h.

◆ iterator_category

Definition at line 131 of file BitVector.h.

◆ pointer

Definition at line 134 of file BitVector.h.

◆ reference

Definition at line 135 of file BitVector.h.

◆ value_type

Definition at line 132 of file BitVector.h.

Constructor & Destructor Documentation

◆ const_reverse_iterator() [1/3]

storm::storage::BitVector::const_reverse_iterator::const_reverse_iterator ( )

Constructs a reverse iterator over the indices of the set bits in the given bit vector, starting and stopping, respectively, at the given index range [lowerBound, upperBound).

Parameters
dataPtrA pointer to the first bucket of the underlying bit vector.
upperBoundindicates the index where to begin the reverse iteration. We start at the bit with index upperBound-1
setOnFirstBitA flag that indicates whether the iterator is to be moved to the index of the first bit upon construction.
lowerBoundThe index at which to abort the iteration process.

Definition at line 75 of file BitVector.cpp.

◆ const_reverse_iterator() [2/3]

storm::storage::BitVector::const_reverse_iterator::const_reverse_iterator ( uint64_t const *  dataPtr,
uint64_t  upperBound,
uint64_t  lowerBound = 0ull,
bool  setOnFirstBit = true 
)

Definition at line 77 of file BitVector.cpp.

◆ const_reverse_iterator() [3/3]

storm::storage::BitVector::const_reverse_iterator::const_reverse_iterator ( const_reverse_iterator const &  other)

Definition at line 87 of file BitVector.cpp.

Member Function Documentation

◆ operator!=()

bool storm::storage::BitVector::const_reverse_iterator::operator!= ( const_reverse_iterator const &  other) const

Compares the iterator with another iterator for inequality.

Parameters
otherThe iterator with respect to which inequality is checked.
Returns
True if the two iterators are unequal.

Definition at line 123 of file BitVector.cpp.

◆ operator*()

uint_fast64_t storm::storage::BitVector::const_reverse_iterator::operator* ( ) const

Returns the index of the current bit to which this iterator points.

Returns
The index of the current bit to which this iterator points.

Definition at line 119 of file BitVector.cpp.

◆ operator++() [1/2]

BitVector::const_reverse_iterator & storm::storage::BitVector::const_reverse_iterator::operator++ ( )

Lets the iterator point to the previous bit with value 1.

Returns
A reference to this iterator.

Definition at line 102 of file BitVector.cpp.

◆ operator++() [2/2]

BitVector::const_reverse_iterator storm::storage::BitVector::const_reverse_iterator::operator++ ( int  )

Lets the iterator point to the previous bit with value 1.

Returns
A copy of the iterator before incrementing.

Definition at line 106 of file BitVector.cpp.

◆ operator+=()

BitVector::const_reverse_iterator & storm::storage::BitVector::const_reverse_iterator::operator+= ( size_t  n)

Lets the iterator point to the n'th previous bit with value 1.

Definition at line 112 of file BitVector.cpp.

◆ operator=()

BitVector::const_reverse_iterator & storm::storage::BitVector::const_reverse_iterator::operator= ( const_reverse_iterator const &  other)

Definition at line 92 of file BitVector.cpp.

◆ operator==()

bool storm::storage::BitVector::const_reverse_iterator::operator== ( const_reverse_iterator const &  other) const

Compares the iterator with another iterator for equality.

Parameters
otherThe iterator with respect to which equality is checked.
Returns
True if the two iterators are equal.

Definition at line 127 of file BitVector.cpp.

Friends And Related Symbol Documentation

◆ BitVector

friend class BitVector
friend

Definition at line 127 of file BitVector.h.


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