Package elki.distance.adapter
Class AbstractSimilarityAdapter.Instance<O>
- java.lang.Object
-
- elki.distance.AbstractDatabaseDistance.Instance<O>
-
- elki.distance.adapter.AbstractSimilarityAdapter.Instance<O>
-
- Type Parameters:
O
- Object type
- All Implemented Interfaces:
DatabaseDistanceQuery<O>
,DistanceQuery<O>
- Direct Known Subclasses:
ArccosSimilarityAdapter.Instance
,LinearSimilarityAdapter.Instance
,LnSimilarityAdapter.Instance
- Enclosing class:
- AbstractSimilarityAdapter<O>
public abstract static class AbstractSimilarityAdapter.Instance<O> extends AbstractDatabaseDistance.Instance<O>
Inner proxy class for SNN distance function.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private SimilarityQuery<? super O>
similarityQuery
The similarity query we use.-
Fields inherited from class elki.distance.AbstractDatabaseDistance.Instance
parent, relation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description double
distance(DBIDRef id1, DBIDRef id2)
Returns the distance between the two objects specified by their object ids.abstract double
transform(double similarity)
Transformation function.-
Methods inherited from class elki.distance.AbstractDatabaseDistance.Instance
getDistance, getRelation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.database.query.distance.DatabaseDistanceQuery
distance, distance, distance
-
-
-
-
Field Detail
-
similarityQuery
private SimilarityQuery<? super O> similarityQuery
The similarity query we use.
-
-
Method Detail
-
transform
public abstract double transform(double similarity)
Transformation function.- Parameters:
similarity
- Similarity value- Returns:
- Distance value
-
distance
public double distance(DBIDRef id1, DBIDRef id2)
Description copied from interface:DistanceQuery
Returns the distance between the two objects specified by their object ids.- Parameters:
id1
- first object idid2
- second object id- Returns:
- the distance between the two objects specified by their object ids
-
-