Package elki.index.projected
Class ProjectedIndex.ProjectedKNNByObject
- java.lang.Object
-
- elki.index.projected.ProjectedIndex.ProjectedKNNByObject
-
- All Implemented Interfaces:
KNNSearcher<O>
- Enclosing class:
- ProjectedIndex<O,I>
class ProjectedIndex.ProjectedKNNByObject extends java.lang.Object implements KNNSearcher<O>
Class to proxy kNN queries.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) DistanceQuery<O>
distq
Distance query for refinement.(package private) KNNSearcher<I>
inner
Inner kNN query.
-
Constructor Summary
Constructors Constructor Description ProjectedKNNByObject(DistanceQuery<O> distanceQuery, KNNSearcher<I> inner)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KNNList
getKNN(O obj, int k)
Get the k nearest neighbors for a particular object.
-
-
-
Field Detail
-
inner
KNNSearcher<I> inner
Inner kNN query.
-
distq
DistanceQuery<O> distq
Distance query for refinement.
-
-
Constructor Detail
-
ProjectedKNNByObject
public ProjectedKNNByObject(DistanceQuery<O> distanceQuery, KNNSearcher<I> inner)
Constructor.- Parameters:
inner
- Inner kNN query.
-
-
Method Detail
-
getKNN
public KNNList getKNN(O obj, int k)
Description copied from interface:KNNSearcher
Get the k nearest neighbors for a particular object.- Specified by:
getKNN
in interfaceKNNSearcher<O>
- Parameters:
obj
- query objectk
- Number of neighbors requested- Returns:
- neighbors
-
-