|
|||||||||
| Home >> All >> joelib >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
joelib.util
Class JOEBitVec

java.lang.Objectjoelib.util.BitSet14
joelib.util.JOEBitVec
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- public class JOEBitVec
- extends BitSet14
- implements java.io.Serializable
- extends BitSet14
BitSet14 extensions.
| Field Summary | |
private static org.apache.log4j.Category |
logger
Obtain a suitable logger. |
| Fields inherited from class joelib.util.BitSet14 |
|
| Constructor Summary | |
JOEBitVec()
java.util.Vector of int[1] |
|
JOEBitVec(int bits)
Constructor for the JOEBitVec object |
|
JOEBitVec(JOEBitVec bv)
Constructor for the JOEBitVec object |
|
| Method Summary | |
JOEBitVec |
and(JOEBitVec bv)
Description of the Method |
static JOEBitVec |
and(JOEBitVec bv1,
JOEBitVec bv2)
Description of the Method |
int |
andCount(BitSet14 b)
Returns the number of bits which are set in this BitSet14 AND the BitSet14 b. |
JOEBitVec |
andSet(JOEBitVec bv)
Description of the Method |
boolean |
bitIsOn(int bit)
Description of the Method |
boolean |
bitIsSet(int bit)
Description of the Method |
int |
countBits()
Description of the Method |
boolean |
empty()
Description of the Method |
int |
endBit()
Description of the Method |
int |
firstBit()
Returns the index of the first bit that is set to true. |
void |
fold(int nbits)
Description of the Method |
void |
fromBoolArray(boolean[] boolArray)
|
void |
fromIntArray(int[] intArray)
Description of the Method |
void |
fromString(java.lang.String s)
Reads this bit vector from a String. |
void |
fromVectorWithIntArray(java.util.Vector v)
|
void |
in(java.io.InputStream is)
Description of the Method |
void |
negate()
Description of the Method |
int |
nextBit(int last)
Returns the index of the first bit that is set to true that occurs on or after the specified starting index. |
JOEBitVec |
or(JOEBitVec bv)
Description of the Method |
static JOEBitVec |
or(JOEBitVec bv1,
JOEBitVec bv2)
Description of the Method |
JOEBitVec |
orSet(JOEBitVec bv)
Description of the Method |
void |
out(java.io.OutputStream os)
Description of the Method |
JOEBitVec |
set(JOEBitVec bv)
Description of the Method |
void |
setBitOff(int bitIndex)
Clears the bits from the specified fromIndex(inclusive) to the specified toIndex(inclusive) to false. |
void |
setBitOn(int bitIndex)
Sets the bits from the specified fromIndex(inclusive) to the specified toIndex(inclusive) to false. |
void |
setRangeOff(int from,
int to)
Clears the bits from the specified fromIndex(inclusive) to the specified toIndex(inclusive) to false. |
void |
setRangeOn(int from,
int to)
Sets the bits from the specified fromIndex(inclusive) to the specified toIndex(inclusive) to false. |
JOEBitVec |
sub(JOEBitVec bv)
Description of the Method |
static JOEBitVec |
sub(JOEBitVec bv1,
JOEBitVec bv2)
Description of the Method |
JOEBitVec |
subSet(JOEBitVec bv)
Description of the Method |
double |
tanimoto(BitSet14 b)
Returns the tanimoto similarity coefficient between this BitSet14 with the BitSet14 b. |
boolean[] |
toBoolArr(int to)
|
boolean[] |
toBoolArray()
|
int[] |
toIntArray()
|
java.lang.String |
toString()
Writes this bit vector to a String. |
void |
toVectorWithIntArray(java.util.Vector v)
|
JOEBitVec |
xor(JOEBitVec bv)
Description of the Method |
static JOEBitVec |
xor(JOEBitVec bv1,
JOEBitVec bv2)
Description of the Method |
JOEBitVec |
xorSet(JOEBitVec bv)
Description of the Method |
| Methods inherited from class joelib.util.BitSet14 |
and, andNot, cardinality, clear, clear, clear, clone, equals, flip, flip, get, get, hashCode, intersects, isEmpty, length, nextClearBit, nextSetBit, or, set, set, set, set, size, xor |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
logger
private static org.apache.log4j.Category logger
- Obtain a suitable logger.
| Constructor Detail |
JOEBitVec
public JOEBitVec()
- java.util.Vector of int[1]
JOEBitVec
public JOEBitVec(int bits)
- Constructor for the JOEBitVec object
JOEBitVec
public JOEBitVec(JOEBitVec bv)
- Constructor for the JOEBitVec object
| Method Detail |
setBitOff
public void setBitOff(int bitIndex)
- Clears the bits from the specified fromIndex(inclusive) to the specified
toIndex(inclusive) to false.
setBitOn
public void setBitOn(int bitIndex)
- Sets the bits from the specified fromIndex(inclusive) to the specified
toIndex(inclusive) to false.
setRangeOff
public void setRangeOff(int from,
int to)
- Clears the bits from the specified fromIndex(inclusive) to the specified
toIndex(inclusive) to false.
setRangeOn
public void setRangeOn(int from,
int to)
- Sets the bits from the specified fromIndex(inclusive) to the specified
toIndex(inclusive) to false.
endBit
public final int endBit()
- Description of the Method
and
public JOEBitVec and(JOEBitVec bv)
- Description of the Method
and
public static JOEBitVec and(JOEBitVec bv1, JOEBitVec bv2)
- Description of the Method
andSet
public JOEBitVec andSet(JOEBitVec bv)
- Description of the Method
firstBit
public int firstBit()
- Returns the index of the first bit that is set to true. If no
such bit exists then -1 is returned.
fold
public void fold(int nbits)
- Description of the Method
nextBit
public final int nextBit(int last)
- Returns the index of the first bit that is set to true that
occurs on or after the specified starting index. If no such bit exists
then -1 is returned. To iterate over the true bits in a
BitSet14, use the following loop: for(int i=bs.nextSetBit(0);
i>=0; i=bs.nextSetBit(i+1)) { // operate on index i here }
countBits
public int countBits()
- Description of the Method
empty
public final boolean empty()
- Description of the Method
bitIsOn
public boolean bitIsOn(int bit)
- Description of the Method
bitIsSet
public boolean bitIsSet(int bit)
- Description of the Method
fromBoolArray
public void fromBoolArray(boolean[] boolArray)
fromIntArray
public void fromIntArray(int[] intArray)
- Description of the Method
fromString
public void fromString(java.lang.String s)
- Reads this bit vector from a String.
e.g. [0 10 15 23]. It's a list of all set bits in this
bit vector, which are separated by a space character.
The bit vector is enclosed by two brackets.
fromVectorWithIntArray
public void fromVectorWithIntArray(java.util.Vector v)
negate
public void negate()
- Description of the Method
or
public JOEBitVec or(JOEBitVec bv)
- Description of the Method
or
public static JOEBitVec or(JOEBitVec bv1, JOEBitVec bv2)
- Description of the Method
orSet
public JOEBitVec orSet(JOEBitVec bv)
- Description of the Method
set
public JOEBitVec set(JOEBitVec bv)
- Description of the Method
subSet
public JOEBitVec subSet(JOEBitVec bv)
- Description of the Method
toBoolArr
public boolean[] toBoolArr(int to)
toBoolArray
public boolean[] toBoolArray()
toIntArray
public int[] toIntArray()
toVectorWithIntArray
public void toVectorWithIntArray(java.util.Vector v)
xor
public JOEBitVec xor(JOEBitVec bv)
- Description of the Method
xor
public static JOEBitVec xor(JOEBitVec bv1, JOEBitVec bv2)
- Description of the Method
sub
public JOEBitVec sub(JOEBitVec bv)
- Description of the Method
sub
public static JOEBitVec sub(JOEBitVec bv1, JOEBitVec bv2)
- Description of the Method
andCount
public int andCount(BitSet14 b)
- Returns the number of bits which are set in this BitSet14 AND
the BitSet14 b.
in
public void in(java.io.InputStream is) throws java.io.IOException
- Description of the Method
out
public void out(java.io.OutputStream os)
- Description of the Method
tanimoto
public double tanimoto(BitSet14 b)
- Returns the tanimoto similarity coefficient between this BitSet14
with the BitSet14 b.
toString
public java.lang.String toString()
- Writes this bit vector to a String.
e.g. [0 10 15 23]. It's a list of all set bits in this
bit vector, which are separated by a space character.
The bit vector is enclosed by two brackets.
xorSet
public JOEBitVec xorSet(JOEBitVec bv)
- Description of the Method
|
|||||||||
| Home >> All >> joelib >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC