From 1f2ab1a6722542f62d56e2bb40afcb1050ad8d23 Mon Sep 17 00:00:00 2001 From: TimQu Date: Fri, 18 Aug 2017 16:19:39 +0200 Subject: [PATCH] added function BitVector::fill() which sets all bits to true --- src/storm/storage/BitVector.cpp | 4 ++++ src/storm/storage/BitVector.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/storm/storage/BitVector.cpp b/src/storm/storage/BitVector.cpp index 1b1c3734e..b91928b06 100644 --- a/src/storm/storage/BitVector.cpp +++ b/src/storm/storage/BitVector.cpp @@ -576,6 +576,10 @@ namespace storm { void BitVector::clear() { std::fill_n(buckets, this->bucketCount(), 0); } + + void BitVector::fill() { + std::fill_n(buckets, this->bucketCount(), -1ull); + } uint_fast64_t BitVector::getNumberOfSetBits() const { return getNumberOfSetBitsBeforeIndex(bitCount); diff --git a/src/storm/storage/BitVector.h b/src/storm/storage/BitVector.h index d2df0c4ae..0ab33e451 100644 --- a/src/storm/storage/BitVector.h +++ b/src/storm/storage/BitVector.h @@ -427,6 +427,11 @@ namespace storm { */ void clear(); + /*! + * Sets all bits from the bit vector. Calling full() after this operation will yield true. + */ + void fill(); + /*! * Returns the number of bits that are set to true in this bit vector. *