Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:
indexing description: "[ Trees where each node has a fixed number of children (The number of children is arbitrary but cannot be changed once the node has been created ]" names: fixed_tree, tree, fixed_list 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 FIXED_TREE [G] create make feature -- Initialization make (n: INTEGER; v: G) -- Create node with n void children and item v. require valid_number_of_children: n >= 0 ensure node_item: item = v node_arity: arity = n feature -- Access parent: FIXED_TREE [G] -- Parent of current node first_child: like parent -- Leftmost child child_item: like item -- Item of active child left_sibling: like parent -- Left neighbor, if any right_sibling: like parent -- Right neighbor, if any feature -- Status report child_contractable: BOOLEAN -- May items be removed? ensure Result = not child_off Full: BOOLEAN is True -- Is tree full? feature -- Element change child_put (v: like item) -- Replace current child item with v -- Was declared in FIXED_TREE as synonym of child_replace. child_replace (v: like item) -- Replace current child item with v -- Was declared in FIXED_TREE as synonym of child_put. put_left (v: like item) -- Add v to the left of current node. require is_not_root: not is_root has_left_sibling: left_sibling /= void ensure item_put: left_sibling.item = v put_right (v: like item) -- Add v to the right of current node. require is_not_root: not is_root has_right_sibling: right_sibling /= void ensure item_put: right_sibling.item = v put_child (n: like parent) -- Make n the node's child. -- Was declared in FIXED_TREE as synonym of replace_child. ensure then child_replaced: n.parent = Current replace_child (n: like parent) -- Make n the node's child. -- Was declared in FIXED_TREE as synonym of put_child. ensure then child_replaced: n.parent = Current put_left_sibling (other: like parent) -- Make other the left sibling of current node. require is_not_root: not is_root has_left_sibling: left_sibling /= void ensure left_sibling_replaced: left_sibling = other put_right_sibling (other: like parent) -- Make other the right sibling of current node. require is_not_root: not is_root has_right_sibling: right_sibling /= void ensure right_sibling_replaced: right_sibling = other feature -- Removal remove_child -- Remove active child. ensure then child_removed: child = void feature -- Duplication duplicate (n: INTEGER): like Current -- Copy of sub-tree beginning at cursor position and -- having min (n, arity - child_index + 1) -- children. copy (other: like Current) -- Copy contents from other. 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 FIXED_TREE
Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:

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