Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:
indexing description: "Pseudo-random number sequence, linear congruential method" status: "See notice at end of class" names: random date: "$Date: 2001-11-16 20:32:23 +0000 (Fri, 16 Nov 2001) $" revision: "$Revision: 51435 $" class interface RANDOM create make, set_seed feature -- Initialization make -- Initialize structure using a default seed. ensure seed_set: seed = default_seed set_seed (s: INTEGER) -- Initialize sequence using s as the seed. require non_negative: s >= 0 ensure seed_set: seed = s feature -- Access default_seed: INTEGER -- Default value 123,457; -- may be redefined for a new generator. modulus: INTEGER -- Default value 2^31 -1 = 2,147,483,647; -- may be redefined for a new generator. multiplier: INTEGER -- Default value 7^5 = 16,807; -- may be redefined for a new generator. increment: INTEGER -- Default value 0; -- may be redefined for a new generator. seed: INTEGER -- Seed for sequence. next_random (n: INTEGER): INTEGER -- Next random number after n -- in pseudo-random order require in_range: (n < modulus) and (n >= 0) ensure in_range: (Result < modulus) and (Result >= 0) has (n: INTEGER): BOOLEAN -- Will n be part of the random number sequence? ensure then only_: Result = (n < modulus and n >= 0) i_th (i: INTEGER): INTEGER -- The i-th random number ensure then in_range: (Result < modulus) and (Result >= 0) real_item: REAL -- The current random number as a real between 0 and 1 double_item: DOUBLE -- The current random number as a double between 0 and 1 real_i_th (i: INTEGER): REAL -- The i-th random number as a real between 0 and 1 double_i_th (i: INTEGER): DOUBLE -- The i-th random number as a double between 0 and 1 invariant non_negative_seed: seed >= 0 non_negative_increment: increment >= 0 positive_multiplier: multiplier > 0 modulus_constraint: modulus > 1 indexing library: "[ EiffelBase: Library of reusable components for Eiffel. ]" status: "[ Copyright 1986-2001 Interactive Software Engineering (ISE). For ISE customers the original versions are an ISE product covered by the ISE Eiffel license and support agreements. ]" license: "[ EiffelBase may now be used by anyone as FREE SOFTWARE to develop any product, public-domain or commercial, without payment to ISE, under the terms of the ISE Free Eiffel Library License (IFELL) at http://eiffel.com/products/base/license.html. ]" source: "[ Interactive Software Engineering Inc. ISE Building 360 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Electronic mail <info@eiffel.com> Customer support http://support.eiffel.com ]" info: "[ For latest info see award-winning pages: http://eiffel.com ]" end -- class RANDOM
Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:

-- Generated by ISE Eiffel --
For more details: www.eiffel.com