Exemplo n.º 1
0
 private void InsertAndSplit(RTreeNode node, RTreeNode value)
 {
     if (node.KeyCount < maxKeysPerNode)
     {
         node.Add(value);
         ExpandAncestors(node);
     }
     else
     {
         List <RTreeNode> e = new List <RTreeNode>(new RTreeNode[] { value });
         e.AddRange(node.Children);
     }
 }
Exemplo n.º 2
0
 private void InsertToLeaf(RTreeNode node)
 {
     if (Root == null)
     {
         Root = new RTreeNode(maxKeysPerNode, null);
         Root.Add(node);
     }
     else
     {
         RTreeNode leaf = FindInsertionLeaf(Root, node);
         InsertAndSplit(leaf, node);
     }
 }