Creates an empty set with room for the bits 0..nbits-1 before it grows. The default is 64, as
in Java.
Time: O(nbits).
the number of bits to make room for
Returns the number of set bits.
Time: O(capacity / 32).
Returns whether no bit is set.
Time: O(capacity / 32), where Java answers in O(1).
Returns the index of the highest set bit plus one, or 0 if no bit is set.
Time: O(capacity / 32), where Java keeps the number of words in use and answers in O(1).
A set of non-negative integers, one bit each, that grows as needed. It is the counterpart of
java.util.BitSet, with the part of it that the API of the library needs: the visited nodes of a FrontierTraverser, which a subclass may mark, and the selection of NodeMapping.forSubgraph. JavaScript has no bit set of its own.The bits are kept in 32-bit words, where Java keeps them in 64-bit words; the set grows when a bit beyond its capacity is set. Instances are mutable.
Memory: 1 bit per bit up to the highest set or the initial capacity, in words of 4 bytes.