|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojava.bio.dist.AbstractDistribution
org.biojava.bio.dist.UniformDistribution
public class UniformDistribution
An implementation of an uniform distribution
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.biojava.bio.dist.Distribution |
|---|
Distribution.NullModelForwarder |
| Field Summary |
|---|
| Fields inherited from class org.biojava.bio.dist.AbstractDistribution |
|---|
nullModelForwarder |
| Fields inherited from interface org.biojava.bio.dist.Distribution |
|---|
NULL_MODEL, WEIGHTS |
| Constructor Summary | |
|---|---|
UniformDistribution(FiniteAlphabet alphabet)
Create a new UniformDistribution. |
|
| Method Summary | |
|---|---|
Alphabet |
getAlphabet()
The alphabet from which this spectrum emits symbols. |
Distribution |
getNullModel()
Retrieve the null model Distribution that this Distribution recognizes. |
protected double |
getWeightImpl(AtomicSymbol s)
Override this method to implement getting the weight for an atomic symbol. |
void |
registerWithTrainer(DistributionTrainerContext dtc)
Register an IgnoreCountsTrainer instance as the trainer for this distribution. |
protected void |
setNullModelImpl(Distribution nullModel)
Assign a background distribution. |
protected void |
setWeightImpl(AtomicSymbol sym,
double weight)
Implement this to actually set the weight. |
| Methods inherited from class org.biojava.bio.dist.AbstractDistribution |
|---|
equals, getChangeSupport, getWeight, hashCode, sampleSymbol, setNullModel, setWeight |
| Methods inherited from class org.biojava.utils.AbstractChangeable |
|---|
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.biojava.utils.Changeable |
|---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
| Constructor Detail |
|---|
public UniformDistribution(FiniteAlphabet alphabet)
alphabet - the finite alphabet to be over| Method Detail |
|---|
public Alphabet getAlphabet()
Distribution
getAlphabet in interface Distributionpublic Distribution getNullModel()
Distribution
getNullModel in interface Distribution
protected void setNullModelImpl(Distribution nullModel)
throws IllegalAlphabetException
setNullModelImpl in class AbstractDistributionnullModel - the background distribution to assign
IllegalAlphabetException - if nullModel is over an incompattible
alphabet
protected double getWeightImpl(AtomicSymbol s)
throws IllegalSymbolException
AbstractDistribution
getWeightImpl in class AbstractDistributions - the AtomicSymbol to get the weight for
IllegalSymbolException - if sym is not known
protected void setWeightImpl(AtomicSymbol sym,
double weight)
throws ChangeVetoException
AbstractDistributionDo not inform any listeners. This has already been done for you. Just update state.
setWeightImpl in class AbstractDistributionsym - the AtomicSymbol to update forweight - the new weight for that symbol
ChangeVetoException - if the change is to be preventedpublic void registerWithTrainer(DistributionTrainerContext dtc)
AbstractDistribution
registerWithTrainer in interface DistributionregisterWithTrainer in class AbstractDistributiondtc - the context to register with
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||