|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.flow.BitVectorImpl
BitVectorImpl class
| Field Summary | |
protected int |
fBitLength
|
protected int |
fLongWordLength
|
protected int |
fShiftMax
|
protected long[] |
fVectorWord
|
| Constructor Summary | |
protected |
BitVectorImpl()
|
protected |
BitVectorImpl(int pLongWordCount)
|
| Method Summary | |
BitVectorIterator |
bitVectorIterator(SubpFlow pSubpFlow)
Returns the BitVectorIterator object backed by this BitVector |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object pObj)
Same as vectorEqual if the specified argument is an instance of BitVector, otherwise returns false. |
int |
getBit(int pInx)
getBit Get pIndex-th bit of this bit vector. |
int |
getBitLength()
Returns the length of this BitVector, not counting the 0-th bit, which is not used. |
long[] |
getVectorWord()
Returns the array of long, which is where the actual data for this BitVector is stored. |
int |
getWordLength()
Returns the # of long words this BitVector uses to store its data. |
int |
hashCode()
|
boolean |
isSet(int pInx)
Same as getBit(pInx) == 1. |
boolean |
isZero()
Are all the bits zero? |
void |
resetBit(int pInx)
resetBit Reset pIndex-th bit of this bit vector to 0. |
void |
setBit(int pInx)
setBit Set pIndex-th bit of this bit vector to 1. |
java.lang.String |
toString()
toString Get the sequence of indexes corresponding to the position having 1. |
java.lang.String |
toStringDescriptive()
Returns a possibly more descriptive string representation than toString() of this BitVector. |
void |
vectorAnd(BitVector pOperand2,
BitVector pResult)
vectorAnd; Make a bit vector and set its value by executing bit-wise-and operation on this and pOperand2. |
void |
vectorCopy(BitVector pResult)
vectorCopy; Make a bit vector and set its value same to that of pOperand. |
boolean |
vectorEqual(BitVector pOperand2)
vectorEqual; See if this and pOperand2 have the same value or not. |
void |
vectorNot(BitVector pResult)
vectorNot; Make a bit vector and set its value by executing bit-wise-not operation on pOperand. |
void |
vectorOr(BitVector pOperand2,
BitVector pResult)
vectorOr; Make a bit vector and set its value by executing bit-wise-or operation on this and pOperand2. |
void |
vectorReset()
vectorReset; Reset all bits of this vector to 0. |
void |
vectorSub(BitVector pOperand2,
BitVector pResult)
vectorSub; Make a bit vector and set its value by executing bit-wise-sub operation on this and pOperand2. |
void |
vectorXor(BitVector pOperand2,
BitVector pResult)
vectorXor; Make a bit vector and set its value by executing bit-wise exclusive-or operation on this and pOperand2. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected int fLongWordLength
protected int fBitLength
protected int fShiftMax
protected long[] fVectorWord
| Constructor Detail |
protected BitVectorImpl()
protected BitVectorImpl(int pLongWordCount)
| Method Detail |
public void setBit(int pInx)
BitVector
setBit in interface BitVectorpublic void resetBit(int pInx)
BitVector
resetBit in interface BitVectorpublic int getBit(int pInx)
BitVector
getBit in interface BitVectorpublic boolean isSet(int pInx)
BitVectorgetBit(pInx) == 1.
isSet in interface BitVectorpublic boolean isZero()
BitVector
isZero in interface BitVectorpublic int getBitLength()
BitVectorBitVector, not counting the 0-th bit, which is not used.
getBitLength in interface BitVectorpublic int getWordLength()
BitVectorBitVector uses to store its data.
getWordLength in interface BitVectorpublic long[] getVectorWord()
BitVectorlong, which is where the actual data for this BitVector is stored.
getVectorWord in interface BitVectorpublic BitVectorIterator bitVectorIterator(SubpFlow pSubpFlow)
BitVectorBitVectorIterator object backed by this BitVector
bitVectorIterator in interface BitVector
public void vectorAnd(BitVector pOperand2,
BitVector pResult)
BitVectorthis and pOperand2.
vectorAnd in interface BitVector
public void vectorOr(BitVector pOperand2,
BitVector pResult)
BitVectorthis and pOperand2.
vectorOr in interface BitVector
public void vectorXor(BitVector pOperand2,
BitVector pResult)
BitVectorthis and pOperand2.
vectorXor in interface BitVectorpublic void vectorNot(BitVector pResult)
BitVector
vectorNot in interface BitVector
public void vectorSub(BitVector pOperand2,
BitVector pResult)
BitVectorthis and pOperand2.
(pOperand2 is subtracted from this.) //##62
vectorSub in interface BitVectorpublic void vectorCopy(BitVector pResult)
BitVector
vectorCopy in interface BitVectorpublic boolean vectorEqual(BitVector pOperand2)
BitVectorthis and pOperand2 have the same value or not.
vectorEqual in interface BitVectorthis and pOperand2 have the same value,
false otherwise.public boolean equals(java.lang.Object pObj)
BitVectorvectorEqual if the specified argument is an instance of BitVector, otherwise returns false.
equals in interface BitVectorpublic int hashCode()
public void vectorReset()
BitVector
vectorReset in interface BitVector
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedExceptionpublic java.lang.String toString()
BitVector
toString in interface BitVectorpublic java.lang.String toStringDescriptive()
BitVectortoString() of this BitVector.
toStringDescriptive in interface BitVector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||