#ifndef HASH__H #define HASH__H #include "tree.h" #include typedef tree_t node_t; typedef struct hash_table hash_table_t; struct hash_table { node_t** nodes; uint32_t nodes_length; node_t* (*node_get)(hash_table_t* hash_table, uint32_t index); node_t* (*node_create)(hash_table_t* hash_table, uint32_t index); void (*insert)(hash_table_t* hash_table, char* string, size_t length); uint8_t (*exists)(hash_table_t* hash_table, char* string, size_t length); uint32_t (*hash)(hash_table_t* hash_table, char* string, size_t length); }; node_t* hash_table_node_get(hash_table_t* hash_table, uint32_t index); node_t* hash_table_node_create(hash_table_t* hash_table, uint32_t index); void hash_table_insert(hash_table_t* hash_table, char* string, size_t length); uint8_t hash_table_exists(hash_table_t* hash_table, char* string, size_t length); uint32_t hash_table_hash(hash_table_t* hash_table, char* string, size_t length); extern hash_table_t* hash_table_create(uint32_t nodes_length); #endif