Search
Preparing search index...
The search index is not available
swimOS
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
Globals
@swim/collections
BTree
Class BTree<K, V, U>
Type parameters
K
V
U
Hierarchy
BTreeContext
<
K
,
V
>
BTree
Implements
ReducedMap
<
K
,
V
,
U
>
Index
Constructors
constructor
Properties
page
Split
Size
root
Accessors
size
Methods
clear
cleared
clone
compare
copy
delete
drop
entries
first
Entry
first
Key
first
Value
for
Each
get
get
Entry
has
is
Empty
keys
last
Entry
last
Key
last
Value
next
Entry
next
Key
next
Value
page
Should
Merge
page
Should
Split
previous
Entry
previous
Key
previous
Value
reduced
removed
reverse
Entries
reverse
Keys
reverse
Values
set
take
updated
values
Constructors
constructor
new BTree
(
root
?:
BTreePage
<
K
,
V
,
U
>
)
:
BTree
Parameters
Default value
root:
BTreePage
<
K
,
V
,
U
>
= BTree.Page.empty()
Returns
BTree
Properties
page
Split
Size
page
Split
Size
:
number
root
root
:
BTreePage
<
K
,
V
,
U
>
Accessors
size
get
size
(
)
:
number
Returns
number
Methods
clear
clear
(
)
:
void
Returns
void
cleared
cleared
(
)
:
BTree
<
K
,
V
>
Returns
BTree
<
K
,
V
>
clone
clone
(
)
:
BTree
<
K
,
V
>
Returns
BTree
<
K
,
V
>
compare
compare
(
x
:
K
, y
:
K
)
:
number
Parameters
x:
K
y:
K
Returns
number
Protected
copy
copy
(
root
:
BTreePage
<
K
,
V
,
U
>
)
:
BTree
<
K
,
V
,
U
>
Parameters
root:
BTreePage
<
K
,
V
,
U
>
Returns
BTree
<
K
,
V
,
U
>
delete
delete
(
key
:
K
)
:
boolean
Parameters
key:
K
Returns
boolean
drop
drop
(
lower
:
number
)
:
this
Parameters
lower:
number
Returns
this
entries
entries
(
)
:
Cursor
<
[
K
,
V
]
>
Returns
Cursor
<
[
K
,
V
]
>
first
Entry
first
Entry
(
)
:
[
K
,
V
]
|
undefined
Returns
[
K
,
V
]
|
undefined
first
Key
first
Key
(
)
:
K
|
undefined
Returns
K
|
undefined
first
Value
first
Value
(
)
:
V
|
undefined
Returns
V
|
undefined
for
Each
for
Each<T, S>
(
callback
:
function
, thisArg
?:
S
)
:
T
|
undefined
Type parameters
T
S
Parameters
callback:
function
(
this
:
S
, key
:
K
, value
:
V
, tree
:
BTree
<
K
,
V
>
)
:
T
|
void
Parameters
this:
S
key:
K
value:
V
tree:
BTree
<
K
,
V
>
Returns
T
|
void
Optional
thisArg:
S
Returns
T
|
undefined
get
get
(
key
:
K
)
:
V
|
undefined
Parameters
key:
K
Returns
V
|
undefined
get
Entry
get
Entry
(
index
:
number
)
:
[
K
,
V
]
|
undefined
Parameters
index:
number
Returns
[
K
,
V
]
|
undefined
has
has
(
key
:
K
)
:
boolean
Parameters
key:
K
Returns
boolean
is
Empty
is
Empty
(
)
:
boolean
Returns
boolean
keys
keys
(
)
:
Cursor
<
K
>
Returns
Cursor
<
K
>
last
Entry
last
Entry
(
)
:
[
K
,
V
]
|
undefined
Returns
[
K
,
V
]
|
undefined
last
Key
last
Key
(
)
:
K
|
undefined
Returns
K
|
undefined
last
Value
last
Value
(
)
:
V
|
undefined
Returns
V
|
undefined
next
Entry
next
Entry
(
key
:
K
)
:
[
K
,
V
]
|
undefined
Parameters
key:
K
Returns
[
K
,
V
]
|
undefined
next
Key
next
Key
(
key
:
K
)
:
K
|
undefined
Parameters
key:
K
Returns
K
|
undefined
next
Value
next
Value
(
key
:
K
)
:
V
|
undefined
Parameters
key:
K
Returns
V
|
undefined
page
Should
Merge
page
Should
Merge
(
page
:
BTreePage
<
K
,
V
,
unknown
>
)
:
boolean
Parameters
page:
BTreePage
<
K
,
V
,
unknown
>
Returns
boolean
page
Should
Split
page
Should
Split
(
page
:
BTreePage
<
K
,
V
,
unknown
>
)
:
boolean
Parameters
page:
BTreePage
<
K
,
V
,
unknown
>
Returns
boolean
previous
Entry
previous
Entry
(
key
:
K
)
:
[
K
,
V
]
|
undefined
Parameters
key:
K
Returns
[
K
,
V
]
|
undefined
previous
Key
previous
Key
(
key
:
K
)
:
K
|
undefined
Parameters
key:
K
Returns
K
|
undefined
previous
Value
previous
Value
(
key
:
K
)
:
V
|
undefined
Parameters
key:
K
Returns
V
|
undefined
reduced
reduced
(
identity
:
U
, accumulator
:
function
, combiner
:
function
)
:
U
Parameters
identity:
U
accumulator:
function
(
result
:
U
, element
:
V
)
:
U
Parameters
result:
U
element:
V
Returns
U
combiner:
function
(
result
:
U
, result2
:
U
)
:
U
Parameters
result:
U
result2:
U
Returns
U
Returns
U
removed
removed
(
key
:
K
)
:
BTree
<
K
,
V
>
Parameters
key:
K
Returns
BTree
<
K
,
V
>
reverse
Entries
reverse
Entries
(
)
:
Cursor
<
[
K
,
V
]
>
Returns
Cursor
<
[
K
,
V
]
>
reverse
Keys
reverse
Keys
(
)
:
Cursor
<
K
>
Returns
Cursor
<
K
>
reverse
Values
reverse
Values
(
)
:
Cursor
<
V
>
Returns
Cursor
<
V
>
set
set
(
key
:
K
, newValue
:
V
)
:
this
Parameters
key:
K
newValue:
V
Returns
this
take
take
(
upper
:
number
)
:
this
Parameters
upper:
number
Returns
this
updated
updated
(
key
:
K
, newValue
:
V
)
:
BTree
<
K
,
V
>
Parameters
key:
K
newValue:
V
Returns
BTree
<
K
,
V
>
values
values
(
)
:
Cursor
<
V
>
Returns
Cursor
<
V
>
Globals
@swim/core
@swim/codec
@swim/collections
@swim/dataflow
@swim/math
@swim/recon
@swim/streamlet
@swim/structure
@swim/time
@swim/uri
@swim/util
@swim/mesh
@swim/ui
@swim/ux
@swim/web
BTree
constructor
page
Split
Size
root
size
clear
cleared
clone
compare
copy
delete
drop
entries
first
Entry
first
Key
first
Value
for
Each
get
get
Entry
has
is
Empty
keys
last
Entry
last
Key
last
Value
next
Entry
next
Key
next
Value
page
Should
Merge
page
Should
Split
previous
Entry
previous
Key
previous
Value
reduced
removed
reverse
Entries
reverse
Keys
reverse
Values
set
take
updated
values
BTree
Node
Cursor
STree