public class SplitMix64 extends AbstractRng64 implements SplittablePseudoRandom
SplitMix-type pseudo random generator suggested by
Guy Steele, Doug Lea,
Christine Flood (2014). This implementation is basically the same
algorithm as used in SplittableRandom but it employs
different mixing functions to (hopefully) protect better against the possible
problems with weak gamma values reported in
Steele
(2017). Performance should be about the same as for
SplittableRandom.
This generator has a period of 264.
This generator is 1-dimensionally equidistributed.
DOUBLE_NORM, FLOAT_NORM, nextGaussian, unused| Modifier | Constructor and Description |
|---|---|
|
SplitMix64() |
|
SplitMix64(long seed) |
|
SplitMix64(long[] seed) |
protected |
SplitMix64(long seed,
long gamma) |
| Modifier and Type | Method and Description |
|---|---|
static SplittablePseudoRandom |
getDefault() |
int |
nextInt() |
long |
nextLong() |
SplitMix64 |
split()
Constructs and returns a new SplittablePseudoRandom instance that shares
no mutable state with the current instance.
|
beta, beta, cauchy, cauchy, chiSquare, chiSquare, doubles, doubles, doubles, doubles, exponential, exponential, gamma, gamma, getAlgorithm, getSeed, ints, ints, ints, ints, logNormal, logNormal, longs, longs, longs, longs, next, nextBoolean, nextBytes, nextDouble, nextDouble, nextDoubles, nextFloat, nextFloat, nextGaussian, nextGaussian, nextInt, nextInt, nextLong, nextLong, nextLongs, normal, normal, saveSeed, saveSeed, studentT, studentT, weibull, weibullclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAlgorithm, getSeed, next, nextBoolean, nextBytes, nextDouble, nextDouble, nextDoubles, nextFloat, nextFloat, nextGaussian, nextGaussian, nextInt, nextInt, nextLong, nextLong, nextLongsbeta, beta, cauchy, cauchy, chiSquare, chiSquare, doubles, doubles, doubles, doubles, exponential, exponential, gamma, gamma, ints, ints, ints, ints, logNormal, logNormal, longs, longs, longs, longs, normal, normal, studentT, studentT, weibull, weibullpublic SplitMix64()
public SplitMix64(long seed)
public SplitMix64(long[] seed)
protected SplitMix64(long seed,
long gamma)
public final long nextLong()
nextLong in interface PseudoRandomnextLong in class AbstractRng64public final int nextInt()
nextInt in interface PseudoRandomnextInt in class AbstractRng64public SplitMix64 split()
SplittablePseudoRandomSplittablePseudoRandom instance. Instances of SplittablePseudoRandom are
not thread-safe. They are designed to be split, not shared,
across threads.split in interface SplittablePseudoRandompublic static SplittablePseudoRandom getDefault()
Copyright © 2022. All rights reserved.