Automatic generation produced by ISE Eiffel
note description: "Trees implemented using a linked list representation" library: "Free implementation of ELKS library" legal: "See notice at end of class." status: "See notice at end of class." names: linked_tree, tree, linked_list representation: recursive, linked access: cursor, membership contents: generic date: "$Date: 2012-07-23 14:02:19 -0700 (Mon, 23 Jul 2012) $" revision: "$Revision: 91989 $" class interface LINKED_TREE [G] create make feature -- Initialization make (v: like item) -- Create single node with item `v'. ensure is_root is_leaf feature -- Access parent: detachable like new_cell -- Parent of current node first_child: like parent -- Leftmost child left_sibling: like parent -- Left neighbor (if any) child_cursor: LINKED_TREE_CURSOR [G] -- Current cursor position feature -- Element change put_child (n: like new_cell) -- Add `n' to the list of children. -- Do not move child cursor. replace_child (n: like new_cell) -- Replace current child by `n'. put_child_left (n: like new_cell) -- Add `n' to the left of cursor position. -- Do not move cursor. put_child_right (n: like new_cell) -- Add `n' to the right of cursor position. -- Do not move cursor. merge_tree_before (other: like new_cell) -- Merge children of `other' into current structure -- before cursor position. Do not move cursor. -- Make `other' a leaf. merge_tree_after (other: like new_cell) -- Merge children of `other' into current structure -- after cursor position. Do not move cursor. -- Make `other' a leaf. feature -- Removal prune (n: like new_cell) -- Prune `n' from children. invariant no_void_child: readable_child = child_readable note copyright: "Copyright (c) 1984-2012, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class LINKED_TREE -- Generated by ISE Eiffel --
For more details: www.eiffel.com