note description: "Trees implemented using a two way linked list representation" library: "Free implementation of ELKS library" legal: "See notice at end of class." status: "See notice at end of class." names: two_way_tree, tree, two_way_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 TWO_WAY_TREE [G] create make feature -- Access parent: detachable like new_cell -- Parent node first_child: like parent -- Leftmost child last_child: like parent -- Right most child child_cursor: TWO_WAY_TREE_CURSOR [G] -- Current cursor position feature -- Iteration new_cursor: TWO_WAY_TREE_ITERATION_CURSOR [G] -- Fresh cursor associated with current structure feature -- Status report child_islast: BOOLEAN -- Is cursor under last child? 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. prune (n: like new_cell) -- Prune n from children. feature -- Removal split (n: INTEGER_32) -- Do nothing. invariant off_constraint: (child = Void) implies child_off 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 TWO_WAY_TREE
Generated by ISE EiffelStudio