8 #define LOADFACTOR 0.75
11 typedef struct prehashlistnode {
13 void *val; //this can be cast to another type or used to point to a larger structure
14 struct prehashlistnode *next;
17 typedef struct prehashtable {
18 prehashlistnode_t *table; // points to beginning of hash table
20 unsigned int numelements;
26 /* Prototypes for hash*/
27 unsigned int prehashCreate(unsigned int size, float loadfactor);
28 unsigned int prehashFunction(unsigned int key);
29 unsigned int prehashInsert(unsigned int key, void *val);
30 void *prehashSearch(unsigned int key); //returns val, NULL if not found
31 unsigned int prehashRemove(unsigned int key); //returns -1 if not found
32 unsigned int prehashResize(unsigned int newsize);