com.wcohen.ss
Class MultiStringAvgDistance

java.lang.Object
  extended by com.wcohen.ss.MultiStringDistance
      extended by com.wcohen.ss.MultiStringAvgDistance
All Implemented Interfaces:
StringDistance

public class MultiStringAvgDistance
extends MultiStringDistance

StringDistance defined over Strings that are broken into fields, with distance defined as the average distance between any field.


Constructor Summary
MultiStringAvgDistance(StringDistance distance, java.lang.String delim)
           
 
Method Summary
protected  java.lang.String explainScoreCombination(double[] multiScore)
          Explain how to combine the scores for each primitive distance function on each field.
protected  StringDistance getDistance(int i)
          Get the distance used for the i-th pair of fields
static void main(java.lang.String[] argv)
           
protected  double scoreCombination(double[] multiScore)
          Combine the scores for each primitive distance function on each field.
 
Methods inherited from class com.wcohen.ss.MultiStringDistance
asMultiStringWrapper, doMain, explainScore, explainScore, isLegalMultiStringWrapperSize, prepare, score, score
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiStringAvgDistance

public MultiStringAvgDistance(StringDistance distance,
                              java.lang.String delim)
Method Detail

scoreCombination

protected double scoreCombination(double[] multiScore)
Combine the scores for each primitive distance function on each field.

Specified by:
scoreCombination in class MultiStringDistance

explainScoreCombination

protected java.lang.String explainScoreCombination(double[] multiScore)
Explain how to combine the scores for each primitive distance function on each field.

Specified by:
explainScoreCombination in class MultiStringDistance

getDistance

protected StringDistance getDistance(int i)
Description copied from class: MultiStringDistance
Get the distance used for the i-th pair of fields

Specified by:
getDistance in class MultiStringDistance

main

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