Class IntSetUtil
java.lang.Object
com.ibm.wala.util.intset.IntSetUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic IntSetstatic intbinarySearch(int[] data, int key, int low, int high) static IntSetCompute the asymmetric difference of two sets, a \ b.static IntSetdiff(IntSet A, IntSet B, MutableIntSetFactory<?> factory) Compute the asymmetric difference of two sets, a \ b.static MutableIntSetFactory<?> static MutableIntSetmake()static MutableIntSetmake(int[] initial) static IntSetstatic MutableIntSetmakeMutableCopy(IntSet set) This method constructs an appropriate mutable copy of set.static MutableIntSetremoveAll(MutableIntSet A, IntSet B) Subtract two sets, i.e.static voidsetDefaultIntSetFactory(MutableIntSetFactory<?> defaultIntSetFactory) static int[]
-
Field Details
-
INT_SET_FACTORY_CONFIG_PROPERTY_NAME
- See Also:
-
-
Method Details
-
make
-
make
-
make
-
makeMutableCopy
@NullUnmarked public static MutableIntSet makeMutableCopy(IntSet set) throws IllegalArgumentException, UnimplementedError This method constructs an appropriate mutable copy of set.- Returns:
- a new
MutableIntSetobject with the same value as set - Throws:
UnimplementedError- if we haven't supported the set type yet.IllegalArgumentException- if set == null
-
diff
-
diff
Compute the asymmetric difference of two sets, a \ b. -
removeAll
Subtract two sets, i.e. a = a \ b.- Throws:
IllegalArgumentException- if B == null
-
binarySearch
public static int binarySearch(int[] data, int key, int low, int high) throws IllegalArgumentException - Returns:
- index \in [low,high] s.t. data[index] = key, or -1 if not found
- Throws:
IllegalArgumentException
-
getDefaultIntSetFactory
- Returns:
- Returns the defaultIntSetFactory.
-
setDefaultIntSetFactory
- Parameters:
defaultIntSetFactory- The defaultIntSetFactory to set.
-
add
- Returns:
- a new sparse int set which adds j to s
- Throws:
IllegalArgumentException- if s == null
-
toArray
-