Class RStarTreeKNNSearcher<O extends SpatialComparable>
- java.lang.Object
-
- elki.index.tree.spatial.rstarvariants.query.RStarTreeKNNSearcher<O>
-
- All Implemented Interfaces:
KNNSearcher<O>
- Direct Known Subclasses:
EuclideanRStarTreeKNNQuery
@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 RStarTreeKNNSearcher<O extends SpatialComparable> extends java.lang.Object implements KNNSearcher<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.4.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected SpatialPrimitiveDistance<? super O>distanceSpatial primitive distance function.protected Relation<? extends O>relationRelation we query.protected AbstractRStarTree<?,?,?>treeThe index to use
-
Constructor Summary
Constructors Constructor Description RStarTreeKNNSearcher(AbstractRStarTree<?,?,?> tree, Relation<? extends O> relation, SpatialPrimitiveDistance<? super O> distance)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
-
tree
protected final AbstractRStarTree<?,?,?> tree
The index to use
-
distance
protected final SpatialPrimitiveDistance<? super O extends SpatialComparable> distance
Spatial primitive distance function.
-
relation
protected Relation<? extends O extends SpatialComparable> relation
Relation we query.
-
-
Constructor Detail
-
RStarTreeKNNSearcher
public RStarTreeKNNSearcher(AbstractRStarTree<?,?,?> tree, Relation<? extends O> relation, SpatialPrimitiveDistance<? super O> distance)
Constructor.- Parameters:
tree- Index to userelation- Data relation to querydistance- Distance function
-
-
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 SpatialComparable>- Parameters:
obj- query objectk- Number of neighbors requested- Returns:
- neighbors
-
expandNode
private double expandNode(O object, KNNHeap knnList, DoubleIntegerMinHeap pq, double maxDist, int nodeID)
-
-