Skip to content
Snippets Groups Projects
Commit 88492598 authored by Martin Mareš's avatar Martin Mareš
Browse files

Cuckoo hash: The number of buckets should stay constant

parent e0d0e6be
No related branches found
No related tags found
No related merge requests found
...@@ -66,6 +66,7 @@ public: ...@@ -66,6 +66,7 @@ public:
CuckooTable(unsigned num_buckets) CuckooTable(unsigned num_buckets)
{ {
// Initialize the table with the given number of buckets. // Initialize the table with the given number of buckets.
// The number of buckets is expected to stay constant.
this->num_buckets = num_buckets; this->num_buckets = num_buckets;
table.resize(num_buckets, UNUSED); table.resize(num_buckets, UNUSED);
......
...@@ -31,7 +31,8 @@ class CuckooTable: ...@@ -31,7 +31,8 @@ class CuckooTable:
""" """
def __init__(self, num_buckets): def __init__(self, num_buckets):
"""Initialize the table with the given number of buckets.""" """Initialize the table with the given number of buckets.
The number of buckets is expected to stay constant."""
# The array of buckets # The array of buckets
self.num_buckets = num_buckets self.num_buckets = num_buckets
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment