|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
de.lmu.ifi.dbs.elki.database.query.knn.PreprocessorKNNQuery<O,D>
public class PreprocessorKNNQuery<O,D extends Distance<D>>

Instance for a particular database, invoking the preprocessor.
| Field Summary | |
|---|---|
private MaterializeKNNPreprocessor<O,D> |
preprocessor
The last preprocessor result |
private boolean |
warned
Warn only once. |
| Fields inherited from class de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery |
|---|
relation |
| Fields inherited from interface de.lmu.ifi.dbs.elki.database.query.DatabaseQuery |
|---|
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE |
| Constructor Summary | |
|---|---|
PreprocessorKNNQuery(Relation<O> database,
MaterializeKNNPreprocessor.Factory<O,D> preprocessor)
Constructor. |
|
PreprocessorKNNQuery(Relation<O> database,
MaterializeKNNPreprocessor<O,D> preprocessor)
Constructor. |
|
| Method Summary | |
|---|---|
D |
getDistanceFactory()
Get the distance data type of the function. |
DistanceQuery<O,D> |
getDistanceQuery()
Get the distance query for this function. |
List<List<DistanceResultPair<D>>> |
getKNNForBulkDBIDs(ArrayDBIDs ids,
int k)
Bulk query method |
void |
getKNNForBulkHeaps(Map<DBID,KNNHeap<D>> heaps)
Bulk query method configured by a map. |
List<DistanceResultPair<D>> |
getKNNForDBID(DBID id,
int k)
Get the k nearest neighbors for a particular id. |
List<DistanceResultPair<D>> |
getKNNForObject(O obj,
int k)
Get the k nearest neighbors for a particular id. |
AbstractMaterializeKNNPreprocessor<O,D> |
getPreprocessor()
Get the preprocessor instance. |
| Methods inherited from class de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery |
|---|
getRelation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.lmu.ifi.dbs.elki.database.query.knn.KNNQuery |
|---|
getRelation |
| Field Detail |
|---|
private final MaterializeKNNPreprocessor<O,D extends Distance<D>> preprocessor
private boolean warned
| Constructor Detail |
|---|
public PreprocessorKNNQuery(Relation<O> database,
MaterializeKNNPreprocessor<O,D> preprocessor)
database - Database to querypreprocessor - Preprocessor instance to use
public PreprocessorKNNQuery(Relation<O> database,
MaterializeKNNPreprocessor.Factory<O,D> preprocessor)
database - Database to querypreprocessor - Preprocessor to use| Method Detail |
|---|
public List<DistanceResultPair<D>> getKNNForDBID(DBID id,
int k)
KNNQuery
getKNNForDBID in interface KNNQuery<O,D extends Distance<D>>id - query object IDk - Number of neighbors requested
public List<List<DistanceResultPair<D>>> getKNNForBulkDBIDs(ArrayDBIDs ids,
int k)
KNNQuery
getKNNForBulkDBIDs in interface KNNQuery<O,D extends Distance<D>>ids - query object IDsk - Number of neighbors requested
public void getKNNForBulkHeaps(Map<DBID,KNNHeap<D>> heaps)
KNNQuery
getKNNForBulkHeaps in interface KNNQuery<O,D extends Distance<D>>heaps - Map of heaps to fill.
public List<DistanceResultPair<D>> getKNNForObject(O obj,
int k)
KNNQuery
getKNNForObject in interface KNNQuery<O,D extends Distance<D>>obj - Query objectk - Number of neighbors requested
public AbstractMaterializeKNNPreprocessor<O,D> getPreprocessor()
public D getDistanceFactory()
KNNQuery
getDistanceFactory in interface KNNQuery<O,D extends Distance<D>>public DistanceQuery<O,D> getDistanceQuery()
KNNQuery
getDistanceQuery in interface KNNQuery<O,D extends Distance<D>>
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||