SPeCS Packages Documentation
    Preparing search index...

    Counts occurrences of tuples.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    accs: { [key: string]: Accumulator } = {}
    seenKeys: Set<string> = ...
    value: number = 0

    Methods

    • Adds the tuple to the accumulator. Each time a tuple is added, the corresponding value increments by 1.

      Alternatively, can also receive an array with the chain of values

      Parameters

      • ...args: any[]

      Returns number

      the previous count of the added element

    • Adds the value associated to the given tuple. If no value is defined for the given tuple, returns 0.

      Alternatively, can also receive an array with the chain of values

      Parameters

      • ...args: any

      Returns number