Constructor and Description |
---|
AffineCosts(double start,
Costs c)
This constructor creates a new instance of cost using affine gap costs.
|
AffineCosts(StringBuffer xml)
Restores
AffineCosts 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 |
getElongateCosts()
Returns the costs to elongate a gap by one position.
|
double |
getGapCosts()
Returns the costs for a gap.
|
double |
getGapCostsFor(int length)
Returns the costs for a gap of length
length . |
Costs |
getInternalCosts()
Returns the internal costs (supplied as
c to AffineCosts(double, Costs) ) used for matches and mismatches. |
StringBuffer |
toXML()
This method returns an XML representation as
StringBuffer of an
instance of the implementing class. |
public AffineCosts(double start, Costs c)
c
,
while the costs for a start of a gap are given by start
.start
- the costs for starting a gapc
- the cost for match, mismatch and gap elongationpublic AffineCosts(StringBuffer xml) throws NonParsableException
AffineCosts
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 Costs getInternalCosts()
c
to AffineCosts(double, Costs)
) used for matches and mismatches.public double getElongateCosts()
public double getGapCostsFor(int length)
length
.length
- the length of the gappublic 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 getGapCosts()
Costs
getGapCosts
in interface Costs