libcstl
|
Go to the source code of this file.
Functions | |
size_t | cstl_hash_div (const size_t k, const size_t m) |
Hash by division. | |
size_t | cstl_hash_mul (const size_t k, const size_t m) |
Hash by multiplication. | |
void | cstl_hash_rehash (struct cstl_hash *const h) |
Rehash the hash table. | |
int | cstl_hash_foreach (struct cstl_hash *const h, cstl_visit_func_t *const visit, void *const p) |
Visit each object within a hash table. | |
int | cstl_hash_foreach_const (const struct cstl_hash *const h, cstl_const_visit_func_t *const visit, void *const p) |
Visit each object within a hash table. | |
void | cstl_hash_resize (struct cstl_hash *const h, const size_t count, cstl_hash_func_t *const hash) |
Resize the hash table. | |
void | cstl_hash_shrink_to_fit (struct cstl_hash *const h) |
Free memory associated with excess buckets. | |
void | cstl_hash_insert (struct cstl_hash *const h, const size_t k, void *const e) |
Insert an item into the hash. | |
void * | cstl_hash_find (struct cstl_hash *const h, const size_t k, cstl_const_visit_func_t *const visit, void *const p) |
Lookup/find a previously inserted object in the hash. | |
void | cstl_hash_erase (struct cstl_hash *const h, void *const e) |
Remove an object from the hash. | |
void | cstl_hash_clear (struct cstl_hash *const h, cstl_xtor_func_t *const clr) |
Remove all elements from the hash. | |