Class DietzfelbingerHash


  • public class DietzfelbingerHash
    extends Object
    Provides a Dietzfelbinger hash function. Citation: Mikkel Thorup: High Speed Hashing for Integers and Strings. CoRR abs/1504.06804 (2015)
    • Constructor Detail

      • DietzfelbingerHash

        public DietzfelbingerHash​(int hashSize,
                                  Random random)
        Creates a Dietzfelbinger hash function.
        Parameters:
        hashSize - size of the hash function (must be smaller than 31)
        random - instance to generate a stream of pseudorandom numbers
    • Method Detail

      • nextHashFunction

        public void nextHashFunction()
        Generates a new Dietzfelbinger hash function.
      • hash

        public int hash​(long value)
        Dietzfelbinger hash function.
        Parameters:
        value - to hash
        Returns:
        the result