Class Murmur3HashFunction
- All Implemented Interfaces:
HashFunction,RangeCompatibleHashFunction
See MurmurHash3_x86_32 in the C++ implementation.
This function is more complex than SimpleHashFunction, but is suitable for use in RangeHashTable,
because it produces a more uniform hash distribution,
even for datasets with very similar strings (same length, small character set, ...).
MurmurHash3 was written by Austin Appleby, and is placed in the public domain. The author hereby disclaims copyright to this source code.
Original source code: http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp (Modified to adapt to Guava coding conventions and to use Guava's HashFunction interface, then modified again to adapt to Hibernate Search's coding conventions and to remove code that is unnecessary in Hibernate Search).
- Author:
- Austin Appleby, Dimitris Andreou, Kurt Alfred Kluever
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioninthash(CharSequence input) Hashes akey, i.e. turns it into an integer for use in aHashTable.toString()
-
Field Details
-
INSTANCE
-
-
Method Details
-
toString
-
hash
Description copied from interface:HashFunctionHashes akey, i.e. turns it into an integer for use in aHashTable.- Specified by:
hashin interfaceHashFunction- Parameters:
input- A key to hash.- Returns:
- A hash.
-