de.jstacs.algorithms.alignment.cost
Class SimpleCosts
java.lang.Object
de.jstacs.algorithms.alignment.cost.AffineCosts
de.jstacs.algorithms.alignment.cost.SimpleCosts
- All Implemented Interfaces:
- Costs
public class SimpleCosts
- extends AffineCosts
Class for simple costs with costs mismatch
for a mismatch,
costs start
to start a new gap, costs elong
to
elongate a gap by one position and costs of match
for a match.
Nested classes/interfaces inherited from interface de.jstacs.algorithms.alignment.cost.Costs |
Costs.Direction |
Constructor Summary |
SimpleCosts(double match,
double mismatch,
double start,
double elong)
Creates a new instance of simple costs with costs
mismatch for a mismatch, costs start to
start a new gap, costs elong to elongate a gap by one
position and costs of match for a match. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleCosts
public SimpleCosts(double match,
double mismatch,
double start,
double elong)
- Creates a new instance of simple costs with costs
mismatch
for a mismatch, costs start
to
start a new gap, costs elong
to elongate a gap by one
position and costs of match
for a match.
- Parameters:
match
- the match costsmismatch
- the mismatch costsstart
- the costs to start a gapelong
- the costs to elongate a gap
getCostFor
public double getCostFor(Sequence s1,
Sequence s2,
int i,
int j,
Costs.Direction from)
- Description copied from interface:
Costs
- Returns the costs for the alignment if
s1(i)
and
s2(j)
coming from from
.
- Parameters:
s1
- the first sequences2
- the second sequencei
- the index in the first sequencej
- the index in the second sequencefrom
- the direction within the DP-matrix
- Returns:
- the costs