Package elki.database.query.distance
Class DBIDRangeDistanceQuery
- java.lang.Object
-
- elki.database.query.distance.DBIDDistanceQuery
-
- elki.database.query.distance.DBIDRangeDistanceQuery
-
- All Implemented Interfaces:
DatabaseDistanceQuery<DBID>,DistanceQuery<DBID>
public class DBIDRangeDistanceQuery extends DBIDDistanceQuery
Run a distance query based on DBIDRanges- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected DBIDRangeDistancedistanceFunctionThe distance function we use.protected DBIDRangerangeThe DBID range we are accessing.-
Fields inherited from class elki.database.query.distance.DBIDDistanceQuery
relation
-
-
Constructor Summary
Constructors Constructor Description DBIDRangeDistanceQuery(Relation<DBID> relation, DBIDRangeDistance distanceFunction)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubledistance(DBIDRef id1, DBIDRef id2)Returns the distance between the two objects specified by their object ids.DBIDDistancegetDistance()Get the inner distance function.-
Methods inherited from class elki.database.query.distance.DBIDDistanceQuery
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
-
distanceFunction
protected final DBIDRangeDistance distanceFunction
The distance function we use.
-
range
protected final DBIDRange range
The DBID range we are accessing.
-
-
Constructor Detail
-
DBIDRangeDistanceQuery
public DBIDRangeDistanceQuery(Relation<DBID> relation, DBIDRangeDistance distanceFunction)
Constructor.- Parameters:
relation- Database to use.distanceFunction- Our distance function
-
-
Method Detail
-
distance
public double distance(DBIDRef id1, DBIDRef id2)
Description copied from interface:DistanceQueryReturns the distance between the two objects specified by their object ids.- Specified by:
distancein interfaceDistanceQuery<DBID>- Overrides:
distancein classDBIDDistanceQuery- Parameters:
id1- first object idid2- second object id- Returns:
- the distance between the two objects specified by their object ids
-
getDistance
public DBIDDistance getDistance()
Description copied from interface:DistanceQueryGet the inner distance function.- Specified by:
getDistancein interfaceDistanceQuery<DBID>- Overrides:
getDistancein classDBIDDistanceQuery- Returns:
- Distance function
-
-