O
- Object typeD
- Distance typepublic abstract class AbstractMaterializeKNNPreprocessor<O,D extends Distance<D>> extends AbstractPreprocessorIndex<O,List<DistanceResultPair<D>>> implements KNNIndex<O>
Modifier and Type | Class and Description |
---|---|
static class |
AbstractMaterializeKNNPreprocessor.Factory<O,D extends Distance<D>>
The parameterizable factory.
|
Modifier and Type | Field and Description |
---|---|
protected DistanceFunction<? super O,D> |
distanceFunction
The distance function to be used.
|
protected DistanceQuery<O,D> |
distanceQuery
The distance query we used.
|
protected int |
k
The query k value.
|
protected EventListenerList |
listenerList
Holds the listener.
|
storage
relation
Constructor and Description |
---|
AbstractMaterializeKNNPreprocessor(Relation<O> relation,
DistanceFunction<? super O,D> distanceFunction,
int k)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
D |
getDistanceFactory()
Get the distance factory.
|
DistanceQuery<O,D> |
getDistanceQuery()
The distance query we used.
|
int |
getK()
Get the value of 'k' supported by this preprocessor.
|
<S extends Distance<S>> |
getKNNQuery(DistanceQuery<O,S> distanceQuery,
Object... hints)
Get a KNN query object for the given distance query and k.
|
protected abstract void |
preprocess()
Perform the preprocessing step.
|
getLogger
delete, deleteAll, getLongName, getPageFileStatistics, getShortName, insert, insertAll
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
delete, deleteAll, getPageFileStatistics, insert, insertAll
getLongName, getShortName
protected final int k
protected final DistanceFunction<? super O,D extends Distance<D>> distanceFunction
protected final DistanceQuery<O,D extends Distance<D>> distanceQuery
protected final EventListenerList listenerList
public AbstractMaterializeKNNPreprocessor(Relation<O> relation, DistanceFunction<? super O,D> distanceFunction, int k)
relation
- RelationdistanceFunction
- Distance functionk
- kpublic D getDistanceFactory()
public DistanceQuery<O,D> getDistanceQuery()
public int getK()
protected abstract void preprocess()
public <S extends Distance<S>> KNNQuery<O,S> getKNNQuery(DistanceQuery<O,S> distanceQuery, Object... hints)
KNNIndex
getKNNQuery
in interface KNNIndex<O>
S
- Distance typedistanceQuery
- Distance queryhints
- Hints for the optimizernull