Package elki.database.query.rknn
Class PreprocessorRKNNQuery<O>
- java.lang.Object
-
- elki.database.query.rknn.PreprocessorRKNNQuery<O>
-
- All Implemented Interfaces:
RKNNSearcher<DBIDRef>
public class PreprocessorRKNNQuery<O> extends java.lang.Object implements RKNNSearcher<DBIDRef>
Instance for a particular database, invoking the preprocessor.- Since:
- 0.4.0
- Author:
- Elke Achtert
-
-
Field Summary
Fields Modifier and Type Field Description private MaterializeKNNAndRKNNPreprocessor<O>
preprocessor
The last preprocessor resultprotected Relation<? extends O>
relation
The data to use for this queryprivate boolean
warned
Warn only once.
-
Constructor Summary
Constructors Constructor Description PreprocessorRKNNQuery(Relation<O> database, MaterializeKNNAndRKNNPreprocessor.Factory<O> preprocessor)
Constructor.PreprocessorRKNNQuery(Relation<O> relation, MaterializeKNNAndRKNNPreprocessor<O> preprocessor)
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
-
preprocessor
private final MaterializeKNNAndRKNNPreprocessor<O> preprocessor
The last preprocessor result
-
warned
private boolean warned
Warn only once.
-
-
Constructor Detail
-
PreprocessorRKNNQuery
public PreprocessorRKNNQuery(Relation<O> relation, MaterializeKNNAndRKNNPreprocessor<O> preprocessor)
Constructor.- Parameters:
relation
- Relation to querypreprocessor
- Preprocessor instance to use
-
PreprocessorRKNNQuery
public PreprocessorRKNNQuery(Relation<O> database, MaterializeKNNAndRKNNPreprocessor.Factory<O> preprocessor)
Constructor.- Parameters:
database
- Database to querypreprocessor
- Preprocessor 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
-
-