Automatic generation produced by ISE Eiffel
note description: "Prime number properties" library: "Free implementation of ELKS library" status: "See notice at end of class." legal: "See notice at end of class." names: primes date: "$Date: 2012-07-23 14:02:19 -0700 (Mon, 23 Jul 2012) $" revision: "$Revision: 91989 $" class interface PRIMES create default_create feature -- Access Smallest_prime: INTEGER_32 = 2 Smallest_odd_prime: INTEGER_32 = 3 higher_prime (n: INTEGER_32): INTEGER_32 -- Lowest prime greater than or equal to `n' lower_prime (n: INTEGER_32): INTEGER_32 -- Greatest prime lower than or equal to `n' require argument_big_enough: n >= Smallest_prime all_lower_primes (n: INTEGER_32): ARRAY [BOOLEAN] -- Array of `n' boolean values, where the -- value at index `i' is true if and only if -- `i' is prime. is_prime (n: INTEGER_32): BOOLEAN -- Is `n' a prime number? i_th (i: INTEGER_32): INTEGER_32 -- The `i'-th prime number note copyright: "Copyright (c) 1984-2012, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class PRIMES -- Generated by ISE Eiffel --
For more details: www.eiffel.com