public static final class LCG64ShiftRandom.ThreadLocal extends ThreadLocal<LCG64ShiftRandom>
LCG64ShiftRandom PRNG.
It's recommended to initialize the RandomRegistry the following
way:
// Register the PRNG with the default parameters.
RandomRegistry.setRandom(new LCG64ShiftRandom.ThreadLocal());
// Register the PRNG with the {@code LECUYER3} parameters.
RandomRegistry.setRandom(new LCG64ShiftRandom.ThreadLocal(
LCG64ShiftRandom.LECUYER3
));setSeed(long) method will throw an
UnsupportedOperationException for thread local instances.
RandomRegistry.setRandom(new LCG64ShiftRandom.ThreadLocal());
// Will throw 'UnsupportedOperationException'.
RandomRegistry.getRandom().setSeed(1234);| Constructor and Description |
|---|
ThreadLocal()
Create a new thread local instance of the
LCG64ShiftRandom PRNG with the DEFAULT parameters. |
ThreadLocal(LCG64ShiftRandom.Param param)
Create a new thread local instance of the
LCG64ShiftRandom PRNG with the given parameters. |
| Modifier and Type | Method and Description |
|---|---|
protected LCG64ShiftRandom |
initialValue()
Create a new PRNG using block splitting for guaranteeing well
distributed PRN for every thread.
|
get, remove, set, withInitialpublic ThreadLocal()
LCG64ShiftRandom PRNG with the DEFAULT parameters.public ThreadLocal(LCG64ShiftRandom.Param param)
LCG64ShiftRandom PRNG with the given parameters.param - the LC parameters.NullPointerException - if the given parameters are null.protected LCG64ShiftRandom initialValue()
Tina’s Random Number Generator Library
Chapter 2. Pseudo-random numbers for parallel Monte Carlo
simulations, Page 7
Heiko Bauke
[
http://numbercrunch.de/trng/trng.pdf
].
initialValue in class ThreadLocal<LCG64ShiftRandom>© 2007-2017 Franz Wilhelmstötter (2017-04-28 16:50)