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.
- Annotations
- @ccompatUsedUntil213()
- Source
- MurmurHash.scala
- Alphabetic
- By Inheritance
- MurmurHash
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def arrayHash[T](a: Array[T]): Int
Compute a high-quality hash of an array
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- 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
- def finalizeHash(hash: Int): Int
Once all hashes have been incorporated, this performs a final mixing
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nextMagicA(magicA: Int): Int
Given a magic integer from the first stream, compute the next
- def nextMagicB(magicB: Int): Int
Given a magic integer from the second stream, compute the next
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def startHash(seed: Int): Int
Begin a new hash with a seed value.
- def startMagicA: Int
The initial magic integers in the first stream.
- def startMagicB: Int
The initial magic integer in the second stream.
- def stringHash(s: String): Int
Compute a high-quality hash of a string
- 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.
- Annotations
- @nowarn()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])