|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.measure.random.RandomElement
org.jscience.measure.random.RandomSeedable
org.jscience.measure.random.EcuyerGenerator
public class EcuyerGenerator
Ranecu is an advanced multiplicative linear congruential random number
generator with a period of aproximately 1018.
Ranecu is a direct translation from Fortran of the RANECU
subroutine
published in the paper
F. James, Comp. Phys. Comm. 60 (1990) p 329-344
The algorithm was originally described in
P. L'Ecuyer, Commun. ACM. 1988 (1988) p 742
| Field Summary | |
|---|---|
static int |
DEFSEED1
default iseed1 = 12345 |
static int |
DEFSEED2
default iseed2 = 67890 |
| Constructor Summary | |
|---|---|
EcuyerGenerator()
Initialize |
|
EcuyerGenerator(java.util.Date d)
|
|
EcuyerGenerator(int s1,
int s2)
Initialize |
|
EcuyerGenerator(long l)
|
|
| Method Summary | |
|---|---|
long |
getSeed()
|
double |
nextDouble()
Generate a random scalar with null mean and unit standard deviation. |
void |
nextDouble(double[] d,
int n)
This is an inline version that returns an array of doubles for speed. |
| Methods inherited from class org.jscience.measure.random.RandomSeedable |
|---|
ClockSeed, ClockSeed |
| Methods inherited from class org.jscience.measure.random.RandomElement |
|---|
choose, choose, clone, coin, coin, gaussian, gaussian, nextDouble, powlaw, uniform |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int DEFSEED1
public static int DEFSEED2
| Constructor Detail |
|---|
public EcuyerGenerator()
public EcuyerGenerator(int s1,
int s2)
Ranecu(s1*(long) Integer.MAX_VALUE)+s2)
s1 - seed integer 1 (MSW)s2 - seed integer 2 (LSW)public EcuyerGenerator(long l)
public EcuyerGenerator(java.util.Date d)
| Method Detail |
|---|
public final double nextDouble()
RandomGenerator
nextDouble in interface RandomGeneratorRandomElement.nextDouble(double[], int)
public final void nextDouble(double[] d,
int n)
nextDouble in class RandomElementd - array to be filled with doublesn - number of doubles to generatepublic long getSeed()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||