jcolibri.method.retrieve.NNretrieval.similarity.local
Class MaxString

java.lang.Object
  extended by jcolibri.method.retrieve.NNretrieval.similarity.local.MaxString
All Implemented Interfaces:
LocalSimilarityFunction

public class MaxString
extends java.lang.Object
implements LocalSimilarityFunction

This function returns a similarity value depending of the biggest substring that belong to both strings.


Constructor Summary
MaxString()
           
 
Method Summary
 double compute(java.lang.Object s, java.lang.Object t)
          Applies the similarity function.
 boolean isApplicable(java.lang.Object o1, java.lang.Object o2)
          Applicable to String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxString

public MaxString()
Method Detail

compute

public double compute(java.lang.Object s,
                      java.lang.Object t)
               throws NoApplicableSimilarityFunctionException
Applies the similarity function.

Specified by:
compute in interface LocalSimilarityFunction
Parameters:
s - String.
t - String.
Returns:
result of apply the similarity funciton.
Throws:
NoApplicableSimilarityFunctionException

isApplicable

public boolean isApplicable(java.lang.Object o1,
                            java.lang.Object o2)
Applicable to String

Specified by:
isApplicable in interface LocalSimilarityFunction

GAIA - Group for Artificial Intelligence Applications
http://gaia.fdi.ucm.es