public final class BitMix extends Object
| Modifier and Type | Method and Description |
|---|---|
static long |
applebyMix64(long v)
Austin Appleby's fmix64() mix function used in
MurmurHash3. |
static int |
leaMix32(int v)
Doug Lea's 32-bit mixing function.
|
static long |
leaMix64(long v)
Doug Lea's 64-bit mixing function.
|
static long |
pelican(long v)
Tommy Ettinger's
Pelican mixer. |
static long |
rrmxmx(long v)
Pelle Evensen's better mixer (see
"http://mostlymangling.blogspot.com/2018/07/on-mixing-functions-in-fast-splittable.html").
|
static long |
rrxmrrxmsx(long v)
Pelle Evensen's even better mixer (a bit slower than
rrmxmx(long). |
static int |
staffordMix04(long v)
David Stafford's variant 4 of his 64-bit mixing functions adapted to
return the 32 high bits as an int.
|
static long |
staffordMix13(long v)
David Stafford's variant 13 of his 64-bit mixing functions.
|
static long |
xnasam(long v)
A variant of
xnasam(long, long) where
0x6a09e667f3bcc909L
(chosen at random) is
used as a fixed value for the constant c. |
static long |
xnasam(long v,
long c)
Pelle Evensen's
xNASAM ("Not Another Strange Acronym Mixer")
mixer (slower than the rr... mixers). |
public static long rrmxmx(long v)
v - long to mixpublic static long rrxmrrxmsx(long v)
rrmxmx(long). See
"https://mostlymangling.blogspot.com/2019/01/better-stronger-mixer-and-test-procedure.html".v - long to mixpublic static long xnasam(long v,
long c)
xNASAM ("Not Another Strange Acronym Mixer")
mixer (slower than the rr... mixers). See
"http://mostlymangling.blogspot.com/2020/01/nasam-not-another-strange-acronym-mixer.html".v - long to mixc - a constant with which v becomes xor-ed before the
mixing stepspublic static long xnasam(long v)
xnasam(long, long) where
0x6a09e667f3bcc909L
(chosen at random) is
used as a fixed value for the constant c.v - long to mixpublic static long pelican(long v)
Pelican mixer. See
"https://github.com/tommyettinger/sarong/blob/master/src/main/java/sarong/PelicanRNG.java".v - long to mixpublic static long staffordMix13(long v)
v is 0, the result is 0.v - long to mixpublic static long leaMix64(long v)
v is
0, the result is 0.v - long to mixpublic static long applebyMix64(long v)
MurmurHash3. See
"https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp".
Note that if the argument v is 0, the result is 0.v - long to mixpublic static int staffordMix04(long v)
v is 0, the result is 0.v - long to mixpublic static int leaMix32(int v)
v is
0, the result is 0.v - int to mixCopyright © 2022. All rights reserved.