Package elki.database.query.rknn
Class LinearScanRKNNByDBID<O>
- java.lang.Object
-
- elki.database.query.rknn.LinearScanRKNNByDBID<O>
-
- Type Parameters:
O
- relation object type
- All Implemented Interfaces:
LinearScanQuery
,RKNNSearcher<DBIDRef>
public class LinearScanRKNNByDBID<O> extends java.lang.Object implements RKNNSearcher<DBIDRef>, 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 LinearScanRKNNByDBID(DistanceQuery<O> distanceQuery, KNNSearcher<DBIDRef> knnQuery)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoubleDBIDList
getRKNN(DBIDRef id, 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
-
LinearScanRKNNByDBID
public LinearScanRKNNByDBID(DistanceQuery<O> distanceQuery, KNNSearcher<DBIDRef> knnQuery)
Constructor.- Parameters:
distanceQuery
- Distance function to useknnQuery
- kNN query to use.
-
-
Method Detail
-
getRKNN
public DoubleDBIDList getRKNN(DBIDRef id, int k)
Description copied from interface:RKNNSearcher
Get the reverse k nearest neighbors for a particular object.- Specified by:
getRKNN
in interfaceRKNNSearcher<O>
- Parameters:
id
- query objectk
- number of neighbors requested- Returns:
- reverse k nearest neighbors
-
-