Package elki.index.projected
Class ProjectedIndex.ProjectedKNNByDBID
- java.lang.Object
-
- elki.index.projected.ProjectedIndex.ProjectedKNNByDBID
-
- All Implemented Interfaces:
KNNSearcher<DBIDRef>
- Enclosing class:
- ProjectedIndex<O,I>
class ProjectedIndex.ProjectedKNNByDBID extends java.lang.Object implements KNNSearcher<DBIDRef>
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 ProjectedKNNByDBID(DistanceQuery<O> distanceQuery, KNNSearcher<I> inner)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KNNList
getKNN(DBIDRef id, 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
-
ProjectedKNNByDBID
public ProjectedKNNByDBID(DistanceQuery<O> distanceQuery, KNNSearcher<I> inner)
Constructor.- Parameters:
inner
- Inner kNN query.
-
-
Method Detail
-
getKNN
public KNNList getKNN(DBIDRef id, int k)
Description copied from interface:KNNSearcher
Get the k nearest neighbors for a particular object.- Specified by:
getKNN
in interfaceKNNSearcher<DBIDRef>
- Parameters:
id
- query objectk
- Number of neighbors requested- Returns:
- neighbors
-
-