| Constructor and Description |
|---|
MatrixCosts(double[][] matrix,
double inDel)
Creates a new instance of
MatrixCosts where the costs
for mismatch and match are given in matrix. |
MatrixCosts(double[][] matrix,
double insert,
double delete)
Creates a new instance of
MatrixCosts where the costs
for mismatch and match are given in matrix. |
MatrixCosts(StringBuffer xml)
Restores
MatrixCosts object from its XML representation. |
| Modifier and Type | Method and Description |
|---|---|
double |
getCostFor(Sequence s1,
Sequence s2,
int i,
int j)
Returns the costs for the alignment of
s1(i) and
s2(j). |
double |
getDeleteCosts()
Returns the costs for a delete gap, i.e., a gap in the second string.
|
double |
getInsertCosts()
Returns the costs for an insert gap, i.e., a gap in the first string.
|
StringBuffer |
toXML()
This method returns an XML representation as
StringBuffer of an
instance of the implementing class. |
public MatrixCosts(double[][] matrix,
double insert,
double delete)
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 costsinsert - the cost for an insert gap, i.e., a gap in the first stringdelete - the cost for a delete gap, i.e., a gap in the second stringCloneNotSupportedException - if matrix could not be clonedpublic MatrixCosts(double[][] matrix,
double inDel)
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 costsinDel - the cost for a gapCloneNotSupportedException - if matrix could not be clonedpublic MatrixCosts(StringBuffer xml) throws NonParsableException
MatrixCosts object from its XML representation.xml - the XML representationNonParsableException - if the XML could not be parsedpublic StringBuffer toXML()
StorableStringBuffer of an
instance of the implementing class.public double getCostFor(Sequence s1, Sequence s2, int i, int j)
Costss1(i) and
s2(j).getCostFor in interface Costss1 - the first sequences2 - the second sequencei - the index in the first sequencej - the index in the second sequenceSequence.discreteVal(int)public double getInsertCosts()
CostsgetInsertCosts in interface Costspublic double getDeleteCosts()
CostsgetDeleteCosts in interface Costs