#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "inthash.h"
Go to the source code of this file.
Compounds | |
struct | inthash_node_t |
Defines | |
#define | HASH_LIMIT 0.5 |
Typedefs | |
typedef inthash_node_t | inthash_node_t |
Functions | |
int | inthash (const inthash_t *tptr, int key) |
VMDEXTERNSTATIC void | inthash_init (inthash_t *tptr, int buckets) |
void | rebuild_table_int (inthash_t *tptr) |
VMDEXTERNSTATIC int | inthash_lookup (const inthash_t *tptr, int key) |
VMDEXTERNSTATIC int | inthash_insert (inthash_t *tptr, int key, int data) |
VMDEXTERNSTATIC int | inthash_delete (inthash_t *tptr, int key) |
VMDEXTERNSTATIC int | inthash_entries (inthash_t *tptr) |
VMDEXTERNSTATIC void | inthash_destroy (inthash_t *tptr) |
float | alos_int (inthash_t *tptr) |
VMDEXTERNSTATIC char * | inthash_stats (inthash_t *tptr) |
|
Definition at line 30 of file inthash.c. Referenced by inthash_insert. |
|
hash table node data structure |
|
Definition at line 256 of file inthash.c. References alos_int, inthash_t::bucket, inthash_t::entries, inthash_node_t::next, NULL, and inthash_t::size. Referenced by alos_int, and inthash_stats. |
|
Definition at line 45 of file inthash.c. References inthash_t::downshift, and inthash_t::mask. Referenced by inthash_delete, inthash_insert, inthash_lookup, and rebuild_table_int. |
|
delete an int from the hash table, given its key Definition at line 182 of file inthash.c. References inthash_t::bucket, inthash_node_t::data, data, inthash, inthash_node_t::key, inthash_node_t::next, and NULL. |
|
destroy the hash table completely, deallocate memory Definition at line 231 of file inthash.c. References inthash_t::bucket, inthash_node_t::next, NULL, and inthash_t::size. |
|
return the number of entries in the hash table Definition at line 222 of file inthash.c. References inthash_t::entries. |
|
initialize hash table for first use Definition at line 62 of file inthash.c. References inthash_t::bucket, inthash_t::downshift, inthash_t::entries, inthash_t::mask, and inthash_t::size. |
|
insert an int into the hash table, along with an integer key Definition at line 150 of file inthash.c. References inthash_t::bucket, inthash_node_t::data, data, inthash_t::entries, HASH_LIMIT, inthash, inthash_lookup, inthash_node_t::key, inthash_node_t::next, rebuild_table_int, and inthash_t::size. |
|
lookup a key in the hash table returning its integer key Definition at line 126 of file inthash.c. References inthash_t::bucket, inthash_node_t::data, inthash, inthash_node_t::key, inthash_node_t::next, and NULL. |
|
print hash table vital stats Definition at line 277 of file inthash.c. References alos_int, inthash_t::entries, and inthash_t::size. |
|
Definition at line 92 of file inthash.c. References inthash_t::bucket, inthash_t::entries, inthash, inthash_init, inthash_node_t::key, inthash_node_t::next, and inthash_t::size. Referenced by inthash_insert. |