Defines the interface to a hash function. Takes a const char * as an argument and returns a size_t.
typedef size_t HashFunction (const char *);
Here is a simple, but very inefficient, hash function (from SMAUG);
size_t SmaugHash(const char * str)
This is however a lousy hash function, since it distributes strings extremely poorly. See the sample hash table manager for a better hash function.
Construct a new hash table implementation of the shared string manager. Note that you need to pass in a hash function: see the HashFunction typedef.
Resize the array of buckets, and rehash all table contents into the new buckets. Use this if you have too many elements per bucket and don’t mind spending more memory on buckets. Note that this will only be useful if your hash function is good enough to distribute over all the buckets.
Resize the array of buckets, and rehash all table contents into the new buckets.
void rehash( size_t newSize )