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.
|
storage
relation
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,
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.
|
getLogger
getLongName, getShortName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
logStatistics
getLongName, getShortName
protected 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()
Index
initialize
in interface Index
public KNNQuery<O> getKNNQuery(DistanceQuery<O> distQ, Object... hints)
KNNIndex
getKNNQuery
in interface KNNIndex<O>
distQ
- Distance queryhints
- Hints for the optimizernull
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.