public class PreprocessorRKNNQuery<O> extends java.lang.Object implements RKNNQuery<O>
Modifier and Type | Field and Description |
---|---|
private MaterializeKNNAndRKNNPreprocessor<O> |
preprocessor
The last preprocessor result
|
protected Relation<? extends O> |
relation
The data to use for this query
|
private boolean |
warned
Warn only once.
|
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
PreprocessorRKNNQuery(Relation<O> database,
MaterializeKNNAndRKNNPreprocessor.Factory<O> preprocessor)
Constructor.
|
PreprocessorRKNNQuery(Relation<O> relation,
MaterializeKNNAndRKNNPreprocessor<O> preprocessor)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<? extends DoubleDBIDList> |
getRKNNForBulkDBIDs(ArrayDBIDs ids,
int k)
Bulk query method for reverse k nearest neighbors for ids.
|
DoubleDBIDList |
getRKNNForDBID(DBIDRef id,
int k)
Get the reverse k nearest neighbors for a particular id.
|
DoubleDBIDList |
getRKNNForObject(O obj,
int k)
Get the reverse k nearest neighbors for a particular object.
|
private final MaterializeKNNAndRKNNPreprocessor<O> preprocessor
private boolean warned
public PreprocessorRKNNQuery(Relation<O> relation, MaterializeKNNAndRKNNPreprocessor<O> preprocessor)
relation
- Relation to querypreprocessor
- Preprocessor instance to usepublic PreprocessorRKNNQuery(Relation<O> database, MaterializeKNNAndRKNNPreprocessor.Factory<O> preprocessor)
database
- Database to querypreprocessor
- Preprocessor to usepublic DoubleDBIDList getRKNNForDBID(DBIDRef id, int k)
RKNNQuery
getRKNNForDBID
in interface RKNNQuery<O>
id
- query object IDk
- number of neighbors requestedpublic DoubleDBIDList getRKNNForObject(O obj, int k)
RKNNQuery
getRKNNForObject
in interface RKNNQuery<O>
obj
- query object instancek
- number of neighbors requestedpublic java.util.List<? extends DoubleDBIDList> getRKNNForBulkDBIDs(ArrayDBIDs ids, int k)
RKNNQuery
getRKNNForBulkDBIDs
in interface RKNNQuery<O>
ids
- query object IDsk
- number of neighbors requestedCopyright © 2019 ELKI Development Team. License information.