Algorithms_in_C
1.0.0
Set of algorithms implemented in C.
hash_set.h
1
#ifndef __HASH_SET__
2
#define __HASH_SET__
3
4
#define DEFAULT_HASH_SET_CAPACITY 1 << 10
5
6
typedef
struct
7
{
8
unsigned
capacity;
9
unsigned
length;
10
void
**values;
11
void
**keys;
12
}
hash_set_t
;
13
14
extern
hash_set_t
*init_hash_set();
15
16
extern
unsigned
add(
hash_set_t
*set,
void
*value);
17
18
unsigned
put(
hash_set_t
*set,
long
long
hash,
void
*value);
19
20
extern
int
contains(
hash_set_t
*set,
void
*value);
21
22
int
contains_hash(
hash_set_t
*set,
long
long
hash);
23
24
extern
void
delete
(
hash_set_t
*set,
void
*value);
25
26
extern
long
long
hash(
void
*value);
27
28
extern
unsigned
retrieve_index_from_hash(
const
long
long
hash,
29
const
unsigned
capacity);
30
31
extern
void
resize(
hash_set_t
*set);
32
33
#endif
node
Definition:
binary_search_tree.c:14
Stack
Definition:
strongly_connected_components.c:23
hash_set_t
Definition:
hash_set.h:7
main
int main(int argc, char **argv)
Definition:
c_atoi_str_to_integer.c:70
Graph
Definition:
bellman_ford.c:14
data_structures
hash_set
hash_set.h
Generated on Sun Jun 28 2020 15:07:07 for Algorithms_in_C by
1.8.18