Class CoverTree.CoverTreeKNNObjectSearcher
- java.lang.Object
-
- elki.index.tree.metrical.covertree.CoverTree.CoverTreeKNNSearcher
-
- elki.index.tree.metrical.covertree.CoverTree.CoverTreeKNNObjectSearcher
-
- All Implemented Interfaces:
KNNSearcher<O>
public class CoverTree.CoverTreeKNNObjectSearcher extends CoverTree.CoverTreeKNNSearcher implements KNNSearcher<O>
KNN Query class.- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description CoverTreeKNNObjectSearcher()
-
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.protected double
queryDistance(DBIDRef it)
Compute distance to query object.-
Methods inherited from class elki.index.tree.metrical.covertree.CoverTree.CoverTreeKNNSearcher
doSearch
-
-
-
-
Field Detail
-
query
private O query
Query object.
-
-
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
-
queryDistance
protected double queryDistance(DBIDRef it)
Description copied from class:CoverTree.CoverTreeKNNSearcher
Compute distance to query object.- Specified by:
queryDistance
in classCoverTree.CoverTreeKNNSearcher
- Parameters:
it
- Candidate- Returns:
- Distance
-
-