Exemple #1
0
        public void Promote(BTreeNodeElement <T> elementToPromote, BTreeNode <T> smallerNode, BTreeNode <T> largerNode)
        {
            if (Parent == null)
            {
                Parent = new BTreeNode <T>(order, tree);
                tree.RootIs(Parent);
            }

            elementToPromote.NextInterval.Container       = elementToPromote.PreviousInterval.Container = Parent;
            elementToPromote.PreviousInterval.NodePointer = smallerNode;
            elementToPromote.NextInterval.NodePointer     = largerNode;
            Parent.Insert(elementToPromote);
        }
Exemple #2
0
 public void RootIs(BTreeNode <T> node)
 {
     root = node;
 }
Exemple #3
0
 public BTree(int order)
 {
     root = new BTreeNode <T>(order, this);
 }
Exemple #4
0
 public BTreeNodeElementInterstice(BTreeNode <T> pointer, BTreeNodeElement <T> smaller, BTreeNodeElement <T> larger)
 {
     Smaller     = smaller;
     Larger      = larger;
     NodePointer = pointer;
 }