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
mismatchValue
matchValue
- value when characters are equalmismatchValue
- value when characters are not equalpublic float compare(String a, int aIndex, String b, int bIndex)
Substitution
a.getChar(aIndex)
against b.getChar(bIndex)
.compare
in interface Substitution
a
- 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()
Substitution
max
in interface Substitution
public float min()
Substitution
min
in interface Substitution
Copyright © 2014–2018. All rights reserved.