Browse Source

BitVector iterator +=

Former-commit-id: d9e02bce1a
tempestpy_adaptions
sjunges 9 years ago
parent
commit
0cdca6a5fc
  1. 7
      src/storage/BitVector.cpp
  2. 6
      src/storage/BitVector.h

7
src/storage/BitVector.cpp

@ -41,6 +41,13 @@ namespace storm {
return *this;
}
BitVector::const_iterator& BitVector::const_iterator::operator+=(size_t n) {
for(size_t i = 0; i < n; ++i) {
currentIndex = getNextSetIndex(dataPtr, ++currentIndex, endIndex);
}
return *this;
}
uint_fast64_t BitVector::const_iterator::operator*() const {
return currentIndex;
}

6
src/storage/BitVector.h

@ -58,6 +58,12 @@ namespace storm {
* @return A reference to this iterator.
*/
const_iterator& operator++();
/*!
* Increases the position of the iterator to the position of the n'th next bit that is set to true in the
* underlying bit vector.
*/
const_iterator& operator+=(size_t n);
/*!
* Returns the index of the current bit to which this iterator points.

Loading…
Cancel
Save