public class XORShiftRNG extends Random implements RepeatableRNG
MersenneTwisterRNG but it is faster.| Constructor and Description |
|---|
XORShiftRNG()
Creates a new RNG and seeds it using the default seeding strategy.
|
XORShiftRNG(byte[] seed)
Creates an RNG and seeds it with the specified seed data.
|
XORShiftRNG(SeedGenerator seedGenerator)
Seed the RNG using the provided seed generation strategy.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getSeed() |
protected int |
next(int bits) |
nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeedpublic XORShiftRNG()
public XORShiftRNG(SeedGenerator seedGenerator) throws SeedException
seedGenerator - The seed generation strategy that will provide
the seed value for this RNG.SeedException - If there is a problem generating a seed.public XORShiftRNG(byte[] seed)
seed - The seed data used to initialise the RNG.public byte[] getSeed()
getSeed in interface RepeatableRNG