Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MPHF #1

Open
Malfoy opened this issue Jun 18, 2015 · 3 comments
Open

Use MPHF #1

Malfoy opened this issue Jun 18, 2015 · 3 comments

Comments

@Malfoy
Copy link

Malfoy commented Jun 18, 2015

Hello,
Would it be possible to add a sample code on how to use the MPHF created by compute_mphf_seq, compute_mphf_hem and compute_mphf_scan in the README or in a minimal C++ file ?

@ot
Copy link
Owner

ot commented Jun 21, 2015

Hi Malfoy, you can find an example of usage in the unit tests, specifically https://github.com/ot/emphf/blob/master/compute_mphf_generic.hpp for building the data structure and https://github.com/ot/emphf/blob/master/test_mphf_generic.hpp for lookups. I agree that is not as minimal as it could be, but it should be quite self-explanatory. If you think that's not clear enough I can add another example.

@Malfoy
Copy link
Author

Malfoy commented Jul 1, 2015

Ok it is self-explanatory, was just afraid of template use. But is it normal that a key value of 0 result in an infinite loop "Hypergraph is not peelable" with mphf_seq ?

@ot
Copy link
Owner

ot commented Jul 1, 2015

No, that shouldn't happen. On how many keys are you trying to build the hash? For small key sets a special case might be needed and I haven't tested that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants