An index cursor that allows multiple index ranges from the same buffer to be xor'd together.

This is useful for aggregating changes to indices, because it can both flip off and flip on items.

Implements

Accessors

Methods

Accessors

  • get high(): number
  • Get the current high 27 bits, as a regular number with the lower 5 bits padded to zero.

    Returns number

    The high bits.

  • get low(): number
  • Get a set of up to 32 low bits, in one-hot format or'd together, so that each bit index represents a 5 bit bottom part corresponding to the top 27

    Returns number

    The high bits.

Methods

  • Add a range from the multi-set buffer to the cursor.

    Parameters

    • from: number

      The start of the range.

    • to: number

      The end of the range (not inclusive)

    Returns void

  • Free this back to the pool.

    Returns void

  • Step this cursor to the next high (and matching set of lows)

    Returns boolean

    True if this is not at the end of the sequence, false otherwise.

  • Allocate a MultiIndexSetCursorXor, re-using freed ones in the pool.

    Parameters

    • buffer: Uint32Array<ArrayBufferLike>

    Returns MultiIndexSetCursorXor

    The allocated cursor.