public interface Random
This interface is used by the framework (rather than directly using the java.util.Random
concrete class) in order to provide support for different
approaches to generating random numbers. e.g. There may be a requirement to use a hardware random number generator.
Modifier and Type | Method and Description |
---|---|
boolean |
nextBoolean()
Returns a
boolean value. |
double |
nextDouble()
Returns a
double value in the range 0.0d (inclusive) to 1.0d (exclusive). |
int |
nextInt(int bound)
Returns a
int value between 0 (inclusive) and the specified value (exclusive). |
int nextInt(int bound)
int
value between 0 (inclusive) and the specified value (exclusive).bound
- the upper bound (exclusive)int
value between 0 (inclusive) and the specified value (exclusive)double nextDouble()
double
value in the range 0.0d
(inclusive) to 1.0d
(exclusive).double
value in the range 0.0d
(inclusive) to 1.0d
(exclusive)boolean nextBoolean()
boolean
value.boolean
valueOakGP Genetic Programming Framework