5 Struct HASH_NODE
gullradriel edited this page 2026-10-09 00:55:18 +02:00

HASH_NODE

Module: HASH TABLES: classic or trie tree hash_tables

structure of a hash table node

#include "n_hash.h"

Public Attributes

Name
int type
type of the node
int need_rehash
flag to mark a node for rehash
char key_id
key id of the node if any
char * key
string key of the node if any, else NULL
int is_leaf
HASH_TRIE mode: does it have a value.
HASH_VALUE hash_value
numeric key of the node if any, else < 0
void ()(void *ptr) duplicate_func
duplicator_func
void(*)(void *ptr) destroy_func
destroy_func
union HASH_DATA data
data inside the node
struct HASH_NODE ** children
HASH_TRIE mode: pointers to children.
size_t alphabet_length
HASH_TRIE mode: size of alphabet and so size of children allocated array.

Public Attributes Documentation

variable type

int type;

type of the node

variable need_rehash

int need_rehash;

flag to mark a node for rehash

variable key_id

char key_id;

key id of the node if any

variable key

char * key;

string key of the node if any, else NULL

variable is_leaf

int is_leaf;

HASH_TRIE mode: does it have a value.

variable hash_value

HASH_VALUE hash_value;

numeric key of the node if any, else < 0

variable duplicate_func

void *(*)(void *ptr) duplicate_func;

duplicator_func

variable destroy_func

void(*)(void *ptr) destroy_func;

destroy_func

variable data

union HASH_DATA data;

data inside the node

variable children

struct HASH_NODE ** children;

HASH_TRIE mode: pointers to children.

variable alphabet_length

size_t alphabet_length;

HASH_TRIE mode: size of alphabet and so size of children allocated array.