|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.doodleproject.numerics4j.random.LinearCongruentialRNG
public class LinearCongruentialRNG
A general linear congruential generator.
References:
Constructor Summary | |
---|---|
LinearCongruentialRNG(long m,
long a)
Create a linear congruential generator with the given modulus and multiplier. |
|
LinearCongruentialRNG(long m,
long a,
long c)
Create a linear congruential generator with the given parameters. |
|
LinearCongruentialRNG(long m,
long a,
long c,
long s)
Create a linear congruential generator with the given parameters. |
Method Summary | |
---|---|
double |
nextRandomNumber()
Access the next random number from this generator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinearCongruentialRNG(long m, long a)
m
- the modulus.a
- the multiplier.public LinearCongruentialRNG(long m, long a, long c)
m
- the modulus.a
- the multiplier.c
- the shift.public LinearCongruentialRNG(long m, long a, long c, long s)
m
- the modulus.a
- the multiplier.c
- the shift.s
- the seed.Method Detail |
---|
public double nextRandomNumber()
nextRandomNumber
in interface RNG
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |