de.lmu.ifi.dbs.elki.database.query.distance
Class DBIDDistanceQuery<D extends Distance<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
de.lmu.ifi.dbs.elki.database.query.distance.AbstractDistanceQuery<O,D>
de.lmu.ifi.dbs.elki.database.query.distance.AbstractDatabaseDistanceQuery<DBID,D>
de.lmu.ifi.dbs.elki.database.query.distance.DBIDDistanceQuery<D>
- Type Parameters:
D
- Distance result type.
- All Implemented Interfaces:
- DatabaseQuery, DistanceQuery<DBID,D>
public class DBIDDistanceQuery<D extends Distance<D>>
- extends AbstractDatabaseDistanceQuery<DBID,D>
Run a distance query based on DBIDs
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
distanceFunction
protected final DBIDDistanceFunction<D extends Distance<D>> distanceFunction
- The distance function we use.
DBIDDistanceQuery
public DBIDDistanceQuery(Relation<DBID> relation,
DBIDDistanceFunction<D> distanceFunction)
- Constructor.
- Parameters:
relation
- Database to use.distanceFunction
- Our distance function
distance
public D distance(DBID id1,
DBID id2)
- Description copied from class:
AbstractDistanceQuery
- Returns the distance between the two objects specified by their object ids.
- Specified by:
distance
in interface DistanceQuery<DBID,D extends Distance<D>>
- Overrides:
distance
in class AbstractDatabaseDistanceQuery<DBID,D extends Distance<D>>
- Parameters:
id1
- first objectid2
- second object
- Returns:
- the distance between the two objects specified by their object ids
getDistanceFunction
public DBIDDistanceFunction<D> getDistanceFunction()
- Description copied from interface:
DistanceQuery
- Get the inner distance function.
- Returns:
- Distance function