com.wcohen.ss
Class ApproxNeedlemanWunsch
java.lang.Object
com.wcohen.ss.AbstractStringDistance
com.wcohen.ss.ApproxNeedlemanWunsch
- All Implemented Interfaces:
- StringDistance, StringDistanceLearner
public class ApproxNeedlemanWunsch
- extends AbstractStringDistance
Needleman-Wunsch string distance, following Durban et al.
Sec 2.3, but using an approximate string distance.
Methods inherited from class com.wcohen.ss.AbstractStringDistance |
addExample, doMain, explainScore, getDistance, hasNextQuery, nextQuery, prepare, prepare, prepare, score, setDistanceInstancePool, setStringWrapperPool |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ApproxNeedlemanWunsch
public ApproxNeedlemanWunsch()
ApproxNeedlemanWunsch
public ApproxNeedlemanWunsch(CharMatchScore charMatchScore,
double gapCost)
setWidth
public void setWidth(int w)
score
public double score(StringWrapper s,
StringWrapper t)
- Description copied from class:
AbstractStringDistance
- This method needs to be implemented by subclasses.
- Specified by:
score
in interface StringDistance
- Specified by:
score
in class AbstractStringDistance
explainScore
public java.lang.String explainScore(StringWrapper s,
StringWrapper t)
- Description copied from class:
AbstractStringDistance
- This method needs to be implemented by subclasses.
- Specified by:
explainScore
in interface StringDistance
- Specified by:
explainScore
in class AbstractStringDistance
getAlignedChar
public int getAlignedChar(int iMinusOne,
boolean preferHigherIndices)
- Find a character in the first string, s, that can be aligned
with the i-th character in the second string, t.
main
public static void main(java.lang.String[] argv)
throws java.lang.Exception
- Throws:
java.lang.Exception