Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BitArray_Legacy

Bit array

Based heavily on https://github.com/lemire/FastBitSet.js which is licensed under the Apache License, Version 2.0.

Hierarchy

  • BitArray_Legacy

Index

Constructors

constructor

  • new BitArray_Legacy(length: number, setAll?: undefined | false | true): BitArray_Legacy

Properties

Private _words

_words: Uint32Array

length

length: number

Accessors

estimatedSizeInBytes

  • get estimatedSizeInBytes(): number

raw

  • get raw(): Uint32Array

Methods

_assignRange

  • _assignRange(start: number, end: number, value: boolean): undefined | this

_isRangeValue

  • _isRangeValue(start: number, end: number, value: boolean): undefined | false | true

clear

  • clear(index: number): void

clearAll

  • clearAll(): undefined | this

clearBits

  • clearBits(...indices: number[]): this

clearRange

  • clearRange(start: number, end: number): undefined | this
  • Clear bits of the given range

    Parameters

    • start: number

      start index

    • end: number

      end index

    Returns undefined | this

    this object

clone

  • clone(): any

difference

flip

  • flip(index: number): void

flipAll

  • flipAll(): this

forEach

  • forEach(callback: (index: number, i: number) => any): void
  • Iterate over all set bits in the array

    Parameters

    • callback: (index: number, i: number) => any

      the callback

        • (index: number, i: number): any
        • Parameters

          • index: number
          • i: number

          Returns any

    Returns void

get

  • get(index: number): boolean

getIntersectionSize

getSize

  • getSize(): number

intersection

intersects

isAllClear

  • isAllClear(): undefined | false | true

isAllSet

  • isAllSet(): undefined | false | true

isClear

  • isClear(...indices: number[]): boolean

isEqualTo

isRangeClear

  • isRangeClear(start: number, end: number): undefined | false | true
  • Test if bits in given range are clear

    Parameters

    • start: number

      start index

    • end: number

      end index

    Returns undefined | false | true

    this object

isRangeSet

  • isRangeSet(start: number, end: number): undefined | false | true
  • Test if bits in given range are set

    Parameters

    • start: number

      start index

    • end: number

      end index

    Returns undefined | false | true

    this object

isSet

  • isSet(...indices: number[]): boolean

makeIntersection

set

  • set(index: number): void

setAll

  • setAll(): undefined | this

setBits

  • setBits(...indices: number[]): this

setRange

  • setRange(start: number, end: number): undefined | this
  • Set bits of the given range

    Parameters

    • start: number

      start index

    • end: number

      end index

    Returns undefined | this

    this object

toArray

  • toArray(): any[]

toFiltString

  • toFiltString(): string

toString

  • toString(): string

union

Generated using TypeDoc