|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcern.colt.PersistentObject
edu.cornell.lassp.houle.RngPack.RandomElement
edu.cornell.lassp.houle.RngPack.RandomSeedable
edu.cornell.lassp.houle.RngPack.Ranecu
public class Ranecu
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
More info .
Source code is available.
| Field Summary | |
|---|---|
static int |
DEFSEED1
default iseed1 = 12345 |
static int |
DEFSEED2
default iseed2 = 67890 |
| Constructor Summary | |
|---|---|
Ranecu()
Initialize |
|
Ranecu(java.util.Date d)
|
|
Ranecu(int s1,
int s2)
Initialize |
|
Ranecu(long l)
|
|
| Method Summary | |
|---|---|
long |
getSeed()
|
double |
raw()
Returns a uniformly distributed pseudo-random number. |
void |
raw(double[] d,
int n)
This is an inline version that returns an array of doubles for speed. |
| Methods inherited from class edu.cornell.lassp.houle.RngPack.RandomSeedable |
|---|
ClockSeed, ClockSeed |
| Methods inherited from class edu.cornell.lassp.houle.RngPack.RandomElement |
|---|
choose, choose, gaussian, gaussian, powlaw, raw, uniform |
| 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 int DEFSEED1
public static int DEFSEED2
| Constructor Detail |
|---|
public Ranecu()
public Ranecu(java.util.Date d)
public Ranecu(int s1,
int s2)
Ranecu(s1*(long) Integer.MAX_VALUE)+s2)
s1 - seed integer 1 (MSW)s2 - seed integer 2 (LSW)public Ranecu(long l)
| Method Detail |
|---|
public long getSeed()
public final double raw()
RandomElementRandomJava for an example of how to do this.
raw in class RandomElementRandomElement.raw()
public final void raw(double[] d,
int n)
raw in class RandomElementd - array to be filled with doublesn - number of doubles to generate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||