|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.BitSet
|
+--jaga.BitSet
Extension of java.util.BitSet providing sets with defined length and constructors accepting encoded Strings.
| Constructor Summary | |
BitSet()
Creates new BitSet |
|
BitSet(int length)
Creates a new BitSet of the desired length |
|
BitSet(java.lang.String bits)
Creates a new BitSet from a string representation of the genotype which would look like: 0100101011101010010 (Anything which is not a 0 is taken as a 1) |
|
BitSet(java.lang.String symbols,
int length,
int base)
Creates a new BitSet from a string representation of the genotype which could look like: 9AB9873KJF83JD in any base. |
|
| Method Summary | |
int |
bitsToInt(int first,
int last)
Takes two integers defining a range in the bitset and returns the integer represented by these bits. |
void |
flip(int index)
Flips this bit (0->1, 1->0) |
boolean[] |
getBooleanChunk(int start,
int seclen)
|
BitSet |
getChunk(int start,
int seclen)
Takes two integers start,seclen and returns the BitSet of length seclen starting at position start of this bitset. |
int |
hashCode()
|
int |
length()
|
void |
setBits(int[] bitsToSet)
Used to set many bits according to an array of integers indicating the positions of the bits to set. |
static void |
setCodeBase(int base)
Sets the current codebase which will be used to output BitSets as strings. |
void |
setLength(int newLength)
|
void |
setTo(int index,
boolean value)
Sets a particular bit to a particular boolean value |
java.lang.String |
toString()
Will convert the BitSet to a string using the current codebase. |
| Methods inherited from class java.util.BitSet |
and, andNot, clear, clone, equals, get, or, set, size, xor |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BitSet()
public BitSet(int length)
public BitSet(java.lang.String bits)
public BitSet(java.lang.String symbols,
int length,
int base)
| Method Detail |
public void setTo(int index,
boolean value)
public void flip(int index)
public int length()
length in class java.util.BitSetpublic void setLength(int newLength)
public java.lang.String toString()
toString in class java.util.BitSetpublic void setBits(int[] bitsToSet)
public int bitsToInt(int first,
int last)
first - inclusive first bit in sequence to be convertedlast - exclusive last bit in sequence to be converted
public BitSet getChunk(int start,
int seclen)
public boolean[] getBooleanChunk(int start,
int seclen)
public static void setCodeBase(int base)
public int hashCode()
hashCode in class java.util.BitSet
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||