1#ifndef STORM_STORAGE_BITVECTORHASHMAP_H_
2#define STORM_STORAGE_BITVECTORHASHMAP_H_
19template<
typename ValueType,
typename Hash = Murmur3BitVectorHash<ValueType>>
40 std::pair<storm::storage::BitVector, ValueType>
operator*()
const;
60 BitVectorHashMap(uint64_t bucketSize, uint64_t initialSize = 1000,
double loadFactor = 0.75);
95 std::pair<storm::storage::BitVector, ValueType>
getBucketAndValue(uint64_t bucket)
const;
110 ValueType
getValue(uint64_t bucket)
const;
139 uint64_t
size()
const;
153 void remap(std::function<ValueType(ValueType
const&)>
const& remapping);
162 bool isBucketOccupied(uint_fast64_t bucket)
const;
193 bool checkIncreaseSize();
198 uint64_t getCurrentShiftWidth()
const;
207 uint64_t currentSize;
216 std::vector<ValueType> values;
219 uint64_t numberOfElements;
A class that enables iterating over the indices of the bit vector whose corresponding bits are set to...
bool operator==(BitVectorHashMapIterator const &other)
BitVectorHashMapIterator & operator++()
std::pair< storm::storage::BitVector, ValueType > operator*() const
bool operator!=(BitVectorHashMapIterator const &other)
This class represents a hash-map whose keys are bit vectors.
BitVectorHashMap(BitVectorHashMap &&)=default
BitVectorHashMap(BitVectorHashMap const &)=default
std::pair< ValueType, uint64_t > findOrAddAndGetBucket(storm::storage::BitVector const &key, ValueType const &value)
Searches for the given key in the map.
ValueType findOrAdd(storm::storage::BitVector const &key, ValueType const &value)
Searches for the given key in the map.
std::pair< storm::storage::BitVector, ValueType > getBucketAndValue(uint64_t bucket) const
Retrieves the key stored in the given bucket (if any) and the value it is mapped to.
BitVectorHashMap & operator=(BitVectorHashMap &&)=default
ValueType getValue(storm::storage::BitVector const &key) const
Retrieves the value associated with the given key (if any).
const_iterator begin() const
Retrieves an iterator to the elements of the map.
uint64_t capacity() const
Retrieves the capacity of the underlying container.
BitVectorHashMapIterator const_iterator
const_iterator end() const
Retrieves an iterator that points one past the elements of the map.
bool contains(storm::storage::BitVector const &key) const
Checks if the given key is already contained in the map.
void remap(std::function< ValueType(ValueType const &)> const &remapping)
Performs a remapping of all values stored by applying the given remapping.
BitVectorHashMap & operator=(BitVectorHashMap const &)=default
uint64_t size() const
Retrieves the size of the map in terms of the number of key-value pairs it stores.
A bit vector that is internally represented as a vector of 64-bit values.