Class MultiIndexSet<IndexType>

A set of indices each associated with a number identifier.

Type Parameters

  • IndexType extends number

Constructors

Methods

Constructors

  • Construct this with a prefix sum table and matching elements table.

    Type Parameters

    • IndexType extends number

    Parameters

    • prefixSumTable_: Uint32Array

      A prefix sum array where each item is its summed index, with an extra element at the end with the entire count.

    • elements_: Uint32Array

      The elements in the index, matching the prefix sum indices * 2, where there's 2 elements in the array for each item, packed (first has the bottom 5 bits masked out, and is the top bits, the second is a bit field representing the elements for the top bit range, in a unioned-one-hot representation).

    Returns MultiIndexSet<IndexType>

Methods

  • Does the set have a particular index for a particular type.

    Parameters

    • indexType: IndexType

      The index type to check for.

    • denseIndex: number

      The dense index in the set to check.

    Returns boolean

    True if it has the type.