8.63. File tom/RandomDouble

class tom.Ranecu

This is a Random number generator called Ranecu. A lot of the actual code was borrowed from the RngPack 1.0 Java package by Paul Houle.

This is a quote from the "Ranecu.java":

"Ranecu is an advanced multiplicative linear congruential random number generator with a period of aproximately 10e18"

References:

http://www.msc.cornell.edu/~houle/rngpack

F. James, "Comp. Phys. Comm." 60 1990 p 329-344 P. L`Ecuyer, "Commun. ACM." 1988 1988 p 742.

inherits

State supers: State, DoubleRandom

variables

const DEFSEED1 = 12345;

Default seeds.

const DEFSEED2 = 67890;

methods


instance (id) (r)
  new;

Return a newly allocated instance, initialized with a random seed.


instance (id)
  newWithDefault;

Return a newly allocated instance, initialized with a default seed.


instance (id)
  newWithSeed int seed;

Return a newly allocated instance, initialized with the specified seed.

instance tom.Ranecu

variables

int iseed1;

The seed.

int iseed2;

methods


id (self)
  initWithSeed (int, int) (s1, s2);

Designated initializer.


id
  init;

Default initializer.


id
  initWithSeed int seed;

Short initializer.


id
  initWith Date d;

Initialize with the date d.


double
  next;

Undocumented.


double
  raw;

Undocumented.


long
  getSeed;

Undocumented.

class tom.Ranlux

This is a Random number generator called Ranlux. A lot of the actual code was borrowed from the RngPack 1.0 Java package by Paul Houle.

References:

http://www.msc.cornell.edu/~houle/rngpack F. James, "Computer Physics Communications" 79 (1994) 111 http://www.camk.edu.pl/~tomek/html.refs/ranlux.f90_2.html.

inherits

State supers: State, DoubleRandom

variables

const maxlev = 4;

Maximum luxury level.

const lxdflt = 3;

Default luxury level.

const igiga = 1000000000;

const jsdflt = 314159265;

const twop12 = 4096;

const itwo24 = 1 << 24;

const icons = 2147483563;

methods


instance (id) (r)
  new;

Undocumented.


instance (id)
  newWithDefault;

Undocumented.


instance (id)
  newWithSeed int seed;

Undocumented.

instance tom.Ranlux

variables

MutableIntArray iseeds;

MutableIntArray isdext;

MutableIntArray next;

int luxlev;

int nskip;

int inseed;

int jseed;

int in24;

int kount;

int mkount;

int i24;

int j24;

MutableFloatArray seeds;

float carry;

float twom24;

float twom12;

MutableIntArray ndskip;

methods


id (self)
  init;

Undocumented.


id (self)
  initWithSeed int ins;

Undocumented.


id (self)
  initWithSeed int ins
         atLux int lux;

Undocumented.


void
  initLux;

Undocumented.


void
  initArrays;

Undocumented.


double
  next;

Undocumented.


double
  raw;

Undocumented.


void
  rluxdef;

Undocumented.


void
  rluxgo (int, int) (lux, ins);

Undocumented.

class tom.Ranmar

This is a Random number generator called Ranmar. A lot of the actual code was borrowed from the RngPack 1.0 Java package by Paul Houle.

This is a quote from the "Ranmar.java" :

"[Ranmar] is a lagged Fibonacci generator proposed by Marsaglia and Zaman and is a good research grade generator."

References:

http://www.msc.cornell.edu/~houle/rngpack.

inherits

State supers: DoubleRandom, State

variables

const DEFSEED = 54217137;

Default seed.

const BIG_PRIME = 899999963;

The 46,009,220th prime number, the largest prime less than 9*10e8. Used as a modulus because this version of RANMAR needs a seed between 0 and 9*10e8 and BIG_PRIME isn't commensurate with any regular period.

methods


instance (id) (r)
  new;

Undocumented.


instance (id)
  newWithDefault;

Undocumented.


instance (id)
  newWithSeed int seed;

Undocumented.

instance tom.Ranmar

variables

MutableDoubleArray u;

MutableDoubleArray uvec;

double c;

double cd;

double cm;

int i97;

int j97;

methods


id (self)
  init;

Undocumented.


id (self)
  initWithSeed int seed;

Undocumented.


id (self)
  initWith Date d;

Undocumented.


void
  ranmarin int ijkl;

Undocumented.


double
  next;

Undocumented.


double
  raw;

Undocumented.