public class FRand extends FloatRandomEngine
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.
FloatMersenneTwister
,
Random
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SEED |
Constructor and Description |
---|
FRand()
Constructs and returns a random number generator with a default seed,
which is a constant.
|
FRand(Date d)
Constructs and returns a random number generator seeded with the given
date.
|
FRand(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, makeDefault, nextFloat, nextLong, raw
clone
public static final int DEFAULT_SEED
public FRand()
public FRand(int seed)
seed
- should not be 0, in such a case DRand.DEFAULT_SEED is
substituted.public FRand(Date d)
d
- typically new java.util.Date()public int nextInt()
nextInt
in class FloatRandomEngine
Jump to the Parallel Colt Homepage