com.wcohen.ss
Class NeedlemanWunsch

java.lang.Object
  extended by com.wcohen.ss.AbstractStringDistance
      extended by com.wcohen.ss.NeedlemanWunsch
All Implemented Interfaces:
StringDistance, StringDistanceLearner
Direct Known Subclasses:
Levenstein

public class NeedlemanWunsch
extends AbstractStringDistance

Needleman-Wunsch string distance, following Durban et al. Sec 2.3.


Constructor Summary
NeedlemanWunsch()
           
NeedlemanWunsch(CharMatchScore charMatchScore, double gapCost)
           
 
Method Summary
 java.lang.String explainScore(StringWrapper s, StringWrapper t)
          This method needs to be implemented by subclasses.
static void main(java.lang.String[] argv)
           
 double score(StringWrapper s, StringWrapper t)
          This method needs to be implemented by subclasses.
 
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
 

Constructor Detail

NeedlemanWunsch

public NeedlemanWunsch()

NeedlemanWunsch

public NeedlemanWunsch(CharMatchScore charMatchScore,
                       double gapCost)
Method Detail

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

main

public static void main(java.lang.String[] argv)