coins.ssa
Class BitVector

java.lang.Object
  extended bycoins.ssa.BitVector

public class BitVector
extends java.lang.Object

Bit vector for SSA optimization. Original code is "coins.flow.BitVector.java".


Constructor Summary
(package private) BitVector(int elementsNum)
          Constructor
 
Method Summary
(package private)  int getBit(int pInx)
          Return specified bit.
(package private)  int getBitLength()
          Return the bit length of the current bit vector.
(package private)  long[] getVectorWord()
          Return the bits.
(package private)  int getWordLength()
          Return the word length of the current bit vector.
(package private)  boolean isEmpty()
          isEmpty:

If all bits in current bit vector are unset, it mean "Empty".
(package private)  void resetBit(int pInx)
          Reset specified bit.
(package private)  void setBit(int pInx)
          Set specified bit.
(package private)  void vectorAnd(BitVector pOperand2, BitVector pResult)
          Logical AND for bit vector.
(package private)  void vectorCopy(BitVector pResult)
          Copy the current bit vector to another bit vector.
(package private)  boolean vectorEqual(BitVector pOperand2)
          Compare two bit vectors.
(package private)  void vectorNot(BitVector pResult)
          Logical NOT for bit vector.
(package private)  void vectorOr(BitVector pOperand2, BitVector pResult)
          Logical OR for bit vector.
(package private)  void vectorReset()
          Reset all bits in current bit vector.
(package private)  void vectorSub(BitVector pOperand2, BitVector pResult)
          SUB for bit vector.
(package private)  void vectorXor(BitVector pOperand2, BitVector pResult)
          Logical XOR for bit vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitVector

BitVector(int elementsNum)
Constructor

Parameters:
elementsNum - number of elements
Method Detail

setBit

void setBit(int pInx)
Set specified bit.

Parameters:
pInx - bit index number

resetBit

void resetBit(int pInx)
Reset specified bit.

Parameters:
pInx - bit index number

getBit

int getBit(int pInx)
Return specified bit.

Parameters:
pInx - bit index number
Returns:
The bit specified by the parameter.

vectorAnd

void vectorAnd(BitVector pOperand2,
               BitVector pResult)
Logical AND for bit vector.

Parameters:
pOperand2 - operand bit vector.
pResult - bit vector which is stored the result.

vectorOr

void vectorOr(BitVector pOperand2,
              BitVector pResult)
Logical OR for bit vector.

Parameters:
pOperand2 - operand bit vector.
pResult - bit vector which is stored the result.

vectorXor

void vectorXor(BitVector pOperand2,
               BitVector pResult)
Logical XOR for bit vector.

Parameters:
pOperand2 - operand bit vector.
pResult - bit vector which is stored the result.

vectorNot

void vectorNot(BitVector pResult)
Logical NOT for bit vector.

Parameters:
pResult - bit vector which is stored the result.

vectorSub

void vectorSub(BitVector pOperand2,
               BitVector pResult)
SUB for bit vector.

Parameters:
pOperand2 - operand bit vector.
pResult - bit vector which is stored the result.

vectorCopy

void vectorCopy(BitVector pResult)
Copy the current bit vector to another bit vector.

Parameters:
pResult - bit vector which is stored the result.

vectorEqual

boolean vectorEqual(BitVector pOperand2)
Compare two bit vectors.

Parameters:
pOperand2 - operand bit vector.
Returns:
If two bit vectors are equal, return "true". otherwise "false".

vectorReset

void vectorReset()
Reset all bits in current bit vector.


isEmpty

boolean isEmpty()
isEmpty:

If all bits in current bit vector are unset, it mean "Empty".

Returns:
If current bit vector is "Empty", return "true". otherwise "false".

getBitLength

int getBitLength()
Return the bit length of the current bit vector.

Returns:
Bit length of current bit vector.

getWordLength

int getWordLength()
Return the word length of the current bit vector. Word length is depend on machines.

Returns:
Bit length of current bit vector.

getVectorWord

long[] getVectorWord()
Return the bits.

Returns:
Array of long