| Constructor and Description |
|---|
JavaUtilRandomAdapter()
Creates a new random number generator.
|
JavaUtilRandomAdapter(long seed)
Creates a new random number generator using the specified seed.
|
| 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). |
public JavaUtilRandomAdapter()
Uses the no-arg java.util.Random constructor which sets its seed to a value very likely to be distinct from any other invocation of the
constructor.
public JavaUtilRandomAdapter(long seed)
seed - the seed to specify in the constructor of the java.util.Random this object wrapspublic int nextInt(int bound)
Randomint value between 0 (inclusive) and the specified value (exclusive).public double nextDouble()
Randomdouble value in the range 0.0d (inclusive) to 1.0d (exclusive).nextDouble in interface Randomdouble value in the range 0.0d (inclusive) to 1.0d (exclusive)public boolean nextBoolean()
Randomboolean value.nextBoolean in interface Randomboolean valueOakGP Genetic Programming Framework