Commit 88492598 authored by Martin Mareš's avatar Martin Mareš

Cuckoo hash: The number of buckets should stay constant

parent e0d0e6be
......@@ -66,6 +66,7 @@ public:
CuckooTable(unsigned num_buckets)
{
// Initialize the table with the given number of buckets.
// The number of buckets is expected to stay constant.
this->num_buckets = num_buckets;
table.resize(num_buckets, UNUSED);
......
......@@ -31,7 +31,8 @@ class CuckooTable:
"""
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
self.num_buckets = num_buckets
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment