Package qilin.core.sets
Class HybridPointsToSet
java.lang.Object
qilin.core.sets.PointsToSetInternal
qilin.core.sets.HybridPointsToSet
Hybrid implementation of points-to set, which uses an explicit array for small sets, and a bit
vector for large sets.
- Author:
- Ondrej Lhotak
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(int idx) Adds idx to this set, returns true if idx was not already in this set.boolean
addAll
(PointsToSetInternal other, PointsToSetInternal exclude) Adds contents of other into this set, returns true if this set changed.void
clear()
boolean
contains
(int idx) Returns true iff the set contains node idx.boolean
Calls v's visit method on all nodes in this set.static HybridPointsToSet
boolean
isEmpty()
Returns true if this set contains no run-time objects.iterator()
int
size()
Methods inherited from class qilin.core.sets.PointsToSetInternal
hasNonEmptyIntersection
-
Constructor Details
-
HybridPointsToSet
public HybridPointsToSet()
-
-
Method Details
-
getEmptySet
-
isEmpty
public boolean isEmpty()Returns true if this set contains no run-time objects.- Specified by:
isEmpty
in classPointsToSetInternal
-
clear
public void clear()- Specified by:
clear
in classPointsToSetInternal
-
addAll
Adds contents of other into this set, returns true if this set changed.- Specified by:
addAll
in classPointsToSetInternal
-
iterator
- Specified by:
iterator
in classPointsToSetInternal
-
size
public int size()- Specified by:
size
in classPointsToSetInternal
-
forall
Calls v's visit method on all nodes in this set.- Specified by:
forall
in classPointsToSetInternal
-
contains
public boolean contains(int idx) Returns true iff the set contains node idx.- Specified by:
contains
in classPointsToSetInternal
-
add
public boolean add(int idx) Adds idx to this set, returns true if idx was not already in this set.- Specified by:
add
in classPointsToSetInternal
-