Import std.collections.bit_set
std.collections.bit_set
BitSet: a Set of Ints from 0 up, a bit each in an array of words, which grows to hold the largest. Adding, removing, and finding a value take the same time however many there are, and the Set algebra goes a word at a time.
std/collections/bit_set.fb
Types
BitSet
class
@DebugElements Public Class BitSet Implements Iterable<Int>, Cloneable, Defaultable, Hashable
A set of Ints that aren't negative, a bit each, for many small numbers in little space.
std/collections/bit_set.fb, line 9
-
How many values it holds.
-
Adds the
value, and tells whether it's new. A negativevaluepanics. -
Adds each of the
values, which are all read first. A negative value panics. -
Removes the
value, and tells whether it was there. -
Whether it holds
value. -
Takes every value out.
-
The smallest value, or Null when there's none.
-
The largest value, or Null when there's none.
-
A new BitSet of the values in either.
-
A new BitSet of the values in both.
-
A new BitSet of this one's values that
otherdoesn't have. -
A new BitSet of the values in one but not the
other. -
Adds each of
other's values. -
Removes each of
other's values. -
Keeps only the values
otherhas too. -
Whether each of its values is in
other. -
Whether it has each of
other's values. -
Whether the two have a value in common.
-
The values, smallest first, in a new array.
-
A new, empty BitSet.
-
A new BitSet with the same values.
-
Two BitSets are equal when they have the same values.
-
Its hash, the same for values that are equal.
Doc from
std.core.interfaces.Hashable.Hash. -
The values, smallest first. Adding or removing one while going over them panics.
BitSetIterator
struct
Public Struct BitSetIterator Implements Iterator<Int>
The values of a BitSet, smallest first, which For ... In goes over.
std/collections/bit_set.fb, line 240
-
The next value, or Null when there are no more.
Doc from
std.core.iterator.Iterator.Next.
Extends
BitSet
extend
Extend BitSet Implements Printable
No doc comment.
std/collections/bit_set.fb, line 265
-
Its text, as a string interpolation like "{value}" shows it.
Doc from
std.core.interfaces.Printable.ToString.
Report an issue with this page or with FutureBlitz on GitHub.