1#ifndef __TINYHASH_OA_TABLE_H__
2#define __TINYHASH_OA_TABLE_H__
16#define TH_OA_LOAD_FACTOR 0.75
void th_oa_table_init(th_oa_table_t *table)
Initialize open adressing table values.
bool th_oa_table_put(th_generic_table_t table, th_any_t data, size_t data_size, th_any_t value)
Insert a value within an open addressing table. Return true on success.
bool th_oa_table_delete(th_generic_table_t table, th_any_t data, size_t data_size)
Delete a key value pair in an open addressing table. Return true on success.
th_iterator_t * th_oa_iterator_begin(th_generic_table_t generic_table, bool is_begin)
Return a new iterator.
th_any_t th_oa_table_get(th_generic_table_t table, th_any_t data, size_t data_size)
Get a value from an open addressing table. Return NULL if it does exist.
void th_oa_table_free(th_generic_table_t table)
Free an open addressing table.
int th_oa_table_len(th_generic_table_t generic_table)
Returns the table length.
th_generic_table_t th_oa_table_create()
Return an allocated open addressing table struct.
Represents an iterator that allow to iterate over a generic table.
Represent an entry within a bucket.
void * th_generic_table_t
Represents any table.
void * th_any_t
Represent any type of data.