Class: default ¶
Table of contents ¶
Constructors ¶
Properties ¶
Methods ¶
- all
- search
- collides
- load
- insert
- clear
- remove
- toBBox
- compareMinX
- compareMinY
- toJSON
- fromJSON
- _all
- _build
- _chooseSubtree
- _insert
- _split
- _splitRoot
- _chooseSplitIndex
- _chooseSplitAxis
- _allDistMargin
- _adjustParentBBoxes
- _condense
Constructors ¶
constructor ¶
• new default(maxEntries?
): default
Parameters ¶
Name | Type | Default value |
---|---|---|
maxEntries | number | 9 |
Returns ¶
Defined in ¶
Properties ¶
data ¶
• data: NodeItem
Defined in ¶
Methods ¶
all ¶
▸ all(): NodeItem
[]
Returns ¶
NodeItem
[]
Defined in ¶
search ¶
▸ search(bbox
, options?
): NodeItem
[]
Parameters ¶
Name | Type |
---|---|
bbox | BBoxLike |
options? | ICOptions |
Returns ¶
NodeItem
[]
Defined in ¶
collides ¶
▸ collides(bbox
, options?
): boolean
Parameters ¶
Name | Type |
---|---|
bbox | BBoxLike |
options? | ICOptions |
Returns ¶
boolean
Defined in ¶
load ¶
▸ load(data
): default
Parameters ¶
Name | Type |
---|---|
data | any [] |
Returns ¶
Defined in ¶
insert ¶
▸ insert(item?
): default
Parameters ¶
Name | Type |
---|---|
item? | NodeItem |
Returns ¶
Defined in ¶
clear ¶
▸ clear(): default
Returns ¶
Defined in ¶
remove ¶
▸ remove(item?
, equalsFn?
): default
Parameters ¶
Name | Type |
---|---|
item? | NodeItem |
equalsFn? | IEqualsFn |
Returns ¶
Defined in ¶
toBBox ¶
▸ toBBox(item
): BBoxLike
Parameters ¶
Name | Type |
---|---|
item | NodeItem |
Returns ¶
Defined in ¶
compareMinX ¶
▸ compareMinX(a
, b
): number
Parameters ¶
Name | Type |
---|---|
a | NodeItem |
b | NodeItem |
Returns ¶
number
Defined in ¶
compareMinY ¶
▸ compareMinY(a
, b
): number
Parameters ¶
Name | Type |
---|---|
a | NodeItem |
b | NodeItem |
Returns ¶
number
Defined in ¶
toJSON ¶
▸ toJSON(): NodeItem
Returns ¶
Defined in ¶
fromJSON ¶
▸ fromJSON(data
): default
Parameters ¶
Name | Type |
---|---|
data | NodeItem |
Returns ¶
Defined in ¶
_all ¶
▸ _all(node
, result?
): NodeItem
[]
Parameters ¶
Name | Type | Default value |
---|---|---|
node | NodeItem | undefined |
result | NodeItem [] | [] |
Returns ¶
NodeItem
[]
Defined in ¶
_build ¶
▸ _build(items
, left
, right
, h
): any
Parameters ¶
Name | Type |
---|---|
items | NodeItem [] |
left | number |
right | number |
h | number |
Returns ¶
any
Defined in ¶
_chooseSubtree ¶
▸ _chooseSubtree(bbox
, n
, level
, path
): NodeItem
Parameters ¶
Name | Type |
---|---|
bbox | BBoxLike |
n | NodeItem |
level | number |
path | NodeItem [] |
Returns ¶
Defined in ¶
_insert ¶
▸ _insert(item
, level
, isNode?
): void
Parameters ¶
Name | Type |
---|---|
item | NodeItem |
level | number |
isNode? | boolean |
Returns ¶
void
Defined in ¶
_split ¶
▸ _split(insertPath
, level
): void
Parameters ¶
Name | Type |
---|---|
insertPath | NodeItem [] |
level | number |
Returns ¶
void
Defined in ¶
_splitRoot ¶
▸ _splitRoot(node
, newNode
): void
Parameters ¶
Name | Type |
---|---|
node | NodeItem |
newNode | NodeItem |
Returns ¶
void
Defined in ¶
_chooseSplitIndex ¶
▸ _chooseSplitIndex(node
, m
, M
): any
Parameters ¶
Name | Type |
---|---|
node | NodeItem |
m | number |
M | number |
Returns ¶
any
Defined in ¶
_chooseSplitAxis ¶
▸ _chooseSplitAxis(node
, m
, M
): void
Parameters ¶
Name | Type |
---|---|
node | NodeItem |
m | number |
M | number |
Returns ¶
void
Defined in ¶
_allDistMargin ¶
▸ _allDistMargin(node
, m
, M
, compare
): number
Parameters ¶
Name | Type |
---|---|
node | NodeItem |
m | number |
M | number |
compare | ICompare |
Returns ¶
number
Defined in ¶
_adjustParentBBoxes ¶
▸ _adjustParentBBoxes(bbox
, path
, level
): void
Parameters ¶
Name | Type |
---|---|
bbox | BBoxLike |
path | NodeItem [] |
level | number |
Returns ¶
void
Defined in ¶
_condense ¶
▸ _condense(path
): void
Parameters ¶
Name | Type |
---|---|
path | NodeItem [] |
Returns ¶
void