public class DBIDDistanceQuery extends java.lang.Object implements DatabaseDistanceQuery<DBID>
Modifier and Type | Field and Description |
---|---|
protected DBIDDistanceFunction |
distanceFunction
The distance function we use.
|
protected Relation<DBID> |
relation
Relation to query.
|
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
DBIDDistanceQuery(Relation<DBID> relation,
DBIDDistanceFunction distanceFunction)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
distance(DBIDRef id1,
DBIDRef id2)
Returns the distance between the two objects specified by their object ids.
|
DBIDDistanceFunction |
getDistanceFunction()
Get the inner distance function.
|
Relation<? extends DBID> |
getRelation()
Access the underlying data query.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
distance, distance, distance
protected final DBIDDistanceFunction distanceFunction
public DBIDDistanceQuery(Relation<DBID> relation, DBIDDistanceFunction distanceFunction)
relation
- Database to use.distanceFunction
- Our distance functionpublic double distance(DBIDRef id1, DBIDRef id2)
DistanceQuery
distance
in interface DistanceQuery<DBID>
id1
- first object idid2
- second object idpublic Relation<? extends DBID> getRelation()
DistanceQuery
getRelation
in interface DistanceQuery<DBID>
public DBIDDistanceFunction getDistanceFunction()
DistanceQuery
getDistanceFunction
in interface DistanceQuery<DBID>
Copyright © 2019 ELKI Development Team. License information.