Package elki.database.query.knn
Class PreprocessorSqrtKNNQuery
- java.lang.Object
-
- elki.database.query.knn.PreprocessorKNNQuery
-
- elki.database.query.knn.PreprocessorSqrtKNNQuery
-
- All Implemented Interfaces:
KNNSearcher<DBIDRef>
public class PreprocessorSqrtKNNQuery extends PreprocessorKNNQuery
Use the square rooted values of precomputed kNN.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private static Logging
LOG
Class logger-
Fields inherited from class elki.database.query.knn.PreprocessorKNNQuery
relation
-
-
Constructor Summary
Constructors Constructor Description PreprocessorSqrtKNNQuery(Relation<?> relation, AbstractMaterializeKNNPreprocessor<?> preprocessor)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KNNList
getKNN(DBIDRef id, int k)
Get the k nearest neighbors for a particular object.protected Logging
getLogger()
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
-
PreprocessorSqrtKNNQuery
public PreprocessorSqrtKNNQuery(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:KNNSearcher
Get the k nearest neighbors for a particular object.- Specified by:
getKNN
in interfaceKNNSearcher<DBIDRef>
- Overrides:
getKNN
in classPreprocessorKNNQuery
- Parameters:
id
- query objectk
- Number of neighbors requested- Returns:
- neighbors
-
getLogger
protected Logging getLogger()
Get the class logger. Override when subclassing!- Overrides:
getLogger
in classPreprocessorKNNQuery
- Returns:
- Class logger.
-
-