public final class MurmurHashUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SEED |
Modifier and Type | Method and Description |
---|---|
static int |
fmix(int h) |
static long |
fmix(long h) |
static int |
hashBytes(byte[] bytes)
Hash bytes.
|
static int |
hashBytes(MemorySegment segment,
int offset,
int lengthInBytes)
Hash bytes in MemorySegment.
|
static int |
hashBytesByWords(MemorySegment segment,
int offset,
int lengthInBytes)
Hash bytes in MemorySegment, length must be aligned to 4 bytes.
|
static int |
hashBytesPositive(byte[] bytes)
Hash bytes.
|
static int |
hashUnsafeBytes(Object base,
long offset,
int lengthInBytes)
Hash unsafe bytes.
|
static int |
hashUnsafeBytesByWords(Object base,
long offset,
int lengthInBytes)
Hash unsafe bytes, length must be aligned to 4 bytes.
|
public static final int DEFAULT_SEED
public static int hashUnsafeBytesByWords(Object base, long offset, int lengthInBytes)
base
- base unsafe objectoffset
- offset for unsafe objectlengthInBytes
- length in bytespublic static int hashBytesPositive(byte[] bytes)
public static int hashBytes(byte[] bytes)
public static int hashUnsafeBytes(Object base, long offset, int lengthInBytes)
base
- base unsafe objectoffset
- offset for unsafe objectlengthInBytes
- length in bytespublic static int hashBytesByWords(MemorySegment segment, int offset, int lengthInBytes)
segment
- segment.offset
- offset for MemorySegmentlengthInBytes
- length in MemorySegmentpublic static int hashBytes(MemorySegment segment, int offset, int lengthInBytes)
segment
- segment.offset
- offset for MemorySegmentlengthInBytes
- length in MemorySegmentpublic static int fmix(int h)
public static long fmix(long h)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.