|
Uncommons Maths API (Version 1.2.3) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Random org.uncommons.maths.random.CellularAutomatonRNG
public class CellularAutomatonRNG
Java port of the cellular automaton pseudorandom number generator developed by Tony Pasqualoni.
NOTE: Instances of this class do not use the seeding mechanism inherited
from Random
. Calls to the Random.setSeed(long)
method will have no
effect. Instead the seed must be set by a constructor.
Constructor Summary | |
---|---|
CellularAutomatonRNG()
Creates a new RNG and seeds it using the default seeding strategy. |
|
CellularAutomatonRNG(byte[] seed)
Creates an RNG and seeds it with the specified seed data. |
|
CellularAutomatonRNG(SeedGenerator seedGenerator)
Seed the RNG using the provided seed generation strategy. |
Method Summary | |
---|---|
byte[] |
getSeed()
|
int |
next(int bits)
|
Methods inherited from class java.util.Random |
---|
nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CellularAutomatonRNG()
public CellularAutomatonRNG(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 CellularAutomatonRNG(byte[] seed)
seed
- The seed data used to initialise the RNG.Method Detail |
---|
public int next(int bits)
next
in class Random
public byte[] getSeed()
getSeed
in interface RepeatableRNG
|
Uncommons Maths API (Version 1.2.3) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |