Automatic generation produced by ISE Eiffel
note description: "[ Subsets with the associated operations, without commitment to a particular representation ]" library: "Free implementation of ELKS library" legal: "See notice at end of class." status: "See notice at end of class." names: subset, set access: membership contents: generic date: "$Date: 2012-07-23 14:02:19 -0700 (Mon, 23 Jul 2012) $" revision: "$Revision: 91989 $" deferred class interface SUBSET [G] feature -- Comparison is_subset (other: SUBSET [G]): BOOLEAN -- Is current set a subset of `other'? require set_exists: other /= Void same_rule: object_comparison = other.object_comparison is_superset (other: SUBSET [G]): BOOLEAN -- Is current set a superset of `other'? require set_exists: other /= Void same_rule: object_comparison = other.object_comparison disjoint (other: SUBSET [G]): BOOLEAN -- Do current set and `other' have no items in common? -- (This feature is redefined in all descendants. The default -- implementation given here is only to stay backward-compatible -- with older versions of EiffelBase.) require set_exists: other /= Void same_rule: object_comparison = other.object_comparison feature -- Element change merge (other: CONTAINER [G]) -- Add all items of `other'. require set_exists: other /= Void same_rule: object_comparison = other.object_comparison feature -- Duplication duplicate (n: INTEGER_32): like Current -- New structure containing min (`n', count) -- items from current structure require non_negative: n >= 0 ensure correct_count_1: n <= count implies Result.count = n correct_count_2: n >= count implies Result.count = count feature -- Basic operations intersect (other: SUBSET [G]) -- Remove all items not in `other'. require set_exists: other /= Void same_rule: object_comparison = other.object_comparison ensure is_subset_other: is_subset (other) subtract (other: SUBSET [G]) -- Remove all items also in `other'. require set_exists: other /= Void same_rule: object_comparison = other.object_comparison ensure is_disjoint: disjoint (other) symdif (other: SUBSET [G]) -- Remove all items also in `other', and add all -- items of `other' not already present. -- (This feature is redefined in all descendants. The default -- implementation given here is only to stay backward-compatible -- with older versions of EiffelBase.) require set_exists: other /= Void same_rule: object_comparison = other.object_comparison 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 SUBSET -- Generated by ISE Eiffel --
For more details: www.eiffel.com