|
Libft
Custom implementation of core libc functions with additional utility helpers.
|
Separate-chaining hash map keyed by NUL-terminated strings. More...
#include <libft.h>

Data Fields | |
| size_t | size |
| Current number of stored key/value pairs. | |
| t_vector | buckets |
| Vector of t_list buckets (owned by the map). | |
| size_t(* | hash )(const char *key) |
| Hash function applied to keys (defaults to hash_string). | |
| void(* | del_value )(void *) |
| Optional destructor for stored values (may be NULL). | |
Separate-chaining hash map keyed by NUL-terminated strings.
Collisions are resolved by chaining key/value pairs into doubly linked lists (one list per bucket). The bucket array is stored in a t_vector and grows automatically when the number of stored pairs would exceed its capacity.
| t_vector s_hashmap::buckets |
Vector of t_list buckets (owned by the map).
| void(* s_hashmap::del_value) (void *) |
Optional destructor for stored values (may be NULL).
| size_t(* s_hashmap::hash) (const char *key) |
Hash function applied to keys (defaults to hash_string).
| size_t s_hashmap::size |
Current number of stored key/value pairs.