-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
39 lines (23 loc) · 1.04 KB
/
README
File metadata and controls
39 lines (23 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
CMSC858D Homework #2: Implementing a minimum perfect hash function
Implementation by: Sanna Madan
Instructions for building:
Enter the following in command line/terminal
make
./main
Using the implementation:
In main.cpp, specify the input file containing line-separated keys.
Optionally, specify the input file containing line-separated alien keys as well.
To create a MPHF object b:
>MPHF b(&keys, 1, 3);
To construct the MPHF on b:
>vector<bit_vector> bv = b.MPHF_construct();
To lookup a key in b:
>uint64_t result = b.lookup("key");
To create a standard hash table (unordered map) for b:
>unordered_map<string, uint64_t> basic_hash = b.basic_hash(keys);
To lookup a key in a standard hash table for b:
>uint64_t basic_lookup = b.basic_hash_lookup("key", basic_hash);
To get the mphf data structure size for b:
>uint64_t size = b.data_struct_size();
Citation:
Limasset, A., Rizk, G., Chikhi, R., & Peterlongo, P. (2017). Fast and scalable minimal perfect hashing for massive key sets. arXiv preprint arXiv:1702.03154.