O - Object typepublic abstract class AbstractMaterializeKNNPreprocessor<O> extends AbstractPreprocessorIndex<O,KNNList> implements KNNIndex<O>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractMaterializeKNNPreprocessor.Factory<O>
The parameterizable factory.
|
| Modifier and Type | Field and Description |
|---|---|
protected DistanceFunction<? super O> |
distanceFunction
The distance function to be used.
|
protected DistanceQuery<O> |
distanceQuery
The distance query we used.
|
protected int |
k
The query k value.
|
relation, storage| Constructor and Description |
|---|
AbstractMaterializeKNNPreprocessor(Relation<O> relation,
DistanceFunction<? super O> distanceFunction,
int k)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
createStorage()
Create the default storage.
|
KNNList |
get(DBIDRef id)
Get the k nearest neighbors.
|
DistanceQuery<O> |
getDistanceQuery()
The distance query we used.
|
int |
getK()
Get the value of 'k' supported by this preprocessor.
|
KNNQuery<O> |
getKNNQuery(DistanceQuery<O> distQ,
java.lang.Object... hints)
Get a KNN query object for the given distance query and k.
|
void |
initialize()
Initialize the index.
|
protected abstract void |
preprocess()
Perform the preprocessing step.
|
getLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlogStatisticsgetLongName, getShortNameprotected final int k
protected final DistanceFunction<? super O> distanceFunction
protected final DistanceQuery<O> distanceQuery
public AbstractMaterializeKNNPreprocessor(Relation<O> relation, DistanceFunction<? super O> distanceFunction, int k)
relation - RelationdistanceFunction - Distance functionk - kpublic DistanceQuery<O> getDistanceQuery()
public int getK()
protected abstract void preprocess()
public KNNList get(DBIDRef id)
id - Object IDvoid createStorage()
public void initialize()
Indexinitialize in interface Indexpublic KNNQuery<O> getKNNQuery(DistanceQuery<O> distQ, java.lang.Object... hints)
KNNIndexgetKNNQuery in interface KNNIndex<O>distQ - Distance queryhints - Hints for the optimizernullCopyright © 2019 ELKI Development Team. License information.