|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcolibri.method.retrieve.NNretrieval.similarity.local.EnumDistance
public class EnumDistance
This function returns the similarity of two enum values as the their distance sim(x,y)=|ord(x) - ord(y)|
Constructor Summary | |
---|---|
EnumDistance()
|
Method Summary | |
---|---|
double |
compute(java.lang.Object o1,
java.lang.Object o2)
Applies the similarity function. |
boolean |
isApplicable(java.lang.Object o1,
java.lang.Object o2)
Applicable to Enum |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnumDistance()
Method Detail |
---|
public double compute(java.lang.Object o1, java.lang.Object o2) throws NoApplicableSimilarityFunctionException
compute
in interface LocalSimilarityFunction
o1
- StringEnum or Stringo2
- StringEnum or String
NoApplicableSimilarityFunctionException
public boolean isApplicable(java.lang.Object o1, java.lang.Object o2)
isApplicable
in interface LocalSimilarityFunction
|
GAIA - Group for Artificial Intelligence Applications http://gaia.fdi.ucm.es |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |