I am looking for a hash family generator that could generate a family of hash functions defined by a set of parameters. So far I have not found such a generator. Is there a way to do this with the hashlib package?
For example, I would like to do something like:
h1 = hash_function(1) h2 = hash_function(2) ...
and h1 and h2 will be different hash functions.
For those of you who may know about this, I am trying to implement a minimum hashing algorithm on a very large dataset.
Basically, I have a very large set of functions (from 100 million to 1 billion) for this document, and I need to create from 1000 to 10,000 different random permutations for this set of functions.
I DO NOT want to build random permutations explicitly, so the method I would like to use in the following:
- generate a hash function
h and consider that for two indices r and s r appears before s in the permutation if h(r) < h(s) and does this for 100 - 1000 different hash functions.
Are there any famous libraries that I could skip? Or any standard way to generate python hash families that you might know about?
python generator hash
Nicolas M.
source share