com.wcohen.secondstring
Class NeedlemanWunsch

java.lang.Object
  |
  +--com.wcohen.secondstring.AbstractStringDistance
        |
        +--com.wcohen.secondstring.NeedlemanWunsch
All Implemented Interfaces:
StringDistance
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.secondstring.AbstractStringDistance
accumulateStatistics, doMain, explainScore, prepare, score
 
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)