public class DRand extends DoubleRandomEngine
The seed can be any integer satisfying 0 < 4*seed+1 < 232. In other words, there must hold seed >= 0 && seed < 1073741823.
Quality: This generator follows the multiplicative congruential method of the form
Performance: TO_DO
Implementation: TO_DO
Note that this implementation is not synchronized.
DoubleMersenneTwister
,
Random
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SEED |
Constructor and Description |
---|
DRand()
Constructs and returns a random number generator with a default seed,
which is a constant.
|
DRand(Date d)
Constructs and returns a random number generator seeded with the given
date.
|
DRand(int seed)
Constructs and returns a random number generator with the given seed.
|
Modifier and Type | Method and Description |
---|---|
int |
nextInt()
Returns a 32 bit uniformly distributed random number in the closed
interval [Integer.MIN_VALUE,Integer.MAX_VALUE] (including
Integer.MIN_VALUE and Integer.MAX_VALUE).
|
apply, apply, apply, makeDefault, nextDouble, nextFloat, nextLong, raw
clone
public static final int DEFAULT_SEED
public DRand()
public DRand(int seed)
seed
- should not be 0, in such a case DRand.DEFAULT_SEED is
substituted.public DRand(Date d)
d
- typically new java.util.Date()public int nextInt()
nextInt
in class DoubleRandomEngine
Jump to the Parallel Colt Homepage