public final class MurmurHash3 extends Object
This produces exactly the same hash values as the final C++ version of MurmurHash3 and is thus suitable for producing the same hash values across platforms.
The 32 bit x86 version of this hash should be the fastest variant for relatively short keys like ids. murmurhash3_x64_128 is a good choice for longer strings or if you need more than 32 bits of hash.
Note - The x86 and x64 versions do _not_ produce the same results, as the algorithms are optimized for their respective platforms.
See http://github.com/yonik/java_util for future updates to this file.
| 限定符和类型 | 类和说明 |
|---|---|
static class |
MurmurHash3.LongPair
128 bits of state
|
| 构造器和说明 |
|---|
MurmurHash3() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
fmix32(int h) |
static long |
fmix64(long k) |
static long |
getLongLittleEndian(byte[] buf,
int offset) |
static void |
murmurhash3_x64_128(byte[] key,
int offset,
int len,
int seed,
MurmurHash3.LongPair out) |
static int |
murmurhash3_x86_32(byte[] data,
int offset,
int len,
int seed) |
static int |
murmurhash3_x86_32(CharSequence data,
int offset,
int len,
int seed) |
public static final int fmix32(int h)
public static final long fmix64(long k)
public static final long getLongLittleEndian(byte[] buf,
int offset)
public static int murmurhash3_x86_32(byte[] data,
int offset,
int len,
int seed)
public static int murmurhash3_x86_32(CharSequence data, int offset, int len, int seed)
public static void murmurhash3_x64_128(byte[] key,
int offset,
int len,
int seed,
MurmurHash3.LongPair out)
Copyright © 2017. All rights reserved.