40# define NumItems 10000
47static size_t hashFct(
const unsigned & key)
58 cout <<
"Resizing hash table from " <<
currSize <<
" ... ";
67 <<
"Num items = " << table.
size() <<
endl;
75 unsigned int t = std::time(
NULL);
80 n = std::stoi(
argv[1]);
83 t = std::stoi(
argv[2]);
92 cout <<
"n must be positive" <<
endl;
98 cout <<
argv[0] <<
" " << n <<
" " << t <<
endl;
105 for (i = 0; i < n/2; i++)
120 for (i = n/2; i < n; i++)
132 for (i = 0; i < n; i++)
Dynamic hash table mapping keys to records with separate chaining.
Record * search(const Key &key)
Search for a key in the table.
void remove(Record *record)
Remove an entry from the table.
Record * insert(const Key &key, const Record &record)
Insert a key-record pair into the table.
const size_t & get_num_busy_slots() const noexcept
Returns the number of occupied entries in the array.
const size_t & size() const noexcept
Returns the number of elements contained in the table.
const size_t & capacity() const noexcept
Returns the table capacity.
size_t resize(const size_t new_size)
Resizes the hash table to new_size and re-locates keys.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
and
Check uniqueness with explicit hash + equality functors.
bool check_primes_database()
Verify the integrity of the prime database.
DynLhashTable< unsigned, unsigned > HTable
static size_t hashFct(const unsigned &key)
static void testResize(HTable &table)
static void printPars(const HTable &table)
Lazy and scalable dynamic array implementation.
Dynamic hash table mapping keys to records with separate chaining.