Use MPHF
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 ?
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.
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 ?
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.