|
NeoBio API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--neobio.alignment.OutMatrix
Implements an interface to the OUT matrix of a block. This class is used by the CrochemoreLandauZivUkelson and subclasses to enconde the OUT matrix from the input border and DIST matrix of an AlignmentBlock.
The OUT matrix defined as OUT[i,j] = I[i] + DIST[i,j]
where I is the
input border array and DIST is the DIST matrix.
The output border of a block is computed from the OUT matrix by taking the maximum value of each column. Note that this class does not compute the OUT matrix, it just stores the necessary information to retrieve a value at any position of the matrix.
It implements the Matrix interface so that the SMAWK algorithm can be used to compute its column maxima.
For more information on how this class is used, please refer to the specification
of the CrochemoreLandauZivUkelson
and its subclasses.
CrochemoreLandauZivUkelson
,
CrochemoreLandauZivUkelsonGlobalAlignment
,
CrochemoreLandauZivUkelsonLocalAlignment
,
AlignmentBlock
,
Smawk
Field Summary | |
protected int |
dim
The dimension of the OUT matrix. |
protected int[][] |
dist
The DIST matrix of a block. |
protected int[] |
input_border
The input border of a block. |
protected int |
lc
The number of columns of the block. |
protected int |
max_length
The length of the longest sequence (number of characters) being aligned. |
protected int |
max_score
The maximum absolute score that the current scoring scheme can return. |
Constructor Summary | |
OutMatrix()
|
Method Summary | |
void |
init(int max_length,
int max_score)
Initialised this OUT matrix interface. |
int |
numColumns()
Returns the number of columns of this OUT matrix. |
int |
numRows()
Returns the number of rows of this OUT matrix. |
void |
setData(int[][] dist,
int[] input_border,
int dim,
int lc)
Sets this interface's data to represent an OUT matrix for a block. |
int |
valueAt(int row,
int col)
Returns the value at a given position of the matrix. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int max_length
protected int max_score
protected int[][] dist
protected int[] input_border
protected int dim
protected int lc
Constructor Detail |
public OutMatrix()
Method Detail |
public void init(int max_length, int max_score)
max_length
- the length of the longest sequence (number of characters) being
alignedmax_score
- the maximum absolute score that the current scoring scheme can
returnpublic void setData(int[][] dist, int[] input_border, int dim, int lc)
dist
- the DIST matrixinput_border
- the input borderdim
- the dimension of the OUT matrixlc
- the number of columns of the blockpublic int valueAt(int row, int col)
DIST[col][row] + input_border[row]
. However, special cases
occur for its upper right and lower left triangular parts.
valueAt
in interface Matrix
row
- row indexcol
- column index
row
, column col
of this OUT
matrixpublic int numRows()
numRows
in interface Matrix
public int numColumns()
numColumns
in interface Matrix
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |