|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.algorithms.alignment.cost.MatrixCosts
public class MatrixCosts
Class for matrix costs, i.e., the cost of any match/mismatch is stored in a matrix allowing a huge degree of freedom.
Constructor Summary | |
---|---|
MatrixCosts(double[][] matrix,
double gap)
Creates a new instance of MatrixCosts where the costs
for mismatch and match are given in matrix . |
Method Summary | |
---|---|
double |
getCostFor(Sequence s1,
Sequence s2,
int i,
int j)
Returns the costs for the alignment of s1(i) and
s2(j) . |
double |
getGapCosts()
Returns the costs for a gap. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MatrixCosts(double[][] matrix, double gap) throws CloneNotSupportedException
MatrixCosts
where the costs
for mismatch and match are given in matrix
.
Additionally, the costs for a gap can be specified.
matrix
- the match and mismatch costsgap
- the cost for a gap
CloneNotSupportedException
- if matrix
could not be clonedMethod Detail |
---|
public double getCostFor(Sequence s1, Sequence s2, int i, int j)
Costs
s1(i)
and
s2(j)
.
getCostFor
in interface Costs
s1
- the first sequences2
- the second sequencei
- the index in the first sequencej
- the index in the second sequence
Sequence.discreteVal(int)
public double getGapCosts()
Costs
getGapCosts
in interface Costs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |