INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

description: "Sequential lists whose items are sorted in ascending order ", "according to the relational operators of PART_COMPARABLE "
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: sorted_list, sorted_struct, sequence
cluster: eiffelbase
deferred class PART_SORTED_LIST [G -> COMPARABLE]
inherit

LIST [G]
redefine
extend,
has
end
feature -- Access

has (v: G): BOOLEAN
-- Does structure include `v'?
-- (Reference or object equality,
-- based on `object_comparison'.)

search_after (v: G)
-- Go to first position with item greater
-- than or equal to `v'.
ensure
argument_less_than_item: (not after) implies (v <= item)

search_before (v: G)
-- Go to last position with item less
-- than or equal to `v'.
ensure
(not off) implies (item <= v)
feature -- Element change

extend (v: G)
-- Put `v' at proper position in list.
-- The cursor ends up on the newly inserted
-- item.
ensure
remains_sorted: ( sorted ) implies sorted
item_inserted: item = v

merge (other: LINEAR [G])
-- Add all items from `other' at their proper positions.
ensure
remains_sorted: ( sorted ) implies sorted
feature -- Status report

sorted: BOOLEAN
end -- class PART_SORTED_LIST

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES