+
Point of view
All features
deferred class AVL_TREE [E_]
Summary
Definition of a mathematical set of comparable objects. All common operations on mathematical sets are available.
Direct parents
Insert list: AVL_CONSTANTS
Known children
Insert list: ABSTRACT_AVL_DICTIONARY, ABSTRACT_AVL_SET
Class invariant
Overview
Features
{ANY}
Adding and removing:
{ANY}
{}
Looking and searching:
{ANY}
Iterating internals:
{}
  • build_map
  • map: FAST_ARRAY[AVL_TREE_NODE[E_]]
    Elements in a row for iteration.
  • map_dirty: BOOLEAN
    True when the map needs to be built again for the iterators.
{}
{}
debug_string: STRING
effective function
{ANY}
count: INTEGER_32
writable attribute
{ANY}
remove (e: E_)
effective procedure
{ANY}
fast_remove (e: E_)
effective procedure
{ANY}
root: AVL_TREE_NODE[E_]
writable attribute
{}
rebalance: BOOLEAN
writable attribute
{}
item_memory: E_
writable attribute
{}
set_value_and_key (n: AVL_TREE_NODE[E_])
deferred procedure
{}
set_value (n: AVL_TREE_NODE[E_])
deferred procedure
{}
fast_do_insert (n: AVL_TREE_NODE[E_]): AVL_TREE_NODE[E_]
effective function
{}
ensure
do_insert (n: AVL_TREE_NODE[E_]): AVL_TREE_NODE[E_]
effective function
{}
ensure
left_grown (n: AVL_TREE_NODE[E_]): AVL_TREE_NODE[E_]
effective function
{}
require ensure
right_grown (n: AVL_TREE_NODE[E_]): AVL_TREE_NODE[E_]
effective function
{}
require ensure
fast_do_remove (n: AVL_TREE_NODE[E_], e: E_): AVL_TREE_NODE[E_]
effective function
{}
ensure
do_remove (n: AVL_TREE_NODE[E_], e: E_): AVL_TREE_NODE[E_]
effective function
{}
ensure
remove_right (n1: AVL_TREE_NODE[E_], n2: AVL_TREE_NODE[E_]): AVL_TREE_NODE[E_]
effective function
{}
require
  • n1 /= Void
  • n2 /= Void
ensure
left_shrunk (n: AVL_TREE_NODE[E_]): AVL_TREE_NODE[E_]
effective function
{}
require ensure
right_shrunk (n: AVL_TREE_NODE[E_]): AVL_TREE_NODE[E_]
effective function
{}
require ensure
exchange_and_discard (n1: AVL_TREE_NODE[E_], n2: AVL_TREE_NODE[E_])
deferred procedure
{}
require
  • n1 /= Void
  • n2 /= Void
ensure
clear_nodes (node: AVL_TREE_NODE[E_])
effective procedure
{}
node_height (node: AVL_TREE_NODE[E_]): INTEGER_32
effective function
{}
has (e: E_): BOOLEAN
effective function
{ANY}
Is element e in the set?
fast_has (e: E_): BOOLEAN
effective function
{ANY}
Is element e in the set?
build_map
effective procedure
{}
require ensure
map: FAST_ARRAY[AVL_TREE_NODE[E_]]
writable attribute
{}
Elements in a row for iteration.
See build_map.
map_dirty: BOOLEAN
writable attribute
{}
True when the map needs to be built again for the iterators.
See build_map.
new_node: AVL_TREE_NODE[E_]
effective function
{}
a_new_node: AVL_TREE_NODE[E_]
deferred function
{}
discard_node (n: AVL_TREE_NODE[E_])
effective procedure
{}
require
  • n /= Void
lost_nodes: RECYCLING_POOL[AVL_TREE_NODE[E_]]
effective function
{}
lost_nodes_memory: RECYCLING_POOL[AVL_TREE_NODE[E_]]
writable attribute
{}
once function
{}
ordered (e1: E_, e2: E_): BOOLEAN
deferred function
{}
True if [e1, e2] is a correctly ordered sequence; usually, e1 < e2
require
  • e1 /= Void
  • e2 /= Void
balanced: INTEGER_32
is 0
constant attribute
{}
imbalanced_left: INTEGER_32
is -1
constant attribute
{}
imbalanced_right: INTEGER_32
is 1
constant attribute
{}