Skip to content

TAVLTreeNode

Represents a node in the tree.

Declaration

Source position: avl_tree.pp line 51

type

  TAVLTreeNode = class
  public
    Parent: TAVLTreeNode;
    Left: TAVLTreeNode;
    Right: TAVLTreeNode;
    Balance: Integer;
    Data: Pointer;
    function Successor : TAVLTreeNode;
    function Precessor : TAVLTreeNode;
    procedure Clear;
    function TreeDepth : Integer;
    procedure ConsistencyCheck;
    function GetCount : SizeInt;
  end;

Description

TAVLTreeNode represents a single node in the AVL tree. It contains references to the other nodes in the tree, and provides a Data pointer which can be used to store the data, associated with the node.

Methods

Member Visibility Description
Clear public Clears the node's data.
ConsistencyCheck public Check consistency of the node and below nodes.
GetCount public Get the number of nodes.
Precessor public Preceding node in the tree.
Successor public Succeeding node in the tree.
TreeDepth public Level of the node in the tree below.

Fieldss

Member Visibility Description
Balance public Balance of the current node.
Data public The data item associated with this node.
Left public Reference to the left subtree of the current node.
Parent public Reference to the parent node in the tree.
Right public Reference to the right subtree of the current node.

See also

Name Description
TAVLTree AVL tree component.
TAVLTreeNode.Data The data item associated with this node.