Package org.biojava.bio.dp.twohead
Class LightPairDPCursor
- java.lang.Object
-
- org.biojava.bio.dp.twohead.LightPairDPCursor
-
- All Implemented Interfaces:
PairDPCursor
public class LightPairDPCursor extends Object implements PairDPCursor
A LIGHT implementation of PairDPCursor.This object manages memory that is linear on the length of the shortest sequence. It does not maintain any data beyond that necessary for the next round of calcCell invocations.
- Author:
- Matthew Pocock, David Huen (fixes for magical state)
-
-
Field Summary
Fields Modifier and Type Field Description protected BackPointer[][][]
bPointers
Description of the Fieldprotected int[]
depth
Description of the Fieldprotected EmissionCache
eCache
Description of the Fieldprotected BackPointer[]
emptyBP
Description of the Fieldprotected int
numStates
Description of the Fieldprotected double[]
zeroCol
Description of the Field
-
Constructor Summary
Constructors Constructor Description LightPairDPCursor(SymbolList seq1, SymbolList seq2, int depth1, int depth2, int numStates, EmissionCache eCache)
Constructor for the LightPairDPCursor object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
getDepth()
Gets the Depth attribute of the LightPairDPCursor objectboolean
hasNext()
Are there further Cells to be computed?void
next(Cell[][] cells)
Description of the MethodCell[][]
press()
Returns the minimal context of the DP matrix necessary to compute the value of a single point in that matrix.
-
-
-
Field Detail
-
bPointers
protected BackPointer[][][] bPointers
Description of the Field
-
numStates
protected int numStates
Description of the Field
-
zeroCol
protected double[] zeroCol
Description of the Field
-
emptyBP
protected BackPointer[] emptyBP
Description of the Field
-
depth
protected int[] depth
Description of the Field
-
eCache
protected EmissionCache eCache
Description of the Field
-
-
Constructor Detail
-
LightPairDPCursor
public LightPairDPCursor(SymbolList seq1, SymbolList seq2, int depth1, int depth2, int numStates, EmissionCache eCache) throws IllegalSymbolException
Constructor for the LightPairDPCursor object- Parameters:
seq1
- First sequence in this twohead DP.seq2
- Second sequence in this twohead DP.depth1
- The number of bases of context required in first sequence to compute DP matrix at a point (= max advance in first sequence + 1).depth2
- The number of bases of context required in second sequence to compute DP matrix at a point (= max advance in second sequence + 1).numStates
- Total number of states in model.eCache
- Emission cache to be used with this run.- Throws:
IllegalSymbolException
- Description of Exception
-
-
Method Detail
-
getDepth
public int[] getDepth()
Gets the Depth attribute of the LightPairDPCursor object- Specified by:
getDepth
in interfacePairDPCursor
- Returns:
- The Depth value
-
hasNext
public boolean hasNext()
Are there further Cells to be computed?- Specified by:
hasNext
in interfacePairDPCursor
- Returns:
- Description of the Returned Value
-
press
public Cell[][] press()
Returns the minimal context of the DP matrix necessary to compute the value of a single point in that matrix.The Cell [][] array has the origin as the current point to be evaluated and successive rows/columns represent rows/columns backwards within the DP matrix.
- Specified by:
press
in interfacePairDPCursor
- Returns:
- An array representing the immediate context around the element to be computed.
-
next
public void next(Cell[][] cells) throws IllegalSymbolException
Description of the Method- Specified by:
next
in interfacePairDPCursor
- Parameters:
cells
- Description of Parameter- Throws:
IllegalSymbolException
- Description of Exception
-
-