+
Point of view
All features
deferred class ABSTRACT_AVL_SET_NODE [E_]
Summary
Auxiliary class to implement AVL_SET.
This a classic implementation of an AVL tree (balanced tree first designed by Adelson-Velskii and Landis, 1960)
Direct parents
Inherit list: ANY_AVL_SET_NODE, AVL_TREE_NODE
Known children
Inherit list: AVL_SET_NODE, EXT_AVL_SET_NODE
Overview
Features
{ABSTRACT_AVL_SET}
{ANY}
{AVL_TREE_NODE, AVL_TREE, AVL_TREE_ITERATOR}
Rotations:
{AVL_TREE}
  • rotate_right: ABSTRACT_AVL_SET_NODE [E_]
    Proceeds to some reorganisation and returns the upper node.
  • rotate_left: ABSTRACT_AVL_SET_NODE [E_]
    Proceeds to some reorganisation and returns the upper node.
{}
  • ordered (e1: E_, e2: E_): BOOLEAN
    True if [e1, e2] is a correctly ordered sequence; usually, e1 < e2
{RECYCLING_POOL}
  • recycle
    Do whatever needs to be done to free resources or recycle other objects when recycling this one
{}
set (i: ANY)
effective procedure
out_in_tagged_out_memory
effective procedure
{ANY}
safe_equal: SAFE_EQUAL[E_]
writable attribute
{ANY}
left: ABSTRACT_AVL_SET_NODE [E_]
writable attribute
right: ABSTRACT_AVL_SET_NODE [E_]
writable attribute
item: E_
writable attribute
balance: INTEGER_32
writable attribute
Balance factor; either balanced (the tree is balanced), imbalanced_left (the left branch is the longer) or imbalanced_right (the right branch is the longer)
count: INTEGER_32
effective function
height: INTEGER_32
effective function
map_in (map: COLLECTION[ABSTRACT_AVL_SET_NODE [E_]])
effective procedure
has (e: E_): BOOLEAN
effective function
Is element e in the tree?
fast_has (e: E_): BOOLEAN
effective function
Is element e in the tree?
at (e: E_): ABSTRACT_AVL_SET_NODE [E_]
effective function
Is element e in the tree?
set_item (i: E_)
effective procedure
set_left (l: ABSTRACT_AVL_SET_NODE [E_])
effective procedure
set_right (r: ABSTRACT_AVL_SET_NODE [E_])
effective procedure
set_balance (b: INTEGER_32)
effective procedure
rotate_right: ABSTRACT_AVL_SET_NODE [E_]
effective function
Proceeds to some reorganisation and returns the upper node.
rotate_left: ABSTRACT_AVL_SET_NODE [E_]
effective function
Proceeds to some reorganisation and returns the upper node.
ordered (e1: E_, e2: E_): BOOLEAN
deferred function
{}
True if [e1, e2] is a correctly ordered sequence; usually, e1 < e2
recycle
effective procedure
Do whatever needs to be done to free resources or recycle other objects when recycling this one
balanced: INTEGER_32
is 0
constant attribute
{}
imbalanced_left: INTEGER_32
is -1
constant attribute
{}
imbalanced_right: INTEGER_32
is 1
constant attribute
{}