|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.stats.random.univariate.uniform.linear.MRG
public class MRG
A Multiple Recursive Generator (MRG) is a linear congruential generator which takes this form:
xi = (a1 * xi-1 + a2 * xi-2 + ... + ak * xi-k) mod m ui = xi / m
| Constructor Summary | |
|---|---|
MRG(long m,
long... a)
Construct a Multiple Recursive Generator. |
|
| Method Summary | |
|---|---|
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... x)
Seed the random number/vector/scenario generator to produce repeatable experiments. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MRG(long m,
long... a)
m - the modulusa - multipliers for the Lehmer rng (a long)| Method Detail |
|---|
public void seed(long... x)
Seedable
seed in interface Seedablex - the seedspublic int order()
LinearCongruentialGenerator
order in interface LinearCongruentialGeneratorpublic long modulus()
LinearCongruentialGenerator
modulus in interface LinearCongruentialGeneratorpublic long nextLong()
RandomLongGeneratorlong.
nextLong in interface RandomLongGeneratorlongpublic double nextDouble()
RandomNumberGeneratordouble.
nextDouble in interface RandomNumberGenerator
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||