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: 2018-12-15 18:06:16 +0000 (Sat, 15 Dec 2018) $" revision: "$Revision: 102608 $" class interface LINKED_TREE [G] create make 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 -- Iteration new_cursor: LINKED_TREE_ITERATION_CURSOR [G] -- Fresh cursor associated with current structure 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. feature -- Inapplicable forget_left -- Forget all left siblings. invariant no_void_child: readable_child = child_readable note copyright: "Copyright (c) 1984-2018, 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 EiffelStudio