Package qilin.util
Class BitVector
java.lang.Object
qilin.util.BitVector
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
static BitVector
void
int
Count the number of ones in the bitvector.void
clear
(int bit) clone()
void
boolean
boolean
get
(int bit) int
hashCode()
boolean
intersects
(BitVector other) Returns true if the both the current and the specified bitvectors have at least one bit set in common.iterator()
int
length()
Returns index of highest-numbered one bit.void
static BitVector
boolean
orAndAndNot
(BitVector orset, BitVector andset, BitVector andnotset) Computes this = this OR ((orset AND andset ) AND (NOT andnotset)) Returns true iff this is modified.boolean
set
(int bit) int
size()
Returns number of bits in the underlying array.toString()
void
-
Constructor Details
-
BitVector
public BitVector() -
BitVector
Copy constructor -
BitVector
public BitVector(int numBits)
-
-
Method Details
-
and
-
andNot
-
clear
public void clear(int bit) -
clone
-
equals
-
get
public boolean get(int bit) -
hashCode
public int hashCode() -
length
public int length()Returns index of highest-numbered one bit. -
copyFrom
-
or
-
cardinality
public int cardinality()Count the number of ones in the bitvector. -
intersects
Returns true if the both the current and the specified bitvectors have at least one bit set in common. -
xor
-
set
public boolean set(int bit) -
size
public int size()Returns number of bits in the underlying array. -
toString
-
orAndAndNot
Computes this = this OR ((orset AND andset ) AND (NOT andnotset)) Returns true iff this is modified. -
and
-
or
-
iterator
-