Class TrbSearchTree (unit EZDSLBtr)

Inherits from

TBinSearchTree

Constructors



Functions

function Delete(Cursor : TTreeCursor) : TTreeCursor;

--------

procedure bsSwapData(OldCursor, NewCursor : TTreeCursor);

===TrbSearchTree===================================================== A red-black binary search tree A red-black tree is a binary search tree with inbuilt balancing algorithms during Insert and Delete.

procedure btInsertPrim(var Cursor : TTreeCursor; aNode : PNode);

--------

function rbPromote(Cursor : TTreeCursor) : TTreeCursor;

--------

Properties

Events

Variables

rbDeletedNodeWasBlack : boolean;



Constructors


Functions


function Delete(Cursor : TTreeCursor) : TTreeCursor;

--------


procedure bsSwapData(OldCursor, NewCursor : TTreeCursor);

===TrbSearchTree===================================================== A red-black binary search tree A red-black tree is a binary search tree with inbuilt balancing algorithms during Insert and Delete. This ensures that the tree does not degenerate into a sorted linked list, maintaining its excellent search times. The tree is called red-black because certain data objects are labelled Black and the others Red such that (1) every Red data object (that is not at the root) has a Black parent, (2) each path from leaf to root has the same number of Black data objects, and (3) each leaf is Black. This set of rules ensures that the tree is (quite) balanced. References Sedgewick: Algorithms Wood: Data Structures, Algorithms, and Performance PS. I also apologise for the unpolitically correct terminology in this source code! Thank you, Bryan, for pointing it out, but it's too late now... =====================================================================


procedure btInsertPrim(var Cursor : TTreeCursor; aNode : PNode);

--------


function rbPromote(Cursor : TTreeCursor) : TTreeCursor;

--------


Properties


Events


Variables


rbDeletedNodeWasBlack : boolean;