Package elki.index.tree.metrical.vptree
Class VPTree.VPTreeKNNObjectSearcher
- java.lang.Object
-
- elki.index.tree.metrical.vptree.VPTree.VPTreeKNNSearcher
-
- elki.index.tree.metrical.vptree.VPTree.VPTreeKNNObjectSearcher
-
- All Implemented Interfaces:
KNNSearcher<O>
public class VPTree.VPTreeKNNObjectSearcher extends VPTree.VPTreeKNNSearcher implements KNNSearcher<O>
kNN search for the VP-Tree.- Author:
- Robert Gehde, Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description VPTreeKNNObjectSearcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KNNList
getKNN(O query, int k)
Get the k nearest neighbors for a particular object.protected double
queryDistance(DBIDRef p)
Compute the distance to a candidate object.-
Methods inherited from class elki.index.tree.metrical.vptree.VPTree.VPTreeKNNSearcher
vpKNNSearch
-
-
-
-
Field Detail
-
query
private O query
Current query object
-
-
Method Detail
-
getKNN
public KNNList getKNN(O query, int k)
Description copied from interface:KNNSearcher
Get the k nearest neighbors for a particular object.- Specified by:
getKNN
in interfaceKNNSearcher<O>
- Parameters:
query
- query objectk
- Number of neighbors requested- Returns:
- neighbors
-
queryDistance
protected double queryDistance(DBIDRef p)
Description copied from class:VPTree.VPTreeKNNSearcher
Compute the distance to a candidate object.- Specified by:
queryDistance
in classVPTree.VPTreeKNNSearcher
- Parameters:
p
- Object- Returns:
- Distance
-
-