O
- Object typepublic abstract static class AbstractSimilarityAdapter.Instance<O> extends AbstractDatabaseDistanceFunction.Instance<O,DoubleDistance>
Modifier and Type | Field and Description |
---|---|
private SimilarityQuery<? super O,? extends NumberDistance<?,?>> |
similarityQuery
The similarity query we use.
|
relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
AbstractSimilarityAdapter.Instance(Relation<O> database,
DistanceFunction<? super O,DoubleDistance> parent,
SimilarityQuery<? super O,? extends NumberDistance<?,?>> similarityQuery)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DoubleDistance |
distance(DBIDRef id1,
DBIDRef id2)
Returns the distance between the two objects specified by their object ids.
|
DoubleDistance |
getDistanceFactory()
Method to get the distance functions factory.
|
abstract double |
transform(double similarity)
Transformation function.
|
getDistanceFunction
distance, distance, distance
infiniteDistance, nullDistance, undefinedDistance
getRelation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRelation
private SimilarityQuery<? super O,? extends NumberDistance<?,?>> similarityQuery
public AbstractSimilarityAdapter.Instance(Relation<O> database, DistanceFunction<? super O,DoubleDistance> parent, SimilarityQuery<? super O,? extends NumberDistance<?,?>> similarityQuery)
database
- Database to useparent
- Parent distance functionsimilarityQuery
- Similarity querypublic abstract double transform(double similarity)
similarity
- Similarity valuepublic DoubleDistance distance(DBIDRef id1, DBIDRef id2)
AbstractDistanceQuery
distance
in interface DistanceQuery<O,DoubleDistance>
distance
in class AbstractDistanceQuery<O,DoubleDistance>
id1
- first object idid2
- second object idpublic DoubleDistance getDistanceFactory()
DistanceQuery
getDistanceFactory
in interface DistanceQuery<O,DoubleDistance>
getDistanceFactory
in class AbstractDistanceQuery<O,DoubleDistance>