
O - Data object typepublic class PreprocessorKNNQuery<O> extends Object implements KNNQuery<O>
| Modifier and Type | Field and Description |
|---|---|
private AbstractMaterializeKNNPreprocessor<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 |
|---|
PreprocessorKNNQuery(Relation<O> relation,
AbstractMaterializeKNNPreprocessor<O> preprocessor)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
List<KNNList> |
getKNNForBulkDBIDs(ArrayDBIDs ids,
int k)
Bulk query method
|
KNNList |
getKNNForDBID(DBIDRef id,
int k)
Get the k nearest neighbors for a particular id.
|
KNNList |
getKNNForObject(O obj,
int k)
Get the k nearest neighbors for a particular id.
|
AbstractMaterializeKNNPreprocessor<O> |
getPreprocessor()
Get the preprocessor instance.
|
private final AbstractMaterializeKNNPreprocessor<O> preprocessor
private boolean warned
public PreprocessorKNNQuery(Relation<O> relation, AbstractMaterializeKNNPreprocessor<O> preprocessor)
relation - Relation to querypreprocessor - Preprocessor instance to usepublic KNNList getKNNForDBID(DBIDRef id, int k)
KNNQuerygetKNNForDBID in interface KNNQuery<O>id - query object IDk - Number of neighbors requestedpublic List<KNNList> getKNNForBulkDBIDs(ArrayDBIDs ids, int k)
KNNQuerygetKNNForBulkDBIDs in interface KNNQuery<O>ids - query object IDsk - Number of neighbors requestedpublic KNNList getKNNForObject(O obj, int k)
KNNQuerygetKNNForObject in interface KNNQuery<O>obj - Query objectk - Number of neighbors requestedpublic AbstractMaterializeKNNPreprocessor<O> getPreprocessor()
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.