7 #define LOADFACTOR 0.75
10 typedef struct mhashlistnode {
12 void *val; //this can be cast to another type or used to point to a larger structure
13 struct mhashlistnode *next;
16 typedef struct mhashtable {
17 mhashlistnode_t *table; // points to beginning of hash table
19 unsigned int numelements;
23 unsigned int mhashCreate(unsigned int size, float loadfactor);
24 unsigned int mhashFunction(unsigned int key);
25 unsigned mhashInsert(unsigned int key, void *val);
26 void *mhashSearch(unsigned int key); //returns val, NULL if not found
27 unsigned int mhashRemove(unsigned int key); //returns -1 if not found
28 unsigned int mhashResize(unsigned int newsize);