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

TAVLTree.ConsistencyCheck

Check the consistency of the tree

Declaration

Source position: avl_tree.pp line 164

public procedure TAVLTree.ConsistencyCheck; virtual;

Description

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.

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

See also

TAVLTree.WriteReportToStream

  

Write the contents of the tree consistency check to the stream


Documentation generated on: Jun 23 2021