Class MinimalPerfectHash.LongHash

    • Constructor Summary

      Constructors 
      Constructor Description
      LongHash()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int hashCode​(java.lang.Long o, int index, int seed)
      Calculate the hash of the given object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LongHash

        public LongHash()
    • Method Detail

      • hashCode

        public int hashCode​(java.lang.Long o,
                            int index,
                            int seed)
        Description copied from interface: MinimalPerfectHash.UniversalHash
        Calculate the hash of the given object.
        Specified by:
        hashCode in interface MinimalPerfectHash.UniversalHash<java.lang.Long>
        Parameters:
        o - the object
        index - the hash function index (index 0 is used first, so the method should be very fast with index 0; index 1 and so on are only called when really needed)
        seed - the random seed (always the same for a hash table)
        Returns:
        the hash value