Constructor and Description |
---|
SimpleCosts(double match,
double mismatch,
double gap)
Creates a new instance of simple costs with costs
match for a match,
mismatch for a mismatch, and
gap for a gap (of length 1). |
SimpleCosts(StringBuffer xml)
Restores
SimpleCosts 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 SimpleCosts(double match, double mismatch, double gap)
match
for a match,
mismatch
for a mismatch, and
gap
for a gap (of length 1).match
- the match costsmismatch
- the mismatch costsgap
- the costs for a gappublic SimpleCosts(StringBuffer xml) throws NonParsableException
SimpleCosts
object from its XML representation.xml
- the XML representationNonParsableException
- if the XML could not be parsedpublic StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.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 sequenceSequence.discreteVal(int)
public double getInsertCosts()
Costs
getInsertCosts
in interface Costs
public double getDeleteCosts()
Costs
getDeleteCosts
in interface Costs