public final class JavaRandomGenerator extends java.lang.Object implements NormalizedDoubleRandomGenerator, RandomGenerator
Modifier and Type | Field and Description |
---|---|
private java.util.Random |
rand |
Constructor and Description |
---|
JavaRandomGenerator() |
JavaRandomGenerator(long seed) |
Modifier and Type | Method and Description |
---|---|
double |
lowerDouble()
Specifies the lower bound of the values that can be returned by
nextDouble() . |
int |
lowerInt()
Specifies the lower bound of the values that can be returned by
nextInt() . |
double |
nextDouble()
Returns a random double value arbitrarily distributed in the range [0, 1).
|
int |
nextInt() |
int |
nextInt(int bound) |
double |
upperDouble()
Specifies the upper bound of the values that can be returned by
nextDouble() . |
int |
upperInt()
Specifies the upper bound of the values that can be returned by
nextInt() . |
public JavaRandomGenerator()
public JavaRandomGenerator(long seed)
public int nextInt()
nextInt
in interface IntRandomGenerator
public int nextInt(int bound)
nextInt
in interface IntRandomGenerator
public double nextDouble()
NormalizedDoubleRandomGenerator
Returns a random double value arbitrarily distributed in the range [0, 1).
nextDouble
in interface DoubleRandomGenerator
nextDouble
in interface NormalizedDoubleRandomGenerator
public double lowerDouble()
DoubleRandomGenerator
Specifies the lower bound of the values that can be returned by nextDouble()
.
lowerDouble
in interface DoubleRandomGenerator
lowerDouble
in interface NormalizedDoubleRandomGenerator
public double upperDouble()
DoubleRandomGenerator
Specifies the upper bound of the values that can be returned by nextDouble()
.
upperDouble
in interface DoubleRandomGenerator
upperDouble
in interface NormalizedDoubleRandomGenerator
public int lowerInt()
IntRandomGenerator
Specifies the lower bound of the values that can be returned by nextInt()
.
lowerInt
in interface IntRandomGenerator
public int upperInt()
IntRandomGenerator
Specifies the upper bound of the values that can be returned by nextInt()
.
upperInt
in interface IntRandomGenerator