Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > RSCommon > GTree > Classes > TGHeightBalancedTree > Methods

TGHeightBalancedTree.Rebalance(TGHeightBalancedTreeNode,TGHeightBalancedTreeNode,TGHeightBalancedTreeNode,TGHeightBalancedTreeNode,Integer) Method

Scroll Prev Top Next More

Rebalance the tree.

Adjust balance factors on nodes from recent potential unbalanced node to last node. By definition, recent node was set to the last unbalanced node so all the nodes between it and Last node have BalanceFactor of 0 and will change to +/- 1.
 

Namespace: GTree

Parameters

ANewNode

Type: TGHeightBalancedTreeNode

CurrentNode

Type: TGHeightBalancedTreeNode

RecentNode

Type: TGHeightBalancedTreeNode

ParentNode

Type: TGHeightBalancedTreeNode

Priority

Type: Integer

Return Value

Type: TGHeightBalancedTreeNode

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb