inherits
Behaviour supers: All
inherits
Behaviour supers: All
methods
deferred double
next;
|
Return a double random number.
deferred int
next;
|
Return an integer random number.
int (result) next int limit pre limit > 1 post result >= 0 && result < limit; |
Return a number in the range [0, limit).
Superclass for use by random number generators which customarily return ints.
inherits
methods
double
next;
|
Return the next double value, in the range [0, 1.0).
Superclass for use by random number generators which customarily return ints.
inherits
methods
int (result)
next;
|
Return the next integer value, in the range [0, INT_MAX].
MinimalRandom implements IntegerRandom. It uses seeds to generate a repeatable sequence of pseudo-random integers.
inherits
State supers: State, IntegerRandom
variables
Constants needed by the algorithm.
variables
The seed from which we feed.
methods
id (self) init int initial_seed pre initial_seed > 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.