| Modifier and Type | Field and Description |
|---|---|
| protected static final int | |
| protected long[] | bits
The actual data bits |
| protected static final int | |
| protected static final int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(int el)
Implements org. |
| public void | addAll(IntSet set)
Implements org. |
| public void | |
| public void | |
| public IntSet | and(IntSet a)
Implements org. |
| public void | |
| private static long | |
| public void | |
| public void | |
| public Object | |
| public IntSet | |
| public IntSet | |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. Implements org. |
| public int | getSingleElement()
Implements org. |
| public void | |
| public boolean | |
| public int | lengthInLongWords()
return how much space is being used by the bits array not how many actually have member bits on. |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public int | |
| private int | |
| public static BitSet | |
| public static BitSet | |
| public static BitSet | |
| public static BitSet | |
| public IntSet | |
| public void | |
| public static BitSet | |
| public void | |
| private void | |
| public int | size()
Implements org. |
| public boolean | |
| public IntSet | |
| public void | |
| public int[] | |
| public List | |
| public long[] | |
| public String | toString()
Overrides java. Implements org. |
| public String | Returns: A commma-separated list of valuesImplements org. |
| public String | |
| public String | |
| public String | |
| public String | |
| private static int |
| BITS | back to summary |
|---|---|
| protected static final int BITS | |
| bits | back to summary |
|---|---|
| protected long[] bits The actual data bits | |
| LOG_BITS | back to summary |
|---|---|
| protected static final int LOG_BITS | |
| MOD_MASK | back to summary |
|---|---|
| protected static final int MOD_MASK | |
| BitSet | back to summary |
|---|---|
| public BitSet() Construct a bitset of size one word (64 bits) | |
| BitSet | back to summary |
|---|---|
| public BitSet(long[] bits_) Construction from a static array of longs | |
| BitSet | back to summary |
|---|---|
| public BitSet(int nbits) Construct a bitset given the size
| |
| add | back to summary |
|---|---|
| public void add(int el) Implements org. or this element into this set (grow as necessary to accommodate)
| |
| addAll | back to summary |
|---|---|
| public void addAll(IntSet set) Implements org. Doc from org. Add all elements from incoming set to this set. Can limit to set of its own type.
| |
| addAll | back to summary |
|---|---|
| public void addAll(int[] elements) | |
| addAll | back to summary |
|---|---|
| public void addAll(Iterable<Integer> elements) | |
| and | back to summary |
|---|---|
| public IntSet and(IntSet a) Implements org. Doc from org. Return the intersection of this set with the argument, creating a new set.
| |
| andInPlace | back to summary |
|---|---|
| public void andInPlace(BitSet a) | |
| bitMask | back to summary |
|---|---|
| private static long bitMask(int bitNumber) | |
| clear | back to summary |
|---|---|
| public void clear() | |
| clear | back to summary |
|---|---|
| public void clear(int el) | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by | |
| complement | back to summary |
|---|---|
| public IntSet complement() | |
| complement | back to summary |
|---|---|
| public IntSet complement(IntSet set) Implements org.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Implements org. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getSingleElement | back to summary |
|---|---|
| public int getSingleElement() Implements org. Get the first element you find and return it. Return Label.INVALID otherwise.
| |
| growToInclude | back to summary |
|---|---|
| public void growToInclude(int bit) Grows the set to a larger number of bits.
| |
| isNil | back to summary |
|---|---|
| public boolean isNil() Implements org.
| |
| lengthInLongWords | back to summary |
|---|---|
| public int lengthInLongWords() return how much space is being used by the bits array not how many actually have member bits on. | |
| member | back to summary |
|---|---|
| public boolean member(int el) Implements org.
| |
| notInPlace | back to summary |
|---|---|
| public void notInPlace() | |
| notInPlace | back to summary |
|---|---|
| public void notInPlace(int maxBit) complement bits in the range 0..maxBit. | |
| notInPlace | back to summary |
|---|---|
| public void notInPlace(int minBit, int maxBit) complement bits in the range minBit..maxBit. | |
| numBits | back to summary |
|---|---|
| public int numBits() | |
| numWordsToHold | back to summary |
|---|---|
| private int numWordsToHold(int el) | |
| of | back to summary |
|---|---|
| public static BitSet of(int el) | |
| of | back to summary |
|---|---|
| public static BitSet of(Collection<? extends Integer> elements) | |
| of | back to summary |
|---|---|
| public static BitSet of(IntSet set) | |
| of | back to summary |
|---|---|
| public static BitSet of(Map<? extends Integer, ?> elements) | |
| or | back to summary |
|---|---|
| public IntSet or(IntSet a) Implements org. return this | a in a new set
| |
| orInPlace | back to summary |
|---|---|
| public void orInPlace(BitSet a) | |
| range | back to summary |
|---|---|
| public static BitSet range(int a, int b) | |
| remove | back to summary |
|---|---|
| public void remove(int el) Implements org. Doc from org. remove this element from this set
| |
| setSize | back to summary |
|---|---|
| private void setSize(int nwords) Sets the size of a set.
| |
| size | back to summary |
|---|---|
| public int size() Implements org. Doc from org. Return the size of this set (not the underlying implementation's allocated memory size, for example).
| |
| subset | back to summary |
|---|---|
| public boolean subset(BitSet a) Is this contained within a? | |
| subtract | back to summary |
|---|---|
| public IntSet subtract(IntSet a) Implements org.
| |
| subtractInPlace | back to summary |
|---|---|
| public void subtractInPlace(BitSet a) Subtract the elements of 'a' from 'this' in-place. Basically, just turn off all bits of 'this' that are in 'a'. | |
| toArray | back to summary |
|---|---|
| public int[] toArray() | |
| toList | back to summary |
|---|---|
| public List Implements org.
| |
| toPackedArray | back to summary |
|---|---|
| public long[] toPackedArray() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements org. Doc from java. Returns a string representation of the object. | |
| toString | back to summary |
|---|---|
| public String toString(Grammar g) Implements org. Transform a bit set into a string by formatting each element as an integer separator The string to put in between elements | |
| toString | back to summary |
|---|---|
| public String toString(String separator, List<String> vocabulary) Create a string representation where instead of integer elements, the ith element of vocabulary is displayed instead. Vocabulary is a Vector of Strings. separator The string to put in between elements
| |
| toStringOfHalfWords | back to summary |
|---|---|
| public String toStringOfHalfWords() Dump a comma-separated list of the words making up the bit set. Split each 64 bit number into two more manageable 32 bit numbers. This generates a comma-separated list of C++-like unsigned long constants. | |
| toStringOfWords | back to summary |
|---|---|
| public String toStringOfWords() Dump a comma-separated list of the words making up the bit set. This generates a comma-separated list of Java-like long int constants. | |
| toStringWithRanges | back to summary |
|---|---|
| public String toStringWithRanges() | |
| wordNumber | back to summary |
|---|---|
| private static int wordNumber(int bit) | |