Skip to main content
Version: 3.x

Class: IndexSet

@cognite/reveal.IndexSet

Constructors

constructor

new IndexSet(values?)

Parameters

NameType
values?Iterable<number>

Defined in

packages/utilities/src/indexset/IndexSet.ts:13

new IndexSet(values?)

Parameters

NameType
values?NumericRange

Defined in

packages/utilities/src/indexset/IndexSet.ts:14

Properties

rootNode

Optional rootNode: IndexNode

Defined in

packages/utilities/src/indexset/IndexSet.ts:11

Accessors

count

get count(): number

Returns

number

Defined in

packages/utilities/src/indexset/IndexSet.ts:68

Methods

add

add(index): void

Parameters

NameType
indexnumber

Returns

void

Defined in

packages/utilities/src/indexset/IndexSet.ts:33


addRange

addRange(range): void

Parameters

NameType
rangeNumericRange

Returns

void

Defined in

packages/utilities/src/indexset/IndexSet.ts:39


clear

clear(): void

Returns

void

Defined in

packages/utilities/src/indexset/IndexSet.ts:211


clone

clone(): IndexSet

Returns

IndexSet

Defined in

packages/utilities/src/indexset/IndexSet.ts:215


contains

contains(index): boolean

Parameters

NameType
indexnumber

Returns

boolean

Defined in

packages/utilities/src/indexset/IndexSet.ts:60


differenceWith

differenceWith(otherSet): IndexSet

Parameters

NameType
otherSetIndexSet

Returns

IndexSet

Defined in

packages/utilities/src/indexset/IndexSet.ts:135


forEachRange

forEachRange(visitor): void

Parameters

NameType
visitor(range: NumericRange) => void

Returns

void

Defined in

packages/utilities/src/indexset/IndexSet.ts:27


hasIntersectionWith

hasIntersectionWith(otherSet): boolean

Parameters

NameType
otherSetIndexSet | Set<number> | Map<number, number>

Returns

boolean

Defined in

packages/utilities/src/indexset/IndexSet.ts:145


intersectWith

intersectWith(otherSet): IndexSet

Parameters

NameType
otherSetIndexSet

Returns

IndexSet

Defined in

packages/utilities/src/indexset/IndexSet.ts:171


invertedRanges

invertedRanges(): NumericRange[]

Returns

NumericRange[]

Defined in

packages/utilities/src/indexset/IndexSet.ts:105


remove

remove(index): void

Parameters

NameType
indexnumber

Returns

void

Defined in

packages/utilities/src/indexset/IndexSet.ts:47


removeRange

removeRange(range): void

Parameters

NameType
rangeNumericRange

Returns

void

Defined in

packages/utilities/src/indexset/IndexSet.ts:52


toIndexArray

toIndexArray(): number[]

Returns

number[]

Defined in

packages/utilities/src/indexset/IndexSet.ts:84


toPlainSet

toPlainSet(): Set<number>

Returns

Set<number>

Defined in

packages/utilities/src/indexset/IndexSet.ts:98


toRangeArray

toRangeArray(): NumericRange[]

Returns

NumericRange[]

Defined in

packages/utilities/src/indexset/IndexSet.ts:76


unionWith

unionWith(otherSet): IndexSet

Parameters

NameType
otherSetIndexSet

Returns

IndexSet

Defined in

packages/utilities/src/indexset/IndexSet.ts:123