Package elki.index.distancematrix
Class PrecomputedDistanceMatrix.PrecomputedDistanceQuery
- java.lang.Object
-
- elki.index.distancematrix.PrecomputedDistanceMatrix.PrecomputedDistanceQuery
-
- All Implemented Interfaces:
DatabaseDistanceQuery<O>
,DistanceQuery<O>
- Enclosing class:
- PrecomputedDistanceMatrix<O>
public class PrecomputedDistanceMatrix.PrecomputedDistanceQuery extends java.lang.Object implements DatabaseDistanceQuery<O>
Distance query using the precomputed matrix.- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description PrecomputedDistanceQuery()
-
Method Summary
All Methods Instance 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.Distance<? super O>
getDistance()
Get the inner distance function.Relation<? extends O>
getRelation()
Access the underlying data query.-
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
-
-
-
-
Method Detail
-
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.- Specified by:
distance
in interfaceDistanceQuery<O>
- Parameters:
id1
- first object idid2
- second object id- Returns:
- the distance between the two objects specified by their object ids
-
getDistance
public Distance<? super O> getDistance()
Description copied from interface:DistanceQuery
Get the inner distance function.- Specified by:
getDistance
in interfaceDistanceQuery<O>
- Returns:
- Distance function
-
getRelation
public Relation<? extends O> getRelation()
Description copied from interface:DistanceQuery
Access the underlying data query.- Specified by:
getRelation
in interfaceDistanceQuery<O>
- Returns:
- data query in use
-
-