org.jscience.biology.alignment
Class AlignmentBlock

java.lang.Object
  extended by org.jscience.biology.alignment.AlignmentBlock
Direct Known Subclasses:
LocalAlignmentBlock

public class AlignmentBlock
extends java.lang.Object

This class is used by the CrochemoreLandauZivUkelson algorithm to store the information of an alignment block. All fields are public (but final) in order to simplify the access to the data.

For more information on how this class is used, please refer to the specification of the CrochemoreLandauZivUkelson class and it subclasses.

See Also:
CrochemoreLandauZivUkelson

Field Summary
 AlignmentBlock[] ancestor
          An array of pointers to prefix blocks of this block.
 byte[] direction
          An array of directions that must be followed to reach the source of the highest scoring path for each entry in the output border.
 int[] dist_column
          The DIST column of this block.
 Factor factor1
          A pointer to the factor of the first sequence being aligned.
 Factor factor2
          A pointer to the factor of the second sequence being aligned.
 int[] output_border
          This block's output border.
 int[] source_path
          An array of indexes to the source of the highest scoring path for each entry in the output border.
 
Constructor Summary
AlignmentBlock(Factor factor1, Factor factor2)
          Creates a new root block.
AlignmentBlock(Factor factor1, Factor factor2, int size)
          Creates a new alignment block, with all arrays created with the specified size.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factor1

public final Factor factor1
A pointer to the factor of the first sequence being aligned.


factor2

public final Factor factor2
A pointer to the factor of the second sequence being aligned.


dist_column

public final int[] dist_column
The DIST column of this block.


ancestor

public final AlignmentBlock[] ancestor
An array of pointers to prefix blocks of this block.


output_border

public final int[] output_border
This block's output border.


source_path

public final int[] source_path
An array of indexes to the source of the highest scoring path for each entry in the output border.


direction

public final byte[] direction
An array of directions that must be followed to reach the source of the highest scoring path for each entry in the output border.

See Also:
CrochemoreLandauZivUkelson.STOP_DIRECTION, CrochemoreLandauZivUkelson.LEFT_DIRECTION, CrochemoreLandauZivUkelson.DIAGONAL_DIRECTION, CrochemoreLandauZivUkelson.TOP_DIRECTION
Constructor Detail

AlignmentBlock

public AlignmentBlock(Factor factor1,
                      Factor factor2)
Creates a new root block. A root block does not have source_path and ancestor arrays. Moreover, its dist_column and output_border arrays are set to zero, and the direction array is set to contain an STOP_DIRECTION.

Parameters:
factor1 - factor of the first sequence being aligned
factor2 - factor of the second sequence being aligned

AlignmentBlock

public AlignmentBlock(Factor factor1,
                      Factor factor2,
                      int size)
Creates a new alignment block, with all arrays created with the specified size.

Parameters:
factor1 - factor of the first sequence being aligned
factor2 - factor of the second sequence being aligned
size - size of the arrays to be created