Class EuclideanRStarTreeKNNQuery<O extends NumberVector>
- java.lang.Object
-
- elki.index.tree.spatial.rstarvariants.query.RStarTreeKNNSearcher<O>
-
- elki.index.tree.spatial.rstarvariants.query.EuclideanRStarTreeKNNQuery<O>
-
- All Implemented Interfaces:
KNNSearcher<O>
@Reference(authors="G. R. Hjaltason, H. Samet", title="Ranking in spatial databases", booktitle="4th Symp. Advances in Spatial Databases (SSD\'95)", url="https://doi.org/10.1007/3-540-60159-7_6", bibkey="DBLP:conf/ssd/HjaltasonS95") public class EuclideanRStarTreeKNNQuery<O extends NumberVector> extends RStarTreeKNNSearcher<O>
Instance of a KNN query for a particular spatial index.Reference:
G. R. Hjaltason, H. Samet
Ranking in spatial databases
4th Symp. Advances in Spatial Databases (SSD'95)- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private static SquaredEuclideanDistanceSQUAREDSquared Euclidean distance function.-
Fields inherited from class elki.index.tree.spatial.rstarvariants.query.RStarTreeKNNSearcher
distance, relation, tree
-
-
Constructor Summary
Constructors Constructor Description EuclideanRStarTreeKNNQuery(AbstractRStarTree<?,?,?> tree, Relation<? extends O> relation)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private doubleexpandNode(O object, KNNHeap knnList, DoubleIntegerMinHeap pq, double maxDist, int nodeID)KNNListgetKNN(O obj, int k)Get the k nearest neighbors for a particular object.
-
-
-
Field Detail
-
SQUARED
private static final SquaredEuclideanDistance SQUARED
Squared Euclidean distance function.
-
-
Constructor Detail
-
EuclideanRStarTreeKNNQuery
public EuclideanRStarTreeKNNQuery(AbstractRStarTree<?,?,?> tree, Relation<? extends O> relation)
Constructor.- Parameters:
tree- Index to userelation- Data relation to query
-
-
Method Detail
-
getKNN
public KNNList getKNN(O obj, int k)
Description copied from interface:KNNSearcherGet the k nearest neighbors for a particular object.- Specified by:
getKNNin interfaceKNNSearcher<O extends NumberVector>- Overrides:
getKNNin classRStarTreeKNNSearcher<O extends NumberVector>- Parameters:
obj- query objectk- Number of neighbors requested- Returns:
- neighbors
-
expandNode
private double expandNode(O object, KNNHeap knnList, DoubleIntegerMinHeap pq, double maxDist, int nodeID)
-
-