public class MatchMismatch extends Object implements Substitution
This class is immutable and thread-safe.
| Constructor and Description |
|---|
MatchMismatch(float matchValue,
float mismatchValue)
Constructs a new match-mismatch substitution function.
|
| Modifier and Type | Method and Description |
|---|---|
float |
compare(String a,
int aIndex,
String b,
int bIndex)
Rates the substitution of character
a.getChar(aIndex)
against b.getChar(bIndex). |
float |
max()
Returns the maximum value a gap can have
|
float |
min()
Returns the minimum value a gap can have
|
String |
toString() |
public MatchMismatch(float matchValue,
float mismatchValue)
matchValue is assigned. In
case of a mismatch a score of mismatchValue. The
matchValue must be strictly greater then
mismatchValuematchValue - value when characters are equalmismatchValue - value when characters are not equalpublic float compare(String a, int aIndex, String b, int bIndex)
Substitutiona.getChar(aIndex)
against b.getChar(bIndex).compare in interface Substitutiona - a string to check inaIndex - index of character at string a to compareb - another string to check inbIndex - index of character at string b to comparepublic float max()
Substitutionmax in interface Substitutionpublic float min()
Substitutionmin in interface SubstitutionCopyright © 2014–2018. All rights reserved.