Ejemplo n.º 1
0
 public RBTreeNode(T root, object rightChild, RBTreeNode <T> right)
 {
     this.root  = root;
     RightChild = rightChild;
     this.right = right;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// corrects rule violations from deletion
 /// </summary>
 /// <param name="current"></param>
 private void FixDelete(RBTreeNode <T> current)
 {
 }
Ejemplo n.º 3
0
 /// <summary>
 /// moves pointers instead of recreating tree
 /// link to new nodes "parent" property
 /// calls FixInsert method
 /// </summary>
 /// <param name="newNode"></param>
 private void Insert(RBTreeNode <T> newNode)
 {
 }
Ejemplo n.º 4
0
 /// <summary>
 /// replaces node a with b
 /// </summary>
 /// <param name="a"></param>
 /// <param name="b"></param>
 private void Replace(RBTreeNode <T> a, RBTreeNode <T> b)
 {
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Builds the result of performing a single rotate right on the binary tree
        /// described by the given root, left child, and right child.
        /// </summary>
        /// <param name="root">The data stored in the root of the original tree.</param>
        /// <param name="left">The left child of the root of the original tree.</param>
        /// <param name="right">The right child of the root of the original tree.</param>
        /// <returns>The result of performing a single rotate right on the tree described
        /// by the parameters.</returns>
        private static RBTreeNode <T> SingleRotateRight(T root, RBTreeNode <T> left, RBTreeNode <T> right)
        {
            RBTreeNode <T> newRight = new RBTreeNode <T>(root, left.RightChild, right);

            return(new RBTreeNode <T>(left.Data, left.LeftChild, newRight));
        }