Evaluate if Split can be a Superclass method
EdgarACarneiro opened this issue · comments
Also this part on splits is extremely similar:
// Divide keys, maximums and children by this node and its sibling
let sibling: IBplusLeafNode = new IBplusLeafNode(
this.order,
this.parent,
this.keys.splice(divIdx, sibSize),
this.maximums.splice(divIdx, sibSize),
this.children.splice(divIdx, sibSize)
);
sibling.setRightSibling(this.rightSibling);
sibling.setLeftSibling(this);
this.setRightSibling(sibling);
this.parent.updateWithNewNode(this, sibling);