de.jstacs.algorithms.alignment
Class PairwiseStringAlignment
java.lang.Object
de.jstacs.algorithms.alignment.StringAlignment
de.jstacs.algorithms.alignment.PairwiseStringAlignment
- All Implemented Interfaces:
- Comparable<StringAlignment>
public class PairwiseStringAlignment
- extends StringAlignment
Class for the representation of an alignment of two Strings. It
contains the two Strings that were aligned and expanded by
gap-symbols, and the edit-costs according to the employed
Costs instance.
- Author:
- Jan Grau
PairwiseStringAlignment
protected PairwiseStringAlignment(String r1,
String r2,
double cost,
int startPos,
int endPos)
- Creates the instance for the two (extended)
Strings and the
edit-costs.
- Parameters:
r1 - the first Stringr2 - the second Stringcost - the edit-costsstartPos - the start position of the aligned block in the first StringendPos - the end position of the aligned block in the first String
getStartIndexOfAlignmentForFirst
public int getStartIndexOfAlignmentForFirst()
- This method returns the start index of the alignment in the first sequence.
- Returns:
- the start index of the alignment in the first sequence
getEndIndexOfAlignmentForFirst
public int getEndIndexOfAlignmentForFirst()
- This method returns the end index of the alignment in the first sequence.
- Returns:
- the end index of the alignment in the first sequence