
O - Object typepublic class DoubleDistanceMetricalIndexKNNQuery<O> extends AbstractDistanceKNNQuery<O,DoubleDistance>
| Modifier and Type | Field and Description |
|---|---|
protected PrimitiveDoubleDistanceFunction<? super O> |
distf
Distance function
|
protected AbstractMTree<O,DoubleDistance,?,?,?> |
index
The index to use
|
distanceQueryrelationHINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE| Constructor and Description |
|---|
DoubleDistanceMetricalIndexKNNQuery(AbstractMTree<O,DoubleDistance,?,?,?> index,
DistanceQuery<O,DoubleDistance> distanceQuery,
PrimitiveDoubleDistanceFunction<? super O> distf)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
KNNList<DoubleDistance> |
getKNNForObject(O q,
int k)
Get the k nearest neighbors for a particular id.
|
getKNNForBulkDBIDs, getKNNForDBIDgetRelationprotected final AbstractMTree<O,DoubleDistance,?,?,?> index
protected PrimitiveDoubleDistanceFunction<? super O> distf
public DoubleDistanceMetricalIndexKNNQuery(AbstractMTree<O,DoubleDistance,?,?,?> index, DistanceQuery<O,DoubleDistance> distanceQuery, PrimitiveDoubleDistanceFunction<? super O> distf)
index - Index to usedistanceQuery - Distance query useddistf - Distance functionpublic KNNList<DoubleDistance> getKNNForObject(O q, int k)
KNNQuerygetKNNForObject in interface KNNQuery<O,DoubleDistance>getKNNForObject in class AbstractDistanceKNNQuery<O,DoubleDistance>q - Query objectk - Number of neighbors requested