Data Structures Lerax  v3.0-102-gaf18
Opinionated Data Structures & Algorithms
Loading...
Searching...
No Matches
hash-table-gen.h File Reference
#include <stddef.h>
#include <stdbool.h>
#include "../list/single/list-gen.h"

Go to the source code of this file.

Typedefs

typedef struct HashTableGen HashTableGen

Functions

HashTableGenhash_table_gen_create (size_t n_buckets)
 Creates a new generic hash table.
bool hash_table_gen_empty (HashTableGen *ht)
 Checks if the hash table is empty.
HashTableGenhash_table_gen_copy (HashTableGen *ht)
 Creates a copy of the hash table.
void hash_table_gen_put (HashTableGen *ht, int key, void *data)
 Inserts a key-value pair into the hash table.
void hash_table_gen_remove (HashTableGen *ht, int key)
 Removes a key-value pair from the hash table.
void * hash_table_gen_get (HashTableGen *ht, int key, bool *exists)
 Gets the value associated with a key.
size_t hash_table_gen_size (HashTableGen *ht)
 Gets the size of the hash table.
void hash_table_gen_print (HashTableGen *ht)
 Prints the hash table.
ListGenhash_table_gen_keys (HashTableGen *ht)
 Gets the keys of the hash table.
void hash_table_gen_free (HashTableGen *ht, void(*free_data)(void *))
 Frees the memory allocated for the hash table.

Typedef Documentation

◆ HashTableGen

typedef struct HashTableGen HashTableGen

    Copyright 2025 Manoel Vilela

    Author: Manoel Vilela
   Contact: manoel_vilela@engineer.com

Organization: ITA