Top
GENERAL
HASHABLE
deferred class interface GEN_RAND
--
-- Here is the common way to use a random number generator.
-- Current implementations are MIN_STAND, STD_RAND.
--
feature(s) from GEN_RAND
-- Creation procedures:
make
-- Create the generator with an automatic hazardous setting of
-- the seed_value.
-- Because automatic setting may be done using internal address
-- of Current for example, it may produces platform dependent
-- behavior or compilation-mode dependant behavior.
-- Also consider with_seed to chose the most appropriate.
with_seed (seed_value: INTEGER)
-- Create the generator with an explicit seed_value.
feature(s) from GEN_RAND next
-- Compute next random number in sequence.
feature(s) from GEN_RAND
-- No modifications:
last_double: DOUBLE
-- Look at the last computed number.
-- Range 0 to 1
ensure
Result > 0 and Result <= 1
last_real: REAL
-- Look at the last computed number.
-- Range 0 to 1
ensure
Result > 0 and Result <= 1
last_integer (n: INTEGER): INTEGER
-- Look the last computed number.
-- Range 1 to n.
require
n >= 1
ensure
1 <= Result and Result <= n
end of deferred GEN_RAND
All classes inherit from ANY, ANY inherits from
PLATFORM
and PLATFORM inherits from GENERAL.
Generated by short -html_deb on 31 March 2005.