Template Class BucketCuckooTable
Defined in File BucketCuckooTable.h
Nested Relationships
Nested Types
Class Documentation
-
template<class K, class V, class H = DefaultHash<K>, class Eq = std::equal_to<K>>
class BucketCuckooTable a DICTIONARY on the cuckoo hashing with buckets of 4 places
Public Types
-
using size_type = std::size_t
-
using difference_type = std::ptrdiff_t
-
using const_iterator = SlotIterator<BucketCuckooTable, Places>
-
using iterator = const_iterator
Public Functions
-
explicit BucketCuckooTable(std::size_t n = 0, H h = H(), Eq eq = Eq())
the empty table, with room for n pairs before it grows
-
bool insert(const K &k, const V &v)
associates the value v to the key k; true if k was not there
- Post:
k is in the table
-
bool remove(const K &k)
removes the key k, if it is there; true if it was
- Post:
k is not in the table
-
std::size_t size(void) const
-
bool empty(void) const
-
std::size_t capacity(void) const
the places, 4 per bucket
-
double load(void) const
the load, size() / capacity()
-
std::size_t rehashes(void) const
the doublings of the table
-
std::size_t moves(void) const
the keys moved by the insertions
-
inline const_iterator begin(void) const
-
inline const_iterator end(void) const
-
inline const_iterator cbegin(void) const
-
inline const_iterator cend(void) const
-
struct Places
the places, for SlotIterator
-
using size_type = std::size_t