Options
All
  • Public
  • Public/Protected
  • All
Menu

Class STree<V, I>

Type parameters

  • V

  • I

Hierarchy

  • STreeContext<V, I>
    • STree

Index

Constructors

constructor

  • new STree(root?: STreePage<V, I>): STree

Properties

pageSplitSize

pageSplitSize: number

root

root: STreePage<V, I>

Accessors

length

  • get length(): number

Methods

clear

  • clear(): void

clone

compare

  • compare(x: I, y: I): number

Protected copy

  • copy(root: STreePage<V, I>): STree<V, I>

drop

  • drop(lower: number): this

entries

forEach

  • forEach<T, S>(callback: function, thisArg?: S): T | undefined
  • Type parameters

    • T

    • S

    Parameters

    • callback: function
        • (this: S, value: V, index: number, tree: STree<V, I>, id: I): T | void
        • Parameters

          • this: S
          • value: V
          • index: number
          • tree: STree<V, I>
          • id: I

          Returns T | void

    • Optional thisArg: S

    Returns T | undefined

get

  • get(index: number, id?: I): V | undefined

getEntry

  • getEntry(index: number, id?: I): [I, V] | undefined

identify

  • identify(value: V): I

insert

  • insert(index: number, newValue: V, id?: I): this

isEmpty

  • isEmpty(): boolean

keys

lookup

  • lookup(id: I, start?: number): number

move

  • move(fromIndex: number, toIndex: number, id?: I): this

pageShouldMerge

  • pageShouldMerge(page: STreePage<V, I>): boolean

pageShouldSplit

  • pageShouldSplit(page: STreePage<V, I>): boolean

pop

  • pop(): V | undefined

push

  • push(...newValues: V[]): number

remove

  • remove(index: number, id?: I): this

reverseEntries

  • reverseEntries(): Cursor<[I, V]>

reverseKeys

reverseValues

set

  • set(index: number, newValue: V, id?: I): this

shift

  • shift(): V | undefined

splice

  • splice(start: number, deleteCount?: undefined | number, ...newValues: V[]): V[]

take

  • take(upper: number): this

unshift

  • unshift(...newValues: V[]): number

values