org.biojava.bio.dist
Class PairDistribution
java.lang.Object
|
+--org.biojava.bio.dist.AbstractDistribution
|
+--org.biojava.bio.dist.PairDistribution
- public class PairDistribution
- extends AbstractDistribution
- implements java.io.Serializable
Class for pairing up two unique distributions.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
PairDistribution
public PairDistribution(Distribution first,
Distribution second)
getAlphabet
public Alphabet getAlphabet()
- Description copied from interface: Distribution
- The alphabet from which this spectrum emits symbols.
- Tags copied from interface: Distribution
- Returns:
- the Alphabet associated with this spectrum
getNullModel
public Distribution getNullModel()
- Description copied from class: AbstractDistribution
- Retrieve the null model Distribution that this Distribution recognizes.
- Overrides:
- getNullModel in class AbstractDistribution
- Tags copied from class: AbstractDistribution
- Returns:
- the apropriate null model
setNullModel
public void setNullModel(Distribution nullModel)
throws IllegalAlphabetException
- Set a null background distribution.
- Parameters:
nullModel
- the distribution to act as the background distribution.
registerWithTrainer
public void registerWithTrainer(ModelTrainer trainer)
- Register this paired distribution with a model trainer.
- Parameters:
trainer
- the trainer to register this distribution with.
getWeight
public double getWeight(Symbol sym)
throws IllegalSymbolException
- Description copied from interface: Distribution
- Return the probability that Symbol s is emited by this spectrum.
If the symbol is an AmbiguitySymbol, then it is the probability that
exactly one of the symbols matching it was emitted.
- Tags copied from interface: Distribution
- Parameters:
s
- the Symbol emitted- Returns:
- the log probability of emitting that symbol
- Throws:
- IllegalSymbolException - if s is not from this state's alphabet