Construct a new B+ tree.
The item comparison function for the tree.
Assign new items to the tree, replacing all current items.
Get the item at a particular index.
The index of the item of interest. Negative values are taken as an offset from the end of the tree.
The item at the specified index, or undefined
if
the index is out of range.
O(log32 n)
Delete an item which matches a particular key.
The key of interest.
A function which compares an item against the key.
The item removed from the tree, or undefined
if no
item matched the given key.
O(log32 n)
Get the item which matches a key.
A function which compares an item against the key.
The item which matches the given key, or undefined
if
the tree does not have a matching item.
O(log32 n)
Test whether the tree has an item which matches a key.
The key of interest.
A function which compares an item against the key.
true
if the tree has an item which matches the given
key, false
otherwise.
O(log32 n)
Get the index of an item which matches a key.
The key of interest.
A function which compares an item against the key.
The index of the item which matches the given key. A
negative value means that a matching item does not exist in
the tree, but if one did it would reside at -index - 1
.
O(log32 n)
Insert an item into the tree.
The item of interest.
If the given item matches an existing item in the tree,
the given item will replace it, and the existing item will be
returned. Otherwise, this method returns undefined
.
O(log32 n)
Create an iterator over the items in the tree.
A new iterator starting with the first item.
O(log32 n)
Remove an item at a particular index.
The index of the item to remove. Negative values are taken as an offset from the end of the tree.
The item removed from the tree, or undefined
if
the given index is out of range.
O(log32 n)
Create a reverse iterator over the items in the tree.
A new iterator starting with the last item.
O(log32 n)
Create a reverse iterator for a slice of items in the tree.
The index of the first item, inclusive. This
should be > stop
. Negative values are taken as an offset
from the end of the tree. The default is size - 1
.
The index of the last item, exclusive. This
should be < start
. Negative values are taken as an offset
from the end of the tree. The default is -size - 1
.
A new reverse iterator starting with the specified item.
O(log32 n)
Create an iterator for a slice of items in the tree.
The index of the first item, inclusive. This
should be < stop
. Negative values are taken as an offset
from the end of the tree. The default is 0
.
The index of the last item, exclusive. This
should be > start
. Negative values are taken as an offset
from the end of the tree. The default is size
.
A new iterator starting with the specified item.
O(log32 n)
Update the tree with multiple items.
Create a new B+ tree populated with the given items.
The items to add to the tree.
The item comparison function for the tree.
A new B+ tree populated with the given items.
O(n log32 n)
Generated using TypeDoc
A generic B+ tree. The namespace for the
BPlusTree
class statics.Notes
Most operations have
O(log32 n)
or better complexity.This class will be removed in @lumino/collections@^2.0.0
This namespace will be removed in @lumino/collections@^2.0.0