public class PreprocessorRKNNQuery<O,D extends Distance<D>> extends AbstractDataBasedQuery<O> implements RKNNQuery<O,D>
Modifier and Type | Field and Description |
---|---|
private MaterializeKNNAndRKNNPreprocessor<O,D> |
preprocessor
The last preprocessor result
|
private boolean |
warned
Warn only once.
|
relation
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,D> preprocessor)
Constructor.
|
PreprocessorRKNNQuery(Relation<O> database,
MaterializeKNNAndRKNNPreprocessor<O,D> preprocessor)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
List<? extends DistanceDBIDList<D>> |
getRKNNForBulkDBIDs(ArrayDBIDs ids,
int k)
Bulk query method for reverse k nearest neighbors for ids.
|
DistanceDBIDList<D> |
getRKNNForDBID(DBIDRef id,
int k)
Get the reverse k nearest neighbors for a particular id.
|
DistanceDBIDList<D> |
getRKNNForObject(O obj,
int k)
Get the reverse k nearest neighbors for a particular object.
|
getRelation
private final MaterializeKNNAndRKNNPreprocessor<O,D extends Distance<D>> preprocessor
private boolean warned
public PreprocessorRKNNQuery(Relation<O> database, MaterializeKNNAndRKNNPreprocessor<O,D> preprocessor)
database
- Database to querypreprocessor
- Preprocessor instance to usepublic PreprocessorRKNNQuery(Relation<O> database, MaterializeKNNAndRKNNPreprocessor.Factory<O,D> preprocessor)
database
- Database to querypreprocessor
- Preprocessor to usepublic DistanceDBIDList<D> getRKNNForDBID(DBIDRef id, int k)
RKNNQuery
public DistanceDBIDList<D> getRKNNForObject(O obj, int k)
RKNNQuery
public List<? extends DistanceDBIDList<D>> getRKNNForBulkDBIDs(ArrayDBIDs ids, int k)
RKNNQuery