public interface RandomNumberGenerator
extends java.io.Serializable
RandomNumberGenerator is
not thread-safe, and thus should not be shared among multiple threads.
If a RandomNumberGenerator instance is used in a multi-threaded
program, for example, use
RandomNumberGenerator rng = RandomNumberGenerators.synchronizedRNG(new Gaussian());
| Modifier and Type | Method and Description |
|---|---|
double |
nextDouble()
Get the next random
double. |
void |
seed(long... seeds)
Seed the random number generator to produce repeatable sequences.
|