INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

description: "Trees implemented using a two way linked list representation"
title: "EiffelBase: library of reusable components for Eiffel. ", "Based on EiffelBase library for ISE Eiffel, ", "used with permission. "
project: "EiffelBase Library"
copyright: "(c) 1986-1997 Interactive Software Engineering Inc. ", "Modifications and extensions: ", "(c) 1997 Object Tools ", "All rights reserved. Duplication and distribution prohibited", "May be used only with Visual Eiffel under terms of user ", "license "
key: two_way_tree, tree, two_way_list
cluster: eiffelbase
class TWO_WAY_TREE [G]
inherit

DYNAMIC_TREE [G]
undefine
child_after,
child_before,
child_item,
child_off
redefine
parent
select
has
end

BI_LINKABLE [G]
rename
left as left_sibling,
right as right_sibling,
put_left as bl_put_left,
put_right as bl_put_right
export
{ANY}
left_sibling,
right_sibling
{TWO_WAY_TREE}
bl_put_left,
bl_put_right,
forget_left,
forget_right
end

TWO_WAY_LIST [G]
rename
active as child,
put_left as child_put_left,
put_right as child_put_right,
after as child_after,
back as child_back,
before as child_before,
count as arity,
cursor as child_cursor,
duplicate as twl_duplicate,
empty as is_leaf,
extend as child_extend,
extendible as child_extendible,
fill as twl_fill,
finish as child_finish,
first_element as first_child,
forth as child_forth,
full as twl_full,
go_i_th as child_go_i_th,
go_to as child_go_to,
has as twl_has,
index as child_index,
isfirst as child_isfirst,
islast as child_islast,
item as child_item,
last_element as last_child,
make as twl_make,
merge_left as twl_merge_left,
merge_right as twl_merge_right,
off as child_off,
prune as twl_prune,
put as child_put,
readable as child_readable,
remove as remove_child,
remove_left as remove_left_child,
remove_right as remove_right_child,
replace as child_replace,
search as search_child,
start as child_start,
writable as child_writable
export
{ANY}
child
{NONE}
twl_duplicate,
twl_fill,
twl_full,
twl_has,
twl_make
undefine
child_isfirst,
child_islast,
child_readable,
child_writable,
is_leaf,
linear_representation,
valid_cursor_index
redefine
first_child,
last_child,
new_cell
select
is_leaf
end
creation

make
feature -- Initialization

make (v: G)
-- Create single node with item `v'.
feature -- Access

parent: like Current

first_child: like parent

last_child: like parent
feature -- Element change

put_child (n: like parent)
-- Add `n' to the list of children.
-- Do not move child cursor.

replace_child (n: like parent)
-- Replace current child by `n'.

put_child_left (n: like parent)
-- Add `n' to the left of cursor position.
-- Do not move cursor.

put_child_right (n: like parent)
-- Add `n' to the right of cursor position.
-- Do not move cursor.

merge_tree_before (other: like parent)
-- Merge children of `other' into current structure
-- after cursor position. Do not move cursor.
-- Make `other' a leaf.

merge_tree_after (other: like parent)
-- Merge children of `other' into current structure
-- after cursor position. Do not move cursor.
-- Make `other' a leaf.

prune (n: like parent)
invariant

off_constraint: (child = void) implies child_off
end -- class TWO_WAY_TREE

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES