EdgarACarneiro / I2Bplus-tree

:evergreen_tree: Improved Interval B+ tree implementation, in TS :evergreen_tree: https://edgaracarneiro.github.io/I2Bplus-tree/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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);