home
wiki
classes/clusters list
class information
+
Point of view
INTERNALS_HANDLER
ANY
INTERNALS_HANDLER
All features
class MINIMAL_RANDOM_NUMBER_GENERATOR
Summary
top
Implements the Minimal Standard generator from Press et. al. Numerical Recipies.
Direct parents
inherit list:
RANDOM_NUMBER_GENERATOR
Known children
inherit list:
PRESS_RANDOM_NUMBER_GENERATOR
insert list:
PRESS_RANDOM_NUMBER_GENERATOR
Overview
top
creation features
make
Create (or reset) the random number generator with an automatic hazardous setting of the
seed_value
based on the CPU clock.
with_seed
(seed_value:
INTEGER_32
)
Create (or reset) the random number generator with an explicit
seed_value
.
exported features
make
Create (or reset) the random number generator with an automatic hazardous setting of the
seed_value
based on the CPU clock.
with_seed
(seed_value:
INTEGER_32
)
Create (or reset) the random number generator with an explicit
seed_value
.
next
Prepare the next random number in sequence.
last_real
:
REAL_64
The last computed number in range 0.0 to 1.0 excluded (see ensure).
last_integer
(n:
INTEGER_32
):
INTEGER_32
The last computed number in range 1 to
n
(see ensure).
make
effective procedure
top
Create (or reset) the random number generator with an automatic hazardous setting of the
seed_value
based on the CPU clock.
See also
with_seed
.
with_seed
(seed_value:
INTEGER_32
)
effective procedure
top
Create (or reset) the random number generator with an explicit
seed_value
.
By using and explicit
seed_value
, one can replay more than once the very same hasardous sequence.
See also
make
.
next
effective procedure
top
Prepare the next random number in sequence.
Change internal memory of
Current
in order to prepare the next random number in sequence.
See also
last_real
,
last_integer
.
last_real
:
REAL_64
effective function
top
The last computed number in range 0.0 to 1.0 excluded (see ensure).
Internal memory is not changed and two calls will give the same
Result
. Use
next
to get a new random
last_real
value.
See also
last_integer
.
ensure
Result > 0 and Result <= 1
last_integer
(n:
INTEGER_32
):
INTEGER_32
effective function
top
The last computed number in range 1 to
n
(see ensure).
Internal memory is not changed and two calls will give the same
Result
. Use
next
to get a new random
last_integer
value.
See also
last_real
.
require
n >= 1
ensure
1 <= Result and Result <= n