|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.util.intset.SparseIntSet
com.ibm.wala.util.intset.MutableSparseIntSet
public class MutableSparseIntSet
A sparse ordered, mutable duplicate-free, fully-encapsulated set of integers. Instances are not canonical, except for EMPTY. This implementation will be inefficient if these sets get large. TODO: even for small sets, we probably want to work on this to reduce the allocation activity.
| Field Summary |
|---|
| Fields inherited from class com.ibm.wala.util.intset.SparseIntSet |
|---|
elements, size |
| Constructor Summary | |
|---|---|
protected |
MutableSparseIntSet()
|
|
MutableSparseIntSet(int initialCapacity)
Create an empty set with a non-zero capacity |
|
MutableSparseIntSet(int[] backingStore)
|
| Method Summary | ||
|---|---|---|
boolean |
add(int value)
Add an integer value to this set. |
|
boolean |
addAll(IntSet set)
Add all elements from another int set. |
|
boolean |
addAll(SparseIntSet that)
Add all elements from another int set. |
|
boolean |
addAllInIntersection(IntSet other,
IntSet filter)
|
|
void |
copySet(IntSet that)
Set the value of this to be the same as the value of set |
|
static MutableSparseIntSet |
diff(MutableSparseIntSet A,
MutableSparseIntSet B)
|
|
float |
getExpansionFactor()
|
|
int |
getInitialNonEmptySize()
|
|
void |
intersectWith(IntSet set)
Interset this with another set. |
|
void |
intersectWith(SparseIntSet set)
|
|
static MutableSparseIntSet |
make(IntSet set)
|
|
static MutableSparseIntSet |
makeEmpty()
|
|
boolean |
remove(int value)
Remove an integer from this set. |
|
void |
removeAll(BitVectorIntSet v)
|
|
void |
removeAll(MutableSparseIntSet set)
TODO optimize |
|
|
removeAll(T v)
|
|
| Methods inherited from class com.ibm.wala.util.intset.SparseIntSet |
|---|
add, contains, containsAny, containsAny, diff, diffInternal, elementAt, foreach, foreachExcluding, getIndex, intersection, intIterator, isEmpty, isSubset, max, pair, parseIntArray, sameValue, singleton, size, toIntArray, toString, union |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ibm.wala.util.intset.IntSet |
|---|
contains, containsAny, foreach, foreachExcluding, intersection, intIterator, isEmpty, isSubset, max, sameValue, size, union |
| Constructor Detail |
|---|
public MutableSparseIntSet(int[] backingStore)
public MutableSparseIntSet(int initialCapacity)
throws java.lang.IllegalArgumentException
initialCapacity -
java.lang.IllegalArgumentExceptionprotected MutableSparseIntSet()
| Method Detail |
|---|
public boolean remove(int value)
MutableIntSet
remove in interface MutableIntSetvalue - integer to remove
public int getInitialNonEmptySize()
public float getExpansionFactor()
public boolean add(int value)
MutableIntSet
add in interface MutableIntSetvalue -
public void copySet(IntSet that)
throws java.lang.IllegalArgumentException
MutableIntSet
copySet in interface MutableIntSetjava.lang.IllegalArgumentException - if that == nullpublic void intersectWith(IntSet set)
MutableIntSet
intersectWith in interface MutableIntSetpublic void intersectWith(SparseIntSet set)
public boolean addAll(IntSet set)
throws java.lang.IllegalArgumentException
addAll in interface MutableIntSetjava.lang.IllegalArgumentException - if set == nullpublic boolean addAll(SparseIntSet that)
that -
public void removeAll(BitVectorIntSet v)
v - public <T extends BitVectorBase<T>> void removeAll(T v)
public void removeAll(MutableSparseIntSet set)
set -
java.lang.IllegalArgumentException - if set is null
public boolean addAllInIntersection(IntSet other,
IntSet filter)
addAllInIntersection in interface MutableIntSet
public static MutableSparseIntSet diff(MutableSparseIntSet A,
MutableSparseIntSet B)
public static MutableSparseIntSet make(IntSet set)
public static MutableSparseIntSet makeEmpty()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||