9#ifndef MCRL2_UTILITIES_HASHTABLE_H
10#define MCRL2_UTILITIES_HASHTABLE_H
23 typename Hash = std::hash<Key>,
24 typename Equals = std::equal_to<Key>,
25 typename Allocator = std::allocator<Key>>
40 typedef typename std::vector < Key >::iterator
iterator;
55 hashtable(std::size_t initial_hashtable_size,
A set that assigns each element an unique index.
iterator end()
End of the forward iterator.
size_type size() const
The number of elements in the indexed set.
iterator end() const
End of the forward iterator.
void clear()
Clears the indexed set by removing all its elements. It is not guaranteed that the memory is released...
const_iterator crend() const
End of the reverse const_iterator.
iterator find(const key_type &key)
Find the given key and returns an iterator to that position.
iterator rbegin()
Reverse iterator going through the elements in the set from the largest to the smallest index.
std::vector< Key >::iterator iterator
std::pair< const key_type, size_type > value_type
std::vector< Key >::reverse_iterator reverse_iterator
void rehash(std::size_t size)
Resizes the hash table to the given power of two size.
const value_type * const_pointer
void resize()
Resize the hashtable. This is not done automatically.
std::vector< Key >::const_reverse_iterator const_reverse_iterator
std::size_t get_index(const key_type &key)
hashtable()
Constructor of an empty indexed set. Starts with a hashtable of size 128.
const_iterator cbegin() const
const_iterator going through the elements in the set numbered from zero upwards.
size_type m_buckets_mask
Always equal to m_hashtable.size() - 1.
bool must_resize()
Check whether the hashtable must be resized. This is not automatic and must be done explicitly.
iterator begin()
Forward iterator which runs through the elements from the lowest to the largest number.
std::pair< iterator, bool > insert(const key_type &key)
Insert a key in the indexed set and return its index.
const_iterator crbegin() const
Reverse const_iterator going through the elements from the highest to the lowest numbered element.
std::vector< Key > m_hashtable
const value_type & const_reference
std::size_t m_number_of_elements
iterator rend()
End of the reverse iterator.
iterator begin() const
Forward iterator which runs through the elements from the lowest to the largest number.
const_iterator cend() const
End of the forward const_iterator.
std::vector< Key >::const_iterator const_iterator
std::ptrdiff_t difference_type
iterator erase(const key_type &key)
Erases the key assuming that this key is present in the hashtable..
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...