## org.biojava.bio.dp
Class PairwiseDP

    java.lang.Object
      |
      +--org.biojava.bio.dp.DP
            |
            +--org.biojava.bio.dp.PairwiseDP

public class PairwiseDP
extends DP
implements java.io.Serializable

Algorithms for dynamic programming (alignments) between pairs of SymbolLists. Based on a single-head DP implementation by Matt Pocock.

Author:
  Thomas Down, Matthew Pocock
See Also:
  Serialized Form

Inner classes inherited from class org.biojava.bio.dp.DP
`DP.ReverseIterator`

Constructor Summary
`PairwiseDP(MarkovModel mm)`

Method Summary
`double` `backward(SymbolList[] seqs)`
`DPMatrix` `backwardMatrix(SymbolList[] seqs)`
`DPMatrix` `backwardMatrix(SymbolList[] seqs, DPMatrix d)`
`double` `forward(SymbolList[] seqs)`
`DPMatrix` `forwardMatrix(SymbolList[] seqs)`
`DPMatrix` `forwardMatrix(SymbolList[] seqs, DPMatrix d)`
`protected double[]` `getEmission(java.util.List symList, CrossProductAlphabet alpha)`
`void` `updateTransitions()`
`StatePath` `viterbi(SymbolList[] seqs)`

Methods inherited from class org.biojava.bio.dp.DP
`backwardTransitions, backwardTransitionScores, flatView, forwardsBackwards, forwardTransitions, forwardTransitionScores, generate, getBackwardTransitions, getBackwardTransitionScores, getDotStatesIndex, getForwardTransitions, getForwardTransitionScores, getModel, getStates, lockModel, scoreWeightMatrix, stateList, unlockModel`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PairwiseDP

    public PairwiseDP(MarkovModel mm)
               throws IllegalSymbolException,
                      IllegalTransitionException,
                      BioException

Method Detail

### updateTransitions

    public void updateTransitions()

  Overrides:
    updateTransitions in class DP

### getEmission

    protected double[] getEmission(java.util.List symList,
                                   CrossProductAlphabet alpha)
                            throws IllegalSymbolException

### backward

    public double backward(SymbolList[] seqs)
                    throws IllegalSymbolException,
                           IllegalAlphabetException,
                           IllegalTransitionException

  Overrides:
    backward in class DP

### backwardMatrix

    public DPMatrix backwardMatrix(SymbolList[] seqs)
                            throws IllegalSymbolException,
                                   IllegalAlphabetException,
                                   IllegalTransitionException

  Overrides:
    backwardMatrix in class DP

### backwardMatrix

    public DPMatrix backwardMatrix(SymbolList[] seqs,
                                   DPMatrix d)
                            throws IllegalSymbolException,
                                   IllegalAlphabetException,
                                   IllegalTransitionException

  Overrides:
    backwardMatrix in class DP

### forward

    public double forward(SymbolList[] seqs)
                   throws IllegalSymbolException,
                          IllegalAlphabetException,
                          IllegalTransitionException

  Overrides:
    forward in class DP

### forwardMatrix

    public DPMatrix forwardMatrix(SymbolList[] seqs)
                           throws IllegalSymbolException,
                                  IllegalAlphabetException,
                                  IllegalTransitionException

  Overrides:
    forwardMatrix in class DP

### forwardMatrix

    public DPMatrix forwardMatrix(SymbolList[] seqs,
                                  DPMatrix d)
                           throws IllegalSymbolException,
                                  IllegalAlphabetException,
                                  IllegalTransitionException

  Overrides:
    forwardMatrix in class DP

### viterbi

    public StatePath viterbi(SymbolList[] seqs)
                      throws IllegalSymbolException,
                             IllegalAlphabetException,
                             IllegalTransitionException

  Overrides:
    viterbi in class DP