O
- object class to processpublic abstract class AbstractSimilarityAdapter<O> extends AbstractDatabaseDistanceFunction<O>
Note: The derived distance function will usually not satisfy the triangle equation.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractSimilarityAdapter.Instance<O>
Inner proxy class for SNN distance function.
|
static class |
AbstractSimilarityAdapter.Parameterizer<O,S extends SimilarityFunction<? super O>>
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
protected SimilarityFunction<? super O> |
similarityFunction
Holds the similarity function.
|
Constructor and Description |
---|
AbstractSimilarityAdapter(SimilarityFunction<? super O> similarityFunction)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
TypeInformation |
getInputTypeRestriction()
Get the input data type of the function.
|
int |
hashCode() |
abstract <T extends O> |
instantiate(Relation<T> database)
Instantiate with a database to get the actual distance query.
|
boolean |
isSymmetric()
Is this function symmetric?
|
isMetric
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isSquared
protected SimilarityFunction<? super O> similarityFunction
public AbstractSimilarityAdapter(SimilarityFunction<? super O> similarityFunction)
similarityFunction
- Similarity function to use.public TypeInformation getInputTypeRestriction()
DistanceFunction
public boolean isSymmetric()
DistanceFunction
isSymmetric
in interface DistanceFunction<O>
isSymmetric
in class AbstractDatabaseDistanceFunction<O>
true
when symmetricpublic abstract <T extends O> DistanceQuery<T> instantiate(Relation<T> database)
DistanceFunction
database
- The representation to usepublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.