public abstract class AbstractDistanceKNNQuery<O,D extends Distance<D>> extends AbstractDataBasedQuery<O> implements KNNQuery<O,D>
Modifier and Type | Field and Description |
---|---|
protected DistanceQuery<O,D> |
distanceQuery
Hold the distance function to be used.
|
relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
AbstractDistanceKNNQuery(DistanceQuery<O,D> distanceQuery)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
D |
getDistanceFactory()
Get the distance data type of the function.
|
DistanceQuery<O,D> |
getDistanceQuery()
Get the distance query for this function.
|
abstract List<DistanceResultPair<D>> |
getKNNForDBID(DBID id,
int k)
Get the k nearest neighbors for a particular id.
|
abstract List<DistanceResultPair<D>> |
getKNNForObject(O obj,
int k)
Get the k nearest neighbors for a particular id.
|
getRelation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKNNForBulkDBIDs, getKNNForBulkHeaps, getRelation
protected DistanceQuery<O,D extends Distance<D>> distanceQuery
public AbstractDistanceKNNQuery(DistanceQuery<O,D> distanceQuery)
distanceQuery
- Distance query usedpublic abstract List<DistanceResultPair<D>> getKNNForDBID(DBID id, int k)
KNNQuery
public abstract List<DistanceResultPair<D>> getKNNForObject(O obj, int k)
KNNQuery
public DistanceQuery<O,D> getDistanceQuery()
KNNQuery