File tom/Random


class tom.Random

Inherits

Behaviour supers
All

instance tom.Random

Inherits

Behaviour supers
All

methods

deferred int
  next;
Undocumented.

int (result)
  next int limit
pre
  limit > 1
post
  result >= 0 && result < limit;
Return a number in the range [0, limit).


class tom.MinimalRandom

Inherits

State supers
State, Random

variables

const ia = 16807;
Constants needed by the algorithm.
const im = 2147483647;
const iq = 12773;
const ir = 2836;

instance tom.MinimalRandom

variables

int seed;
The seed from which we feed.

methods

id (self)
  init int s
pre
  s > 0;
Designated initializer.

id
  init;
Initialize this instance with a seed derived from the current moment in time and the hashq value of self.

int
  next;
Return the next random positive int value.


class tom.StandardRandom

Inherits

State supers
MinimalRandom

instance tom.StandardRandom


Generated by tm 1.01.