64 typedef struct sHashNode
82 typedef struct sHashMap
87 int(*equals)(
void*,
void*);
124 ,
int(*equals)(
void*,
void*)
int hashSetHash(HashMap hmap, int(*hash)(void *))
Sets the hash function of a hash table.
void hashDelete(HashMap hmap)
Deletes a hash table.
int hashInsert(HashMap hmap, void *key, void *value, int replace)
Associates a value to a key in a hash table.
int hashSize(HashMap hmap)
Returns the number of elements present in a hash table.
void * value
Node's value.
int hashGet(HashMap hmap, void *key, void **value)
Provides the mapping for a key from a hash table.
Iterator hashValues(HashMap hmap)
Creates an iterator from the values of a hash table.
int hashSetFactor(HashMap hmap, int factor)
Sets the load factor of a hash table.
struct sHashNode * next
Next node.
HashNode * elems
Buckets of this hash table.
int length
Number of buckets of this hash table.
SHashNode * HashNode
Hash table node definition.
Iterator hashKeys(HashMap hmap)
Creates an iterator from the keys of a hash table.
SHashMap * HashMap
Hash table definition.
int size
Number of elements of this hash table.
HashMap newHash(int size, float factor, int(*hash)(void *), int(*equals)(void *, void *))
Creates a hash table.
Hash table node structure.
Implementation of an iterator.
int hashSetEquals(HashMap hmap, int(*equals)(void *, void *))
Sets the comparison function of a hash table.
int hashRemove(HashMap hmap, void *key, void **value, void(*del)(void *))
Removes the mapping for a key from a hash table.