INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

description: "Structures whose items are sorted according to a total order", "relation "
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_struct, comparable_struct
cluster: eiffelbase
deferred class SORTED_STRUCT [G -> COMPARABLE]
inherit

COMPARABLE_STRUCT [G]
undefine
off,
search
redefine
max,
min
end

INDEXABLE [G, INTEGER]
rename
item as i_th,
put as put_i_th,
bag_put as putt
redefine
putt
end

LINEAR [G]
end
feature -- Measurement

min: G
-- Minimum item
require
is_sorted: sorted
ensure

max: G
-- Maximum item
require
is_sorted: sorted
ensure

median: G
-- Median element
ensure
median_present: has (Result)
feature -- Status report

sorted: BOOLEAN
-- Is structure sorted?
feature -- Transformation

sort
-- Sort structure.
ensure
is_sorted: sorted
end -- class SORTED_STRUCT

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES