de.lmu.ifi.dbs.elki.distance.distancefunction
Class MinKDistance.Instance<T extends O>
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<T,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.MinKDistance.Instance<T>
- All Implemented Interfaces:
- DatabaseQuery, DistanceQuery<T,D>
- Enclosing class:
- MinKDistance<O,D extends Distance<D>>
public class MinKDistance.Instance<T extends O>
- extends AbstractDatabaseDistanceQuery<T,D>
Instance for an actual database.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
knnQuery
private KNNQuery<T extends O,D extends Distance<D>> knnQuery
- KNN query instance
k
private int k
- Value for k
MinKDistance.Instance
public MinKDistance.Instance(Relation<T> relation,
int k,
DistanceFunction<? super O,D> parentDistance)
- Constructor.
- Parameters:
relation
- Databasek
- Value of k
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<T extends O,D extends Distance<D>>
- Specified by:
distance
in class AbstractDistanceQuery<T extends O,D extends Distance<D>>
- Parameters:
id1
- first object idid2
- second object id
- Returns:
- the distance between the two objects specified by their object ids
getDistanceFunction
public DistanceFunction<? super T,D> getDistanceFunction()
- Description copied from interface:
DistanceQuery
- Get the inner distance function.
- Returns:
- Distance function