|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.bio.symbol.DNAAmbPack
public class DNAAmbPack
Packing utility class for DNA. Also represents ambiguity.
| Constructor Summary | |
|---|---|
DNAAmbPack()
|
|
| Method Summary | |
|---|---|
FiniteAlphabet |
getAlphabet()
The FiniteAlphabet this packing is for. |
boolean |
handlesAmbiguity()
Flag to state if ambiguities are stored. |
byte |
pack(Symbol sym)
Return a byte representing the packing of a symbol. |
Symbol |
unpack(byte b)
Return the symbol for a packing. |
byte |
wordSize()
The number of bits required to pack a symbol. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DNAAmbPack()
| Method Detail |
|---|
public FiniteAlphabet getAlphabet()
Packing
getAlphabet in interface Packingpublic byte pack(Symbol sym)
PackingReturn a byte representing the packing of a symbol. The bits will be from 1 >> 0 through to 1 >> (wordSize - 1).
pack in interface Packingsym - the Symbol to pack
public Symbol unpack(byte b)
PackingReturn the symbol for a packing.
unpack in interface Packingb - the byte pattern for a Symbol
public byte wordSize()
PackingThe number of bits required to pack a symbol.
wordSize in interface Packingpublic boolean handlesAmbiguity()
PackingFlag to state if ambiguities are stored.
Packings are free to either store ambiguity information or to discard it (presumably converting all ambiguities to a standard AtomicSymbol and then packing that). You can check wether ambiguities are handled by calling this method.
handlesAmbiguity in interface Packing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||