|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDatabaseDistanceFunction<O,DoubleDistance> de.lmu.ifi.dbs.elki.distance.distancefunction.adapter.AbstractSimilarityAdapter<O>
O
- object class to processpublic abstract class AbstractSimilarityAdapter<O>
Adapter from a normalized similarity function to a distance function. Note: The derived distance function will usually not satisfy the triangle equation.
Nested Class Summary | |
---|---|
static class |
AbstractSimilarityAdapter.Instance<O>
Inner proxy class for SNN distance function. |
static class |
AbstractSimilarityAdapter.Parameterizer<O>
Parameterization class. |
Field Summary | |
---|---|
static OptionID |
SIMILARITY_FUNCTION_ID
Parameter to specify the similarity function to derive the distance between database objects from. |
protected NormalizedSimilarityFunction<? super O,? extends NumberDistance<?,?>> |
similarityFunction
Holds the similarity function. |
Constructor Summary | |
---|---|
AbstractSimilarityAdapter(NormalizedSimilarityFunction<? super O,? extends NumberDistance<?,?>> similarityFunction)
Constructor. |
Method Summary | ||
---|---|---|
boolean |
equals(Object obj)
|
|
DoubleDistance |
getDistanceFactory()
Method to get the distance functions factory. |
|
TypeInformation |
getInputTypeRestriction()
Get the input data type of the function. |
|
abstract
|
instantiate(Relation<T> database)
Instantiate with a database to get the actual distance query. |
|
boolean |
isSymmetric()
Is this function symmetric? |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDatabaseDistanceFunction |
---|
isMetric |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final OptionID SIMILARITY_FUNCTION_ID
NormalizedSimilarityFunction
.
Key: -adapter.similarityfunction
Default value:
FractionalSharedNearestNeighborSimilarityFunction
protected NormalizedSimilarityFunction<? super O,? extends NumberDistance<?,?>> similarityFunction
Constructor Detail |
---|
public AbstractSimilarityAdapter(NormalizedSimilarityFunction<? super O,? extends NumberDistance<?,?>> similarityFunction)
similarityFunction
- Similarity function to use.Method Detail |
---|
public TypeInformation getInputTypeRestriction()
DistanceFunction
public boolean isSymmetric()
DistanceFunction
isSymmetric
in interface DistanceFunction<O,DoubleDistance>
isSymmetric
in class AbstractDatabaseDistanceFunction<O,DoubleDistance>
true
when symmetricpublic DoubleDistance getDistanceFactory()
DistanceFunction
getDistanceFactory
in interface DistanceFunction<O,DoubleDistance>
getDistanceFactory
in class AbstractDatabaseDistanceFunction<O,DoubleDistance>
public abstract <T extends O> DistanceQuery<T,DoubleDistance> instantiate(Relation<T> database)
DistanceFunction
database
- The representation to use
public boolean equals(Object obj)
equals
in class Object
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |