TOC Toolkit API - v0.1.0
    Preparing search index...

    A set of the integers from 0 up to a fixed capacity, which is left out. The set keeps one bit for every possible member.

    has, add and delete take constant time. union, intersection, equals, key, size and a loop over the members take time linear in the capacity, at 32 members for each step. The memory is one bit for every possible member.

    Only #wordCount, #wordAt and #setWord know whether the words are one inline number or an array. The other members walk word indices with plain loops, because subset construction calls them in its inner loop, and building a list of the words took up to 7 times as long.

    Implements

    • Iterable<number>
    Index
    • Parameters

      • capacity: number

      Returns BitSet

    capacity: number

    The members are the integers from 0 up to this number, which is left out.

    • get size(): number

      The number of members.

      Returns number

    • Whether member is in the set. A value outside the capacity is in no set.

      Parameters

      • member: number

      Returns boolean

    • Puts member into the set.

      Parameters

      • member: number

      Returns void

    • Takes member out of the set.

      Parameters

      • member: number

      Returns void

    • Returns a new set with the members of this set and of other.

      Parameters

      Returns BitSet

    • Returns a new set with the members that this set and other share.

      Parameters

      Returns BitSet

    • Whether this set and other, which has the same capacity, hold the same members.

      Parameters

      Returns boolean

    • Returns a text that two sets share when they hold the same members, whatever their capacities are. The text can be the key of a map or of an interner.

      Returns string

    • Yields the members from the smallest to the largest.

      Returns IterableIterator<number>