INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

description: "Sorted sets implemented as binary search trees"
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: binary_search_tree_set, set, binary_search_tree
cluster: eiffelbase
class BINARY_SEARCH_TREE_SET [G -> COMPARABLE]
inherit

COMPARABLE_SET [G]
redefine
has,
max,
min
end
creation

make
feature -- Initialization

make
feature -- Access

has (v: G): BOOLEAN
-- Is there a node with item `v' in tree?
-- (Reference or object equality,
-- based on `object_comparison'.)
feature -- Measurement

count: INTEGER
-- Number of items in tree

min: G
-- Minimum item in tree

max: G
-- Maximum item in tree

item: G
feature -- Status report

empty: BOOLEAN

extendible: BOOLEAN

prunable: BOOLEAN

after: BOOLEAN

before: BOOLEAN
feature -- Cursor movement

start

finish

forth

back
feature -- Comparison

is_subset (other: like Current): BOOLEAN
-- Is current structure a subset of `other'?
feature -- Element change

put, extend (v: G)
-- Put `v' at proper position in set
-- (unless one already exists).
require
item_exists: v /= void
feature -- Removal

wipe_out
-- Remove all items.

prune (v: G)
feature -- Duplication

duplicate (n: INTEGER): BINARY_SEARCH_TREE_SET [G]
-- New structure containing min (`n', `count')
-- items from current structure
feature -- Basic operations

intersect (other: like Current)
-- Remove all items not in `other'.
require
set_exists: other /= void

subtract (other: like Current)
-- Remove all items also in `other'.
require
set_exists: other /= void

merge (other: like Current)
-- Add all items of `other'.
end -- class BINARY_SEARCH_TREE_SET

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES