public class XorShift64Star extends AbstractRng64
A faster and statistically better pseudo RNG than Random
This generator has a period of 264 − 1.
At least the two lowest bits of a xorshift* generator satisfy a
linear recurrence and will therefore fail linearity tests (MatrixRank and
LinearComp in TestU01) which were designed to catch these linear relations.
However, low linear complexity of the lowest bits has rarely an effect in
practice, and certainly has no impact at all when the generator is only used
to generate floating-point numbers.
This generator is 1-dimensionally equidistributed.
| Modifier and Type | Field and Description |
|---|---|
protected long |
seed |
DOUBLE_NORM, FLOAT_NORM, nextGaussian, unused| Constructor and Description |
|---|
XorShift64Star() |
XorShift64Star(long seed) |
XorShift64Star(long[] seed) |
| Modifier and Type | Method and Description |
|---|---|
static PseudoRandom |
getDefault() |
long |
nextLong() |
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, nextInt, nextLong, nextLong, nextLongs, normal, normal, saveSeed, saveSeed, studentT, studentT, weibull, weibullpublic XorShift64Star()
public XorShift64Star(long seed)
public XorShift64Star(long[] seed)
public final long nextLong()
nextLong in interface PseudoRandomnextLong in class AbstractRng64public static PseudoRandom getDefault()
Copyright © 2022. All rights reserved.