Go to the source code of this file.
Data Structures | |
struct | HashTable |
A hash table ADT. More... | |
Functions | |
HashTable * | HashTableNew (int size) |
Creates a new hash table with the specified number of entries. | |
void | HashTableInsert (HashTable *table, int index, void *element) |
Inserts the element into the has table at the appropriate place. | |
void * | HashTableFind (HashTable *table, int index, int(*cmp)(const void *, const int)) |
Looks up index in the hash table. | |
void | HashTableFree (HashTable *table) |
Frees the memory being used by the hash table. | |
void * | HashTableRemove (HashTable *table, int index, int(*cmp)(const void *, const int)) |
Removes the element from the hash table. |
|
Looks up index in the hash table. Not only must you use the same index, but you must also supply a function that returns non-zero when passed the element you want to find and the index (which you passed to the function in the first place...) |
|
Frees the memory being used by the hash table. But doesn't touch the memory being used by the elements in the table. It is your responsibility to free these if you like. |
|
Inserts the element into the has table at the appropriate place.
|
|
Creates a new hash table with the specified number of entries.
|
|
Removes the element from the hash table. Not only must you use the same index, but you must also supply a function that returns non-zero when passed the element you want to find and the index (which you passed to the function in the first place...) |