Package elki.database.query.knn
Class PreprocessorSquaredKNNQuery
- java.lang.Object
-
- elki.database.query.knn.PreprocessorKNNQuery
-
- elki.database.query.knn.PreprocessorSquaredKNNQuery
-
- All Implemented Interfaces:
KNNSearcher<DBIDRef>
public class PreprocessorSquaredKNNQuery extends PreprocessorKNNQuery
Use the squared values of precomputed kNN.- Since:
- 0.8.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private static LoggingLOGClass logger-
Fields inherited from class elki.database.query.knn.PreprocessorKNNQuery
relation
-
-
Constructor Summary
Constructors Constructor Description PreprocessorSquaredKNNQuery(Relation<?> relation, AbstractMaterializeKNNPreprocessor<?> preprocessor)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KNNListgetKNN(DBIDRef id, int k)Get the k nearest neighbors for a particular object.protected LogginggetLogger()Get the class logger.-
Methods inherited from class elki.database.query.knn.PreprocessorKNNQuery
getPreprocessor
-
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Class logger
-
-
Constructor Detail
-
PreprocessorSquaredKNNQuery
public PreprocessorSquaredKNNQuery(Relation<?> relation, AbstractMaterializeKNNPreprocessor<?> preprocessor)
Constructor.- Parameters:
relation- Relation to querypreprocessor- Preprocessor instance to use
-
-
Method Detail
-
getKNN
public KNNList getKNN(DBIDRef id, int k)
Description copied from interface:KNNSearcherGet the k nearest neighbors for a particular object.- Specified by:
getKNNin interfaceKNNSearcher<DBIDRef>- Overrides:
getKNNin classPreprocessorKNNQuery- Parameters:
id- query objectk- Number of neighbors requested- Returns:
- neighbors
-
getLogger
protected Logging getLogger()
Get the class logger. Override when subclassing!- Overrides:
getLoggerin classPreprocessorKNNQuery- Returns:
- Class logger.
-
-