]> git.donarmstrong.com Git - fastq-tools.git/blob - src/hash.h
a program to output a nonredundant list of readss
[fastq-tools.git] / src / hash.h
1
2 #ifndef FASTQ_TOOLS_HASH_H
3 #define FASTQ_TOOLS_HASH_H
4
5 #include <stdlib.h>
6 #include <stdint.h>
7
8
9 typedef struct hashed_value_
10 {
11     char*    value;
12     size_t   len;
13     uint32_t count;
14     struct hashed_value_* next;
15 } hashed_value;
16
17
18 typedef struct
19 {
20     hashed_value** A; /* table proper */
21     size_t n;         /* table size */
22     size_t m;         /* hashed items */
23     size_t max_m;     /* max hashed items before rehash */
24 } hash_table;
25
26
27 hash_table* create_hash_table();
28
29 void destroy_hash_table(hash_table*);
30
31 void inc_hash_table(hash_table*, const char* value, size_t len);
32
33 hashed_value** dump_hash_table(hash_table*);
34
35
36 #endif
37