public class SmithWatermanGotoh extends Object implements StringMetric
Implementation uses optimizations described in Osamu Gotoh (1982). "An improved algorithm for matching biological sequences". Journal of molecular biology 162: 705". This implementation uses constant space and quadratic time.
This class is immutable and thread-safe if its substitution functions are.
| Constructor and Description |
|---|
SmithWatermanGotoh()
Constructs a new Smith Waterman metric.
|
SmithWatermanGotoh(float gapValue,
Substitution substitution)
Constructs a new Smith Waterman metric.
|
| Modifier and Type | Method and Description |
|---|---|
float |
compare(String a,
String b)
Measures the similarity between strings a and b.
|
String |
toString() |
public SmithWatermanGotoh()
public SmithWatermanGotoh(float gapValue,
Substitution substitution)
gapValue - a non-positive gap penaltysubstitution - a substitution functionpublic float compare(String a, String b)
StringMetriccompare in interface Metric<String>compare in interface StringMetrica - string a to compareb - string b to compareCopyright © 2014–2018. All rights reserved.