Class MixFunctions


  • final class MixFunctions
    extends java.lang.Object
    Performs mixing of bits.
    Since:
    1.5
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static int GOLDEN_RATIO_32
      The fractional part of the golden ratio, phi, scaled to 32-bits and rounded to odd.
      (package private) static long GOLDEN_RATIO_64
      The fractional part of the golden ratio, phi, scaled to 64-bits and rounded to odd.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private MixFunctions()
      No instances.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static int murmur3​(int x)
      Perform the finalising 32-bit mix function of Austin Appleby's MurmurHash3.
      (package private) static long stafford13​(long x)
      Perform variant 13 of David Stafford's 64-bit mix function.
      • Methods inherited from class java.lang.Object

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

      • GOLDEN_RATIO_64

        static final long GOLDEN_RATIO_64
        The fractional part of the golden ratio, phi, scaled to 64-bits and rounded to odd. This can be used as an increment for a Weyl sequence.
        See Also:
        Golden ratio, Constant Field Values
      • GOLDEN_RATIO_32

        static final int GOLDEN_RATIO_32
        The fractional part of the golden ratio, phi, scaled to 32-bits and rounded to odd. This can be used as an increment for a Weyl sequence.
        See Also:
        Golden ratio, Constant Field Values
    • Constructor Detail

      • MixFunctions

        private MixFunctions()
        No instances.
    • Method Detail

      • murmur3

        static int murmur3​(int x)
        Perform the finalising 32-bit mix function of Austin Appleby's MurmurHash3.
        Parameters:
        x - the input value
        Returns:
        the output value
        See Also:
        SMHasher