@univerjscoreclassesRtree

@univerjs/core v0.5.0-beta.1Docs


Class: RTree

Constructors

new RTree()

new RTree(_enableOneCellCache): RTree

Parameters

ParameterTypeDefault value
_enableOneCellCachebooleanfalse

Returns

RTree

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:52

Methods

bulkInsert()

bulkInsert(items): void

Parameters

ParameterType
itemsIRTreeItem[]

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:240


bulkRemove()

bulkRemove(searchList): void

Parameters

ParameterType
searchListIRTreeItem[]

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:329


bulkSearch()

bulkSearch(searchList, exceptTreeIds?): Set<StringOrNumber>

Parameters

ParameterType
searchListIUnitRange[]
exceptTreeIds?Set<number>

Returns

Set<StringOrNumber>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:273


clear()

clear(): void

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:335


closeKdTree()

closeKdTree(): void

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:194


dispose()

dispose(): void

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:56


fromJSON()

fromJSON(data): void

Parameters

ParameterType
dataIRTreeData

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:352


getTree()

getTree(unitId, subUnitId): RBush<IRBushItem>

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

RBush<IRBushItem>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:60


insert()

insert(item): void

Parameters

ParameterType
itemIRTreeItem

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:202


openKdTree()

openKdTree(): void

Open the kd-tree search state. The kd-tree is used to search for data in a single cell.

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:174


remove()

remove(search): void

Parameters

ParameterType
searchIRTreeItem

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:314


removeById()

removeById(unitId, subUnitId?): void

Parameters

ParameterType
unitIdstring
subUnitId?string

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:286


searchGenerator()

searchGenerator(search): IterableIterator<StringOrNumber, any, any>

Parameters

ParameterType
searchIUnitRange

Returns

IterableIterator<StringOrNumber, any, any>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:246


toJSON()

toJSON(): IRTreeData

Returns

IRTreeData

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/r-tree.ts:340