de.jstacs.algorithms.alignment.cost
Interface Costs

All Known Implementing Classes:
AffineCosts, MatrixCosts, SimpleCosts

public interface Costs

The general interface for the costs of an alignment.

Author:
Jan Grau

Nested Class Summary
static class Costs.Direction
          The direction of the predecessor in the DP (dynamic programming)-matrix.
 
Method Summary
 double getCostFor(Sequence s1, Sequence s2, int i, int j, Costs.Direction from)
          Returns the costs for the alignment if s1(i) and s2(j) coming from from.
 double getElongateCosts()
          Returns the costs to elongate a gap by one position.
 double getGapCostsFor(int length)
          Returns the costs for a gap of length length.
 

Method Detail

getCostFor

double getCostFor(Sequence s1,
                  Sequence s2,
                  int i,
                  int j,
                  Costs.Direction from)
Returns the costs for the alignment if s1(i) and s2(j) coming from from.

Parameters:
s1 - the first sequence
s2 - the second sequence
i - the index in the first sequence
j - the index in the second sequence
from - the direction within the DP-matrix
Returns:
the costs

getGapCostsFor

double getGapCostsFor(int length)
Returns the costs for a gap of length length.

Parameters:
length - the length of the gap
Returns:
the corresponding costs

getElongateCosts

double getElongateCosts()
Returns the costs to elongate a gap by one position.

Returns:
the corresponding costs