Package elki.index.idistance
Class InMemoryIDistanceIndex.IDistanceKNNSearcher
- java.lang.Object
-
- elki.index.AbstractRefiningIndex.AbstractRefiningQuery
-
- elki.index.idistance.InMemoryIDistanceIndex.IDistanceKNNSearcher
-
- All Implemented Interfaces:
KNNSearcher<O>
- Enclosing class:
- InMemoryIDistanceIndex<O>
protected class InMemoryIDistanceIndex.IDistanceKNNSearcher extends AbstractRefiningIndex.AbstractRefiningQuery implements KNNSearcher<O>
kNN query implementation.- Author:
- Erich Schubert
-
-
Field Summary
-
Fields inherited from class elki.index.AbstractRefiningIndex.AbstractRefiningQuery
distanceQuery
-
-
Constructor Summary
Constructors Constructor Description IDistanceKNNSearcher(DistanceQuery<O> distanceQuery)
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.-
Methods inherited from class elki.index.AbstractRefiningIndex.AbstractRefiningQuery
incRefinements, refine
-
-
-
-
Constructor Detail
-
IDistanceKNNSearcher
public IDistanceKNNSearcher(DistanceQuery<O> distanceQuery)
Constructor.- Parameters:
distanceQuery
- Distance 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
-
-