Generic hash table with Cuckoo hashing support – header file.
More...
Go to the source code of this file.
|
int | ht_init (cc_hash_table_t *new_table, unsigned int table_size, unsigned int data_size, unsigned int key_length, int rehash) |
|
int | rehash (cc_hash_table_t *ht, cc_item_t *rest) |
|
int | ht_insert (cc_hash_table_t *ht, char *key, const void *new_data, unsigned int n_key_length) |
|
int | ht_is_empty (cc_hash_table_t *ht) |
|
void * | ht_get (cc_hash_table_t *ht, char *key, unsigned int key_length) |
|
int | ht_get_index (cc_hash_table_t *ht, char *key, unsigned int key_length) |
|
void | ht_remove_by_key (cc_hash_table_t *ht, char *key, unsigned int key_length) |
|
void | ht_remove_by_index (cc_hash_table_t *ht, unsigned int index) |
|
void | ht_clear (cc_hash_table_t *ht) |
|
void | ht_destroy (cc_hash_table_t *ht) |
|
Generic hash table with Cuckoo hashing support – header file.
- Author
- Roman Vrana xvran.nosp@m.a20@.nosp@m.stud..nosp@m.fit..nosp@m.vutbr.nosp@m..cz
- Date
- 2013
-
2014
Definition in file cuckoo_hash.h.
◆ INSERT_FAILURE
#define INSERT_FAILURE -2 |
Error constant returned by insert function when failing due no memory
Definition at line 65 of file cuckoo_hash.h.
◆ NOT_FOUND
Constant return by index getter when an item is not found.
Definition at line 60 of file cuckoo_hash.h.
◆ REHASH_DISABLE
Initialization constant for disabling rehash feature. Last item that was kicked will be dropped permanently.
Definition at line 77 of file cuckoo_hash.h.
◆ REHASH_ENABLE
Initialization constant for enabling rehash feature. After unsuccesful insert the table will be rehashed automatically.
Definition at line 71 of file cuckoo_hash.h.
◆ REHASH_FAILURE
#define REHASH_FAILURE -1 |
Error constant returned by rehashing function when failing.
Definition at line 55 of file cuckoo_hash.h.
◆ ht_clear()
◆ ht_destroy()
◆ ht_get()
void * ht_get |
( |
cc_hash_table_t * |
ht, |
|
|
char * |
key, |
|
|
unsigned int |
key_length |
|
) |
| |
◆ ht_get_index()
int ht_get_index |
( |
cc_hash_table_t * |
ht, |
|
|
char * |
key, |
|
|
unsigned int |
key_length |
|
) |
| |
◆ ht_init()
int ht_init |
( |
cc_hash_table_t * |
new_table, |
|
|
unsigned int |
table_size, |
|
|
unsigned int |
data_size, |
|
|
unsigned int |
key_length, |
|
|
int |
rehash |
|
) |
| |
◆ ht_insert()
int ht_insert |
( |
cc_hash_table_t * |
ht, |
|
|
char * |
key, |
|
|
const void * |
new_data, |
|
|
unsigned int |
n_key_length |
|
) |
| |
◆ ht_is_empty()
◆ ht_remove_by_index()
◆ ht_remove_by_key()
void ht_remove_by_key |
( |
cc_hash_table_t * |
ht, |
|
|
char * |
key, |
|
|
unsigned int |
key_length |
|
) |
| |
◆ rehash()