public class MurmurHash
extends java.lang.Object
The C version of MurmurHash 2.0 found at that site was ported to Java by Andrzej Bialecki (ab at getopt org).
Constructor and Description |
---|
MurmurHash() |
Modifier and Type | Method and Description |
---|---|
protected static long |
fmix(long k) |
protected static long |
getBlock(java.nio.ByteBuffer key,
int offset,
int index) |
static long |
hash2_64(java.nio.ByteBuffer key,
int offset,
int length,
long seed) |
static void |
hash3_x64_128(java.nio.ByteBuffer key,
int offset,
int length,
long seed,
long[] result) |
static int |
hash32(java.nio.ByteBuffer data,
int offset,
int length,
int seed) |
static long[] |
inv_hash3_x64_128(long[] result) |
protected static long |
invFmix(long k) |
protected static long |
invRotl64(long v,
int n) |
protected static long |
invRShiftXor(long value,
int shift) |
static long |
invTailReverse(long num)
This gives a correct reversal of the tail byte flip which is needed if want a non mod16==0 byte hash inv or to
target a hash for a given schema.
|
protected static long |
rotl64(long v,
int n) |
public static int hash32(java.nio.ByteBuffer data, int offset, int length, int seed)
public static long hash2_64(java.nio.ByteBuffer key, int offset, int length, long seed)
protected static long getBlock(java.nio.ByteBuffer key, int offset, int index)
protected static long rotl64(long v, int n)
protected static long fmix(long k)
public static void hash3_x64_128(java.nio.ByteBuffer key, int offset, int length, long seed, long[] result)
protected static long invRotl64(long v, int n)
protected static long invRShiftXor(long value, int shift)
protected static long invFmix(long k)
public static long invTailReverse(long num)
public static long[] inv_hash3_x64_128(long[] result)
Copyright © 2009- The Apache Software Foundation