Class CoverTree.CoverTreeKNNDBIDSearcher
- java.lang.Object
-
- elki.index.tree.metrical.covertree.CoverTree.CoverTreeKNNSearcher
-
- elki.index.tree.metrical.covertree.CoverTree.CoverTreeKNNDBIDSearcher
-
- All Implemented Interfaces:
KNNSearcher<DBIDRef>
public class CoverTree.CoverTreeKNNDBIDSearcher extends CoverTree.CoverTreeKNNSearcher implements KNNSearcher<DBIDRef>
KNN Query class.- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description CoverTreeKNNDBIDSearcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KNNList
getKNN(DBIDRef query, 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 DBIDRef query
Query reference.
-
-
Method Detail
-
getKNN
public KNNList getKNN(DBIDRef query, int k)
Description copied from interface:KNNSearcher
Get the k nearest neighbors for a particular object.- Specified by:
getKNN
in interfaceKNNSearcher<DBIDRef>
- Parameters:
query
- 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
-
-