#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include "hash.h"
#include "math.h"
Go to the source code of this file.
Classes |
struct | ht_bucket |
struct | hashtable |
Defines |
#define | INT_PER_DOUBLE 2 |
Typedefs |
typedef struct ht_bucket | ht_bucket |
Functions |
hashtable * | ht_create (int size, ht_keycp cp, ht_keyeq eq, ht_key2hash hash) |
void | ht_destroy (hashtable *table) |
void * | ht_insert (hashtable *table, void *key, void *data) |
void * | ht_find (hashtable *table, void *key) |
void * | ht_delete (hashtable *table, void *key) |
void | ht_process (hashtable *table, void(*func)(void *)) |
static unsigned int | strhash (void *key) |
static void * | strcp (void *key) |
static int | streq (void *key1, void *key2) |
static unsigned int | d1hash (void *key) |
static void * | d1cp (void *key) |
int | d1eq (void *key1, void *key2) |
static unsigned int | d2hash (void *key) |
static void * | d2cp (void *key) |
static int | d2eq (void *key1, void *key2) |
hashtable * | ht_create_d1 (int size) |
hashtable * | ht_create_d2 (int size) |
hashtable * | ht_create_str (int size) |
Define Documentation
Typedef Documentation
Function Documentation
static void* d1cp |
( |
void * |
key |
) |
[static] |
int d1eq |
( |
void * |
key1, |
|
|
void * |
key2 | |
|
) |
| | |
static unsigned int d1hash |
( |
void * |
key |
) |
[static] |
static void* d2cp |
( |
void * |
key |
) |
[static] |
static int d2eq |
( |
void * |
key1, |
|
|
void * |
key2 | |
|
) |
| | [static] |
static unsigned int d2hash |
( |
void * |
key |
) |
[static] |
void* ht_delete |
( |
hashtable * |
table, |
|
|
void * |
key | |
|
) |
| | |
void* ht_find |
( |
hashtable * |
table, |
|
|
void * |
key | |
|
) |
| | |
void* ht_insert |
( |
hashtable * |
table, |
|
|
void * |
key, |
|
|
void * |
data | |
|
) |
| | |
void ht_process |
( |
hashtable * |
table, |
|
|
void(*)(void *) |
func | |
|
) |
| | |
static void* strcp |
( |
void * |
key |
) |
[static] |
static int streq |
( |
void * |
key1, |
|
|
void * |
key2 | |
|
) |
| | [static] |
static unsigned int strhash |
( |
void * |
key |
) |
[static] |