org.elasticsearch.common
Class MurmurHash
java.lang.Object
org.elasticsearch.common.MurmurHash
public class MurmurHash
- extends Object
This is a very fast, non-cryptographic hash suitable for general hash-based
lookup. See http://murmurhash.googlepages.com/ for more details.
hash32() and hash64() are MurmurHash 2.0.
hash3_x64_128() is MurmurHash 3.0.
The C version of MurmurHash 2.0 found at that site was ported to Java by
Andrzej Bialecki (ab at getopt org).
Method Summary |
protected static long |
fmix(long k)
|
protected static long |
getblock(byte[] key,
int offset,
int index)
|
static long |
hash2_64(byte[] key,
int offset,
int length,
long seed)
|
static long[] |
hash3_x64_128(byte[] key,
int offset,
int length,
long seed)
|
static int |
hash32(byte[] data,
int offset,
int length,
int seed)
|
protected static long |
rotl64(long v,
int n)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MurmurHash
public MurmurHash()
hash32
public static int hash32(byte[] data,
int offset,
int length,
int seed)
hash2_64
public static long hash2_64(byte[] key,
int offset,
int length,
long seed)
getblock
protected static long getblock(byte[] key,
int offset,
int index)
rotl64
protected static long rotl64(long v,
int n)
fmix
protected static long fmix(long k)
hash3_x64_128
public static long[] hash3_x64_128(byte[] key,
int offset,
int length,
long seed)
Copyright © 2009-2012. All Rights Reserved.