Table of Contents
- HASH_TABLE
- Public Attributes
- Public Attributes Documentation
- variable size
- variable seed
- variable root
- variable nb_keys
- variable mode
- variable ht_search
- variable ht_remove
- variable ht_put_string_ptr
- variable ht_put_string
- variable ht_put_ptr
- variable ht_put_int
- variable ht_put_double
- variable ht_print
- variable ht_get_string
- variable ht_get_ptr
- variable ht_get_node
- variable ht_get_int
- variable ht_get_double
- variable hash_table
- variable empty_ht
- variable destroy_ht
- variable alphabet_offset
- variable alphabet_length
HASH_TABLE
Module: HASH TABLES: classic or trie tree hash_tables
structure of a hash table
#include "n_hash.h"
Public Attributes
| Name | |
|---|---|
| size_t | size size of the hash table |
| size_t | seed table's seed |
| HASH_NODE * | root HASH_TRIE mode: Start of tree. |
| size_t | nb_keys total number of used keys in the table |
| unsigned int | mode hashing mode, murmurhash and classic HASH_MURMUR, or HASH_TRIE |
| LIST ()(struct HASH_TABLE *table, int(*node_is_matching)(HASH_NODE *node)) | ht_search search elements given an expression |
| int(*)(struct HASH_TABLE *table, const char *key) | ht_remove remove given's key node from the table |
| int(*)(struct HASH_TABLE *table, const char *key, char *val) | ht_put_string_ptr put an char *string pointer |
| int(*)(struct HASH_TABLE *table, const char *key, char *val) | ht_put_string put an char *string |
| int(*)(struct HASH_TABLE *table, const char *key, void *ptr, void(*destructor)(void *ptr), void *(*duplicator)(void *ptr)) | ht_put_ptr put a a pointer |
| int(*)(struct HASH_TABLE *table, const char *key, int64_t val) | ht_put_int put an integer |
| int(*)(struct HASH_TABLE *table, const char *key, double val) | ht_put_double put a double |
| void(*)(struct HASH_TABLE *table) | ht_print print table |
| int(*)(struct HASH_TABLE *table, const char *key, char **val) | ht_get_string get a char *string from a key's node |
| int(*)(struct HASH_TABLE *table, const char *key, void **val) | ht_get_ptr get a pointer from a key's node |
| HASH_NODE ()(struct HASH_TABLE *table, const char *key) | ht_get_node get HASH_NODE at 'key' from table |
| int(*)(struct HASH_TABLE *table, const char *key, int64_t *val) | ht_get_int get an int from a key's node |
| int(*)(struct HASH_TABLE *table, const char *key, double *val) | ht_get_double get a double from a key's node |
| LIST ** | hash_table HASH_CLASSIC mode: preallocated hash table. |
| int(*)(struct HASH_TABLE *table) | empty_ht empty a hash table. |
| int(*)(struct HASH_TABLE **table) | destroy_ht destroy a hash table |
| size_t | alphabet_offset HASH_TRIE mode: offset to deduce to individual key digits. |
| size_t | alphabet_length HASH_TRIE mode: size of the alphabet. |
Public Attributes Documentation
variable size
size_t size;
size of the hash table
variable seed
size_t seed;
table's seed
variable root
HASH_NODE * root;
HASH_TRIE mode: Start of tree.
variable nb_keys
size_t nb_keys;
total number of used keys in the table
variable mode
unsigned int mode;
hashing mode, murmurhash and classic HASH_MURMUR, or HASH_TRIE
variable ht_search
LIST *(*)(struct HASH_TABLE *table, int(*node_is_matching)(HASH_NODE *node)) ht_search;
search elements given an expression
variable ht_remove
int(*)(struct HASH_TABLE *table, const char *key) ht_remove;
remove given's key node from the table
variable ht_put_string_ptr
int(*)(struct HASH_TABLE *table, const char *key, char *val) ht_put_string_ptr;
put an char *string pointer
variable ht_put_string
int(*)(struct HASH_TABLE *table, const char *key, char *val) ht_put_string;
put an char *string
variable ht_put_ptr
int(*)(struct HASH_TABLE *table, const char *key, void *ptr, void(*destructor)(void *ptr), void *(*duplicator)(void *ptr)) ht_put_ptr;
put a a pointer
variable ht_put_int
int(*)(struct HASH_TABLE *table, const char *key, int64_t val) ht_put_int;
put an integer
variable ht_put_double
int(*)(struct HASH_TABLE *table, const char *key, double val) ht_put_double;
put a double
variable ht_print
void(*)(struct HASH_TABLE *table) ht_print;
print table
variable ht_get_string
int(*)(struct HASH_TABLE *table, const char *key, char **val) ht_get_string;
get a char *string from a key's node
variable ht_get_ptr
int(*)(struct HASH_TABLE *table, const char *key, void **val) ht_get_ptr;
get a pointer from a key's node
variable ht_get_node
HASH_NODE *(*)(struct HASH_TABLE *table, const char *key) ht_get_node;
get HASH_NODE at 'key' from table
variable ht_get_int
int(*)(struct HASH_TABLE *table, const char *key, int64_t *val) ht_get_int;
get an int from a key's node
variable ht_get_double
int(*)(struct HASH_TABLE *table, const char *key, double *val) ht_get_double;
get a double from a key's node
variable hash_table
LIST ** hash_table;
HASH_CLASSIC mode: preallocated hash table.
variable empty_ht
int(*)(struct HASH_TABLE *table) empty_ht;
empty a hash table.
char *strings are also freed
variable destroy_ht
int(*)(struct HASH_TABLE **table) destroy_ht;
destroy a hash table
variable alphabet_offset
size_t alphabet_offset;
HASH_TRIE mode: offset to deduce to individual key digits.
variable alphabet_length
size_t alphabet_length;
HASH_TRIE mode: size of the alphabet.
Modules
- AABB3D
- ACCEPT_POOL
- ALLEGRO4
- ALLEGRO5
- ANIM_LIB
- ASTAR
- ATLAS_LIB
- AVRO
- CLOCK_SYNC
- COMMONS
- CONFIGFILE
- CYPHER_BASE64
- CYPHER_VIGENERE
- DEAD_RECKONING
- ENUMS
- EXCEPTIONS
- GAME_ENV
- GIT
- GUI
- HASH_TABLE
- ISOMETRIC_ENGINE
- LIST
- LOG
- LOGNODUP
- LZ4
- NETWORKING
- NETWORK_MSG
- N_COOKIES
- N_DIFF
- N_DIGEST
- N_DISK_CACHE
- N_DNS
- N_ECC
- N_ENTROPY
- N_FILES
- N_FLUIDS
- N_GUI_COLOR
- N_GUI_COLORWHEEL
- N_GUI_CURVE
- N_GUI_GRID
- N_GUI_POPUP
- N_HEX
- N_HTTP3
- N_HTTP_COOKIE
- N_HTTP_FORM
- N_HTTP_MIME
- N_HTTP_REQ
- N_HTTP_RESP
- N_HTTP_ROUTER
- N_HTTP_SERVER
- N_ICC
- N_JSON
- N_KAFKA
- N_LINALG
- N_MODULE
- N_OPENSSL_COMPAT
- N_PRETTY
- N_PTH
- N_QUERY
- N_RANDOM
- N_SHA256
- N_STR
- N_TIFF
- N_TIME
- N_USER
- N_X509
- N_ZIP
- PARTICLES
- PCRE
- PHYSICS
- SIGNALS
- STACK
- THREADS
- TRAJECTORY
- TREE
- ZLIB