Package soot.util
Class BitVector
- java.lang.Object
-
- soot.util.BitVector
-
- Direct Known Subclasses:
PointsToBitVector
public class BitVector extends Object
This is the Soot internal implementation of java.util.BitSet with Felix and Jerome's clever efficient iterator. It was re-implemented from scratch by Ondrej Lhotak to avoid licence issues. It was named BitVector rather than BitSet to avoid a name clash with the one in the standard Java library.- Author:
- Ondrej Lhotak
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidand(BitVector other)static BitVectorand(BitVector set1, BitVector set2)voidandNot(BitVector other)intcardinality()Count the number of ones in the bitvector.voidclear(int bit)Objectclone()voidcopyFrom(BitVector other)booleanequals(Object o)booleanget(int bit)inthashCode()booleanintersects(BitVector other)Returns true if the both the current and the specified bitvectors have at least one bit set in common.BitSetIteratoriterator()intlength()Returns index of highest-numbered one bit.voidor(BitVector other)static BitVectoror(BitVector set1, BitVector set2)booleanorAndAndNot(BitVector orset, BitVector andset, BitVector andnotset)Computes this = this OR ((orset AND andset ) AND (NOT andnotset)) Returns true iff this is modified.booleanset(int bit)intsize()Returns number of bits in the underlying array.StringtoString()voidxor(BitVector other)
-
-
-
Constructor Detail
-
BitVector
public BitVector()
-
BitVector
public BitVector(BitVector other)
Copy constructor
-
BitVector
public BitVector(int numBits)
-
-
Method Detail
-
and
public void and(BitVector other)
-
andNot
public void andNot(BitVector other)
-
clear
public void clear(int bit)
-
get
public boolean get(int bit)
-
length
public int length()
Returns index of highest-numbered one bit.
-
copyFrom
public void copyFrom(BitVector other)
-
or
public void or(BitVector other)
-
cardinality
public int cardinality()
Count the number of ones in the bitvector.
-
intersects
public boolean intersects(BitVector other)
Returns true if the both the current and the specified bitvectors have at least one bit set in common.
-
xor
public void xor(BitVector other)
-
set
public boolean set(int bit)
-
size
public int size()
Returns number of bits in the underlying array.
-
orAndAndNot
public boolean orAndAndNot(BitVector orset, BitVector andset, BitVector andnotset)
Computes this = this OR ((orset AND andset ) AND (NOT andnotset)) Returns true iff this is modified.
-
iterator
public BitSetIterator iterator()
-
-