o

akka.routing

MurmurHash

object MurmurHash

An object designed to generate well-distributed non-cryptographic hashes. It is designed to hash a collection of integers; along with the integers to hash, it generates two magic streams of integers to increase the distribution of repetitive input sequences. Thus, three methods need to be called at each step (to start and to incorporate a new integer) to update the values. Only one method needs to be called to finalize the hash.

Source
MurmurHash.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MurmurHash
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def arrayHash[T](a: Array[T]): Int

    Compute a high-quality hash of an array

  2. def extendHash(hash: Int, value: Int, magicA: Int, magicB: Int): Int

    Incorporates a new value into an existing hash.

    Incorporates a new value into an existing hash.

    hash

    the prior hash value

    value

    the new value to incorporate

    magicA

    a magic integer from the stream

    magicB

    a magic integer from a different stream

    returns

    the updated hash value

  3. def finalizeHash(hash: Int): Int

    Once all hashes have been incorporated, this performs a final mixing

  4. def nextMagicA(magicA: Int): Int

    Given a magic integer from the first stream, compute the next

  5. def nextMagicB(magicB: Int): Int

    Given a magic integer from the second stream, compute the next

  6. def startHash(seed: Int): Int

    Begin a new hash with a seed value.

  7. def startMagicA: Int

    The initial magic integers in the first stream.

  8. def startMagicB: Int

    The initial magic integer in the second stream.

  9. def stringHash(s: String): Int

    Compute a high-quality hash of a string

  10. def symmetricHash[T](xs: IterableOnce[T], seed: Int): Int

    Compute a hash that is symmetric in its arguments--that is, where the order of appearance of elements does not matter.

    Compute a hash that is symmetric in its arguments--that is, where the order of appearance of elements does not matter. This is useful for hashing sets, for example.