public final class IndexedCount extends AbstractChangeable implements Count, Serializable
| Constructor and Description |
|---|
IndexedCount(AlphabetIndex indexer)
Get a new InexedCount for an alphabet indexer.
|
IndexedCount(FiniteAlphabet fa)
Get a new IdexedCount for an alphabet using the default indexer.
|
| Modifier and Type | Method and Description |
|---|---|
Alphabet |
getAlphabet()
The alphabet from which this Count is over.
|
double |
getCount(AtomicSymbol s)
Return the counts for a given Symbol.
|
void |
increaseCount(AtomicSymbol s,
double c)
Set the probability or odds that Symbol s is emitted by this state.
|
void |
setCount(AtomicSymbol s,
double c)
Set the count for the Symbol s.
|
void |
setCounts(Count c)
Set the counts in this Counts to be equal to the counts in c.
|
void |
zeroCounts()
Reset all the counts to zero.
|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerpublic IndexedCount(FiniteAlphabet fa)
fa - the FiniteAlphabet to countpublic IndexedCount(AlphabetIndex indexer)
indexer - the AlphabetIndex used to map between symbols and indeciespublic Alphabet getAlphabet()
CountgetAlphabet in interface Countpublic double getCount(AtomicSymbol s) throws IllegalSymbolException
CountgetCount in interface Counts - the SymbolIllegalSymbolException - if s is not from this Count's alphabetpublic void setCount(AtomicSymbol s, double c) throws IllegalSymbolException, ChangeVetoException
CountsetCount in interface Counts - the Symbol emittedc - the new count for the SymbolIllegalSymbolException - if s is not from this state's alphabet, or
if it is an ambiguity symbol and the implementation can't handle
this caseChangeVetoException - if this distribution does not allow counts
to be tampered with, or if one of the listeners vetoed this changepublic void increaseCount(AtomicSymbol s, double c) throws IllegalSymbolException, ChangeVetoException
CountincreaseCount in interface Counts - the Symbol emittedc - the delta to add to the count for the SymbolIllegalSymbolException - if s is not from this state's alphabet, or
if it is an ambiguity symbol and the implementation can't handle
this caseChangeVetoException - if this Count does not allow counts
to be tampered with, or if one of the listeners vetoed this changepublic void setCounts(Count c) throws IllegalAlphabetException, ChangeVetoException
CountsetCounts in interface Countc - the Count object to copy the counts fromIllegalAlphabetException - if c has a different Alphabet to this
CountChangeVetoException - if this Count does not allow the counts to be
tampered with, or if one of the listeners vetoed this changepublic void zeroCounts() throws ChangeVetoException
CountzeroCounts in interface CountChangeVetoException - if this Count does not allow the counts to be
tampered with, or if one of the listeners vetoed this changeCopyright © 2014 BioJava. All rights reserved.