public class LEcuyer extends Object implements LinearCongruentialGenerator
m = 2^31-1 = 2147483647, and
a[] = {0, 63308, -183326}.
The second has a modulus m = 2145483479, and
a[] = {86098, 0, -539608}.| Constructor and Description |
|---|
LEcuyer()
Construct a LEcuyer pseudo uniform random generator.
|
LEcuyer(long seed11,
long seed12,
long seed13,
long seed21,
long seed22,
long seed23)
Construct a LEcuyer pseudo uniform random generator and then seed.
|
| Modifier and Type | Method and Description |
|---|---|
long |
modulus()
Get the modulus of this linear congruential generator.
|
double |
nextDouble()
Get the next random
double. |
long |
nextLong()
Get the next random
long. |
int |
order()
Get the order of recursion.
|
void |
seed(long... seeds)
Seed the random number/vector/scenario generator to produce repeatable experiments.
|
public LEcuyer()
public LEcuyer(long seed11,
long seed12,
long seed13,
long seed21,
long seed22,
long seed23)
seed11 - a seedseed12 - a seedseed13 - a seedseed21 - a seedseed22 - a seedseed23 - a seedpublic void seed(long... seeds)
public int order()
LinearCongruentialGeneratororder in interface LinearCongruentialGeneratorpublic long modulus()
LinearCongruentialGeneratormodulus in interface LinearCongruentialGeneratorpublic long nextLong()
RandomLongGeneratorlong.nextLong in interface RandomLongGeneratorlongpublic double nextDouble()
RandomNumberGeneratordouble.nextDouble in interface RandomNumberGeneratorCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.