| 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 |
getGapCosts()
Returns the costs for a gap.
|
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()
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 getGapCosts()
CostsgetGapCosts in interface Costs