org.biojava.bio.dist
Interface OrderNDistribution

All Superinterfaces:
Changeable, Distribution
All Known Implementing Classes:
AbstractOrderNDistribution

public interface OrderNDistribution
extends Distribution

Provides an N'th order distribution. This is a distribution over one alphabet which is conditioned on having previously observed one or more other symbols (potentially from different alphabets).

Order-N distributions are always over a CrossProductAlphabet.

Note: Unlike normal distributions, the total weights for all symbols in the overall alphabet do not sum to 1.0. Instead, the weights of each sub-distribution should sum to 1.0.

This would typically be used in conjunction with an OrderNSymbolList.

Author:
Thomas Down, Samiul Hasan, Matthew Pocock

Nested Class Summary
 
Nested classes inherited from class org.biojava.bio.dist.Distribution
Distribution.NullModelForwarder
 
Field Summary
 
Fields inherited from interface org.biojava.bio.dist.Distribution
NULL_MODEL, WEIGHTS
 
Method Summary
 java.util.Collection conditionedDistributions()
           
 Alphabet getConditionedAlphabet()
          Get the conditioned alphabet.
 Alphabet getConditioningAlphabet()
          Get the conditioning alphabet of this distribution.
 Distribution getDistribution(Symbol sym)
           
 void setDistribution(Symbol sym, Distribution dist)
           
 
Methods inherited from interface org.biojava.bio.dist.Distribution
getAlphabet, getNullModel, getWeight, registerWithTrainer, sampleSymbol, setNullModel, setWeight
 
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
 

Method Detail

getConditioningAlphabet

public Alphabet getConditioningAlphabet()
Get the conditioning alphabet of this distribution. If the `overall' alphabet is a cross-product of two alphabets, this will be the first of those alphabets. If it is a cross-product of more than two alphabets, the conditioning alphabet is the cross-product of all but the last alphabet.


getConditionedAlphabet

public Alphabet getConditionedAlphabet()
Get the conditioned alphabet. This is the last alphabet in the distribution's overall cross-product. It will be the alphabet of all the sub-distributions contained within this OrderNDistribution.


conditionedDistributions

public java.util.Collection conditionedDistributions()

setDistribution

public void setDistribution(Symbol sym,
                            Distribution dist)
                     throws IllegalSymbolException,
                            IllegalAlphabetException
Throws:
IllegalSymbolException
IllegalAlphabetException

getDistribution

public Distribution getDistribution(Symbol sym)
                             throws IllegalSymbolException
Throws:
IllegalSymbolException