[Overview][Types][Classes][Variables][Index] Reference for unit 'AVL_Tree' (#fcl)


Check the consistency of the tree


Source position: avl_tree.pp line 164

public procedure TAVLTree.ConsistencyCheck; virtual;


ConsistencyCheck checks the correctness of the tree. It returns 0 if the tree is internally consistent, and a negative number if the tree contains an error somewhere.

The Count property doesn't match the actual node count
A left node does not point to the correct parent
A left node is larger than parent node
A right node does not point to the correct parent
A right node is less than parent node
The balance of a node is not calculated correctly

See also



Write the contents of the tree consistency check to the stream

Documentation generated on: May 14 2021