Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ReducedMap<K, V, U>

An OrderedMap that memoizes partial combinations of sub-elements to support efficient, incremental reduction of continuously mutating datasets.

Type parameters

  • K

  • V

  • U

Hierarchy

Implemented by

Index

Properties

size

size: number

Methods

clear

  • clear(): void

delete

  • delete(key: K): boolean

entries

firstEntry

  • firstEntry(): [K, V] | undefined

firstKey

  • firstKey(): K | undefined

firstValue

  • firstValue(): V | undefined

forEach

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

    • T

    • S

    Parameters

    • callback: function
        • (this: S, key: K, value: V): T | void
        • Parameters

          • this: S
          • key: K
          • value: V

          Returns T | void

    • Optional thisArg: S

    Returns T | undefined

get

  • get(key: K): V | undefined

getEntry

  • getEntry(index: number): [K, V] | undefined

has

  • has(key: K): boolean

isEmpty

  • isEmpty(): boolean

keys

lastEntry

  • lastEntry(): [K, V] | undefined

lastKey

  • lastKey(): K | undefined

lastValue

  • lastValue(): V | undefined

nextEntry

  • nextEntry(key: K): [K, V] | undefined

nextKey

  • nextKey(key: K): K | undefined

nextValue

  • nextValue(key: K): V | undefined

previousEntry

  • previousEntry(key: K): [K, V] | undefined

previousKey

  • previousKey(key: K): K | undefined

previousValue

  • previousValue(key: K): V | undefined

reduced

  • reduced(identity: U, accumulator: function, combiner: function): U
  • Returns the reduction of this ReducedMap, combining all contained elements with the given accumulator and combiner functions, recomputing only what has changed since the last invocation of reduced. Stores partial computations to accelerate repeated reduction of continuously mutating datasets.

    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

set

  • set(key: K, newValue: V): this

values