Class MixFunctions
- java.lang.Object
-
- org.apache.commons.rng.simple.internal.MixFunctions
-
final class MixFunctions extends java.lang.Object
Performs mixing of bits.- Since:
- 1.5
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
GOLDEN_RATIO_32
The fractional part of the golden ratio, phi, scaled to 32-bits and rounded to odd.(package private) static long
GOLDEN_RATIO_64
The fractional part of the golden ratio, phi, scaled to 64-bits and rounded to odd.
-
Constructor Summary
Constructors Modifier Constructor Description private
MixFunctions()
No instances.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static int
murmur3(int x)
Perform the finalising 32-bit mix function of Austin Appleby's MurmurHash3.(package private) static long
stafford13(long x)
Perform variant 13 of David Stafford's 64-bit mix function.
-
-
-
Field Detail
-
GOLDEN_RATIO_64
static final long GOLDEN_RATIO_64
The fractional part of the golden ratio, phi, scaled to 64-bits and rounded to odd. This can be used as an increment for a Weyl sequence.- See Also:
- Golden ratio, Constant Field Values
-
GOLDEN_RATIO_32
static final int GOLDEN_RATIO_32
The fractional part of the golden ratio, phi, scaled to 32-bits and rounded to odd. This can be used as an increment for a Weyl sequence.- See Also:
- Golden ratio, Constant Field Values
-
-
Method Detail
-
stafford13
static long stafford13(long x)
Perform variant 13 of David Stafford's 64-bit mix function. This is the mix function used in theSplitMix64
RNG.This is ranked first of the top 14 Stafford mixers.
- Parameters:
x
- the input value- Returns:
- the output value
- See Also:
- Better Bit Mixing - Improving on MurmurHash3's 64-bit Finalizer.
-
murmur3
static int murmur3(int x)
Perform the finalising 32-bit mix function of Austin Appleby's MurmurHash3.- Parameters:
x
- the input value- Returns:
- the output value
- See Also:
- SMHasher
-
-