|
Parallel Colt 0.9.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcern.colt.PersistentObject
cern.jet.random.tfloat.engine.FloatRandomEngine
cern.jet.random.tfloat.engine.FRand
public class FRand
Quick medium quality uniform pseudo-random number generator. Produces uniformly distributed int's and long's in the closed intervals [Integer.MIN_VALUE,Integer.MAX_VALUE] and [Long.MIN_VALUE,Long.MAX_VALUE], respectively, as well as float's and float's in the open unit intervals (0.0f,1.0f) and (0.0,1.0), respectively.
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 FormField Summary | |
---|---|
static int |
DEFAULT_SEED
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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). |
Methods inherited from class cern.jet.random.tfloat.engine.FloatRandomEngine |
---|
apply, apply, makeDefault, nextFloat, nextLong, raw |
Methods inherited from class cern.colt.PersistentObject |
---|
clone |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_SEED
Constructor Detail |
---|
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()Method Detail |
---|
public int nextInt()
nextInt
in class FloatRandomEngine
|
Parallel Colt 0.9.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |