libstd v0.1.0
Loading...
Searching...
No Matches
Public Attributes | List of all members
HashMap Struct Reference

Structure representing a generic Hash Map. More...

#include <hashmap.h>

Collaboration diagram for HashMap:
Collaboration graph
[legend]

Public Attributes

HashNode ** buckets
 
size_t bucket_count
 
size_t key_size
 
size_t value_size
 
size_t size
 
unsigned long(* hash_fn )(void *)
 
int(* cmp_fn )(void *, void *)
 

Detailed Description

Structure representing a generic Hash Map.

Member Data Documentation

◆ bucket_count

size_t HashMap::bucket_count

Number of buckets available in the hash table.

◆ buckets

HashNode** HashMap::buckets

Array of pointers to bucket head nodes.

◆ cmp_fn

int(* HashMap::cmp_fn) (void *, void *)

Function pointer to compare two keys (returns 0 if equal).

◆ hash_fn

unsigned long(* HashMap::hash_fn) (void *)

Function pointer to compute the hash code for a key.

◆ key_size

size_t HashMap::key_size

Memory size (in bytes) of individual keys.

◆ size

size_t HashMap::size

Total number of key-value pairs currently stored.

◆ value_size

size_t HashMap::value_size

Memory size (in bytes) of individual values.


The documentation for this struct was generated from the following file: