log2trace-ui - v1.0.0-rc.9
    Preparing search index...

    Class SpanMask

    A set of spans of one SpanIndex, stored as a byte per table row (1 = member). Membership by row is a single array read, which is what a painter or the row projection needs; membership by id costs one map lookup.

    Instances never change: the with… methods return a new mask.

    Implements

    Index

    Constructors

    • Parameters

      • index: SpanIndex

        The index the rows belong to.

      • bits: Uint8Array

        One byte per row of index.table; the mask takes ownership.

      • Optionalsize: number

        Number of 1s in bits, when the caller already counted them.

      Returns SpanMask

    Properties

    bits: Uint8Array

    One byte per row, 1 for members. Owned by the mask: do not write to it.

    index: SpanIndex

    The index whose rows the bits refer to.

    size: number

    Number of members.

    Methods

    • Whether the span with id is a member.

      Parameters

      • id: string

      Returns boolean

    • Whether the span in table row row is a member.

      Parameters

      • row: number

      Returns boolean

    • The same mask with row row added or removed. Returns this when nothing changes.

      Parameters

      • row: number
      • member: boolean

      Returns SpanMask