public class RandomPool extends Object
stir(long) takes care of generating a new 'random' number.
Calling value() returns the current random number.| Constructor and Description |
|---|
RandomPool()
Create a pool.
|
RandomPool(long init)
Create a pool.
|
| Modifier and Type | Method and Description |
|---|---|
void |
stir(long x)
Maintain a pool of randomness using a modified 64-bit
congruential generator with multipliers dynamically
selected from a set of pseudo-random values.
|
long |
value_and_stir()
Stirs, then returns the (new) current random value.
|
long |
value_and_stir(long mix)
Stirs, then returns the (new) current random value.
|
long |
value()
Returns the current random value.
|
public RandomPool()
public RandomPool(long init)
init - the source of randomnesspublic void stir(long x)
x - the source of randomnesspublic long value()
public long value_and_stir()
public long value_and_stir(long mix)
mix - the source of randomness for stirringMMBase 1.9-SNAPSHOT - ${javadoctimestamp}