INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

description: "Subsets with the associated operations, ", "without commitment to a particular representation "
title: "EiffelBase: library of reusable components for Eiffel. ", "Based on EiffelBase library for ISE Eiffel, ", "used with permission. "
project: "EiffelBase Library"
copyright: "(c) 1986-1997 Interactive Software Engineering Inc. ", "Modifications and extensions: ", "(c) 1997 Object Tools ", "All rights reserved. Duplication and distribution prohibited", "May be used only with Visual Eiffel under terms of user ", "license "
key: subset, set
cluster: eiffelbase
deferred class SUBSET [G]
inherit

SET [G]
end
feature -- Comparison

is_subset (other: like Current): BOOLEAN
-- Is current set a subset of `other'?
require
set_exists: other /= void
same_rule: object_comparison = other.object_comparison

is_superset (other: like Current): BOOLEAN
-- Is current set a superset of `other'?
require
set_exists: other /= void
same_rule: object_comparison = other.object_comparison

disjoint (other: like Current): BOOLEAN
-- Do current set and `other' have no
-- items in common?
require
set_exists: other /= void
same_rule: object_comparison = other.object_comparison
feature -- Duplication

duplicate (n: INTEGER): SUBSET [G]
-- 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: like Current)
-- 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)

merge (other: like Current)
-- Add all items of `other'.
require
set_exists: other /= void
same_rule: object_comparison = other.object_comparison
ensure
is_superset: is_superset (other)

subtract (other: like Current)
-- 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: like Current)
-- Remove all items also in `other', and add all
-- items of `other' not already present.
require
set_exists: other /= void
same_rule: object_comparison = other.object_comparison
end -- class SUBSET

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES