Class SimplifiedCoverTree.CoverTreeKNNDBIDSearcher
- java.lang.Object
-
- elki.index.tree.metrical.covertree.SimplifiedCoverTree.CoverTreeKNNSearcher
-
- elki.index.tree.metrical.covertree.SimplifiedCoverTree.CoverTreeKNNDBIDSearcher
-
- All Implemented Interfaces:
KNNSearcher<DBIDRef>
- Enclosing class:
- SimplifiedCoverTree<O>
public class SimplifiedCoverTree.CoverTreeKNNDBIDSearcher extends SimplifiedCoverTree.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.SimplifiedCoverTree.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:SimplifiedCoverTree.CoverTreeKNNSearcher
Compute distance to query object.- Specified by:
queryDistance
in classSimplifiedCoverTree.CoverTreeKNNSearcher
- Parameters:
it
- Candidate- Returns:
- Distance
-
-