Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:
indexing description: "[ Binary search trees; left child item is less than current item, right child item is greater ]" status: "See notice at end of class" names: binary_search_tree, tree representation: recursive, array access: cursor, membership contents: generic date: "$Date: 2001-11-16 20:32:23 +0000 (Fri, 16 Nov 2001) $" revision: "$Revision: 51435 $" class interface BINARY_SEARCH_TREE [G -> COMPARABLE] create make feature -- Initialization make (v: like item) -- Create single node with item v. require item_exists: v /= void ensure node_item: item = v no_child: (left_child = void) and (right_child = void) feature -- Access parent: BINARY_SEARCH_TREE [G] -- Parent of current node has (v: like item): BOOLEAN -- Does tree contain a node whose item -- is equal to v (object comparison)? require else argument_not_void: v /= void feature -- Measurement min: like item -- Minimum item in tree ensure minimum_present: has (Result) max: like item -- Maximum item in tree ensure maximum_present: has (Result) feature -- Status report sorted: BOOLEAN -- Is tree sorted? sorted_and_less (i: like item): BOOLEAN -- Is tree sorted and all its elements less then i feature -- Cursor movement node_action (v: like item) -- Operation on node item, -- to be defined by descendant classes. -- Here it is defined as an empty operation. -- Redefine this procedure in descendant classes if useful -- operations are to be performed during traversals. preorder -- Apply node_action to every node's item -- in tree, using pre-order. i_infix -- Apply node_action to every node's item -- in tree, using infix order. postorder -- Apply node_action to every node's item -- in tree, using post-order. feature -- Element change put (v: like item) -- Put v at proper position in tree -- (unless v exists already). -- (Reference or object equality, -- based on object_comparison.) -- Was declared in BINARY_SEARCH_TREE as synonym of extend. require new_item_exists: v /= void ensure item_inserted: has (v) extend (v: like item) -- Put v at proper position in tree -- (unless v exists already). -- (Reference or object equality, -- based on object_comparison.) -- Was declared in BINARY_SEARCH_TREE as synonym of put. require new_item_exists: v /= void ensure item_inserted: has (v) feature -- Transformation sort -- Sort tree. ensure is_sorted: sorted indexing library: "[ EiffelBase: Library of reusable components for Eiffel. ]" status: "[ Copyright 1986-2001 Interactive Software Engineering (ISE). For ISE customers the original versions are an ISE product covered by the ISE Eiffel license and support agreements. ]" license: "[ EiffelBase may now be used by anyone as FREE SOFTWARE to develop any product, public-domain or commercial, without payment to ISE, under the terms of the ISE Free Eiffel Library License (IFELL) at http://eiffel.com/products/base/license.html. ]" source: "[ Interactive Software Engineering Inc. ISE Building 360 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Electronic mail <info@eiffel.com> Customer support http://support.eiffel.com ]" info: "[ For latest info see award-winning pages: http://eiffel.com ]" end -- class BINARY_SEARCH_TREE
Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:

-- Generated by ISE Eiffel --
For more details: www.eiffel.com