Package elki.database.query.rknn
Class LinearScanRKNNByObject<O>
- java.lang.Object
-
- elki.database.query.rknn.LinearScanRKNNByObject<O>
-
- Type Parameters:
O
- relation object type
- All Implemented Interfaces:
LinearScanQuery
,RKNNSearcher<O>
public class LinearScanRKNNByObject<O> extends java.lang.Object implements RKNNSearcher<O>, LinearScanQuery
Default linear scan RKNN query class.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private DistanceQuery<O>
distanceQuery
Hold the distance function to be used.private KNNSearcher<DBIDRef>
knnQuery
KNN query we use.
-
Constructor Summary
Constructors Constructor Description LinearScanRKNNByObject(DistanceQuery<O> distanceQuery, KNNSearcher<DBIDRef> knnQuery)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoubleDBIDList
getRKNN(O obj, int k)
Get the reverse k nearest neighbors for a particular object.
-
-
-
Field Detail
-
distanceQuery
private DistanceQuery<O> distanceQuery
Hold the distance function to be used.
-
knnQuery
private KNNSearcher<DBIDRef> knnQuery
KNN query we use.
-
-
Constructor Detail
-
LinearScanRKNNByObject
public LinearScanRKNNByObject(DistanceQuery<O> distanceQuery, KNNSearcher<DBIDRef> knnQuery)
Constructor.- Parameters:
distanceQuery
- Distance function to useknnQuery
- kNN query to use.
-
-
Method Detail
-
getRKNN
public DoubleDBIDList getRKNN(O obj, int k)
Description copied from interface:RKNNSearcher
Get the reverse k nearest neighbors for a particular object.- Specified by:
getRKNN
in interfaceRKNNSearcher<O>
- Parameters:
obj
- query objectk
- number of neighbors requested- Returns:
- reverse k nearest neighbors
-
-