Package elki.database.query.distance
Interface DistanceQuery<O>
-
- Type Parameters:
O
- Input data type
- All Known Subinterfaces:
DatabaseDistanceQuery<O>
,DistanceSimilarityQuery<O>
,IndexBasedDistance.Instance<T,I>
,SpatialDistanceQuery<V>
- All Known Implementing Classes:
AbstractDatabaseDistance.Instance
,AbstractIndexBasedDistance.Instance
,AbstractSimilarityAdapter.Instance
,ArccosSimilarityAdapter.Instance
,CLARA.CachedDistanceQuery
,DBIDDistanceQuery
,DBIDRangeDistanceQuery
,LinearSimilarityAdapter.Instance
,LnSimilarityAdapter.Instance
,PrecomputedDistanceMatrix.PrecomputedDistanceQuery
,PrimitiveDistanceQuery
,PrimitiveDistanceSimilarityQuery
,SharedNearestNeighborJaccardDistance.Instance
,SpatialPrimitiveDistanceQuery
,SpatialPrimitiveDistanceSimilarityQuery
public interface DistanceQuery<O>
A distance query serves as adapter layer for database and primitive distances.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
distance(DBIDRef id1, DBIDRef id2)
Returns the distance between the two objects specified by their object ids.double
distance(DBIDRef id1, O o2)
Returns the distance between the two objects specified by their object ids.double
distance(O o1, DBIDRef id2)
Returns the distance between the two objects specified by their object ids.double
distance(O o1, O o2)
Returns the distance between the two objects specified by their object ids.Distance<? super O>
getDistance()
Get the inner distance function.Relation<? extends O>
getRelation()
Access the underlying data query.
-
-
-
Method Detail
-
distance
double distance(DBIDRef id1, DBIDRef id2)
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
-
distance
double distance(O o1, DBIDRef id2)
Returns the distance between the two objects specified by their object ids.- Parameters:
o1
- first objectid2
- second object id- Returns:
- the distance between the two objects specified by their object ids
-
distance
double distance(DBIDRef id1, O o2)
Returns the distance between the two objects specified by their object ids.- Parameters:
id1
- first object ido2
- second object- Returns:
- the distance between the two objects specified by their object ids
-
distance
double distance(O o1, O o2)
Returns the distance between the two objects specified by their object ids.- Parameters:
o1
- first objecto2
- second object- Returns:
- the distance between the two objects specified by their object ids
-
getDistance
Distance<? super O> getDistance()
Get the inner distance function.- Returns:
- Distance function
-
-