splitNode method
- @protected
- RTreeNode<
T> node, - List<
RTreeEntry< group1,T> > - List<
RTreeEntry< group2T> >
Splits a given node into two nodes. The original node will have the entries specified in group1, and the newly-created split node will have the entries specified in group2. Both the original and split node will have their children nodes adjusted so they have the correct parent.
Implementation
@protected
RTreeNode<T> splitNode(RTreeNode<T> node, List<RTreeEntry<T>> group1,
List<RTreeEntry<T>> group2) {
node.entries = group1;
final splitNode = RTreeNode<T>(this,
isLeaf: node.isLeaf, parent: node.parent, entries: group2);
node.fixChildren();
splitNode.fixChildren();
return splitNode;
}