de.lmu.ifi.dbs.elki.index.preprocessed.knn
Class SpatialApproximationMaterializeKNNPreprocessor<O extends NumberVector<?,?>,D extends Distance<D>,N extends SpatialNode<N,E>,E extends SpatialEntry>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.index.AbstractIndex<O>
      extended by de.lmu.ifi.dbs.elki.index.preprocessed.AbstractPreprocessorIndex<O,List<DistanceResultPair<D>>>
          extended by de.lmu.ifi.dbs.elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor<O,D>
              extended by de.lmu.ifi.dbs.elki.index.preprocessed.knn.SpatialApproximationMaterializeKNNPreprocessor<O,D,N,E>
Type Parameters:
D - the type of distance the used distance function will return
N - the type of spatial nodes in the spatial index
E - the type of spatial entries in the spatial index
All Implemented Interfaces:
Index, KNNIndex<O>, Result

@Title(value="Spatial Approximation Materialize kNN Preprocessor")
@Description(value="Caterializes the (approximate) k nearest neighbors of objects of a database using a spatial approximation.")
public class SpatialApproximationMaterializeKNNPreprocessor<O extends NumberVector<?,?>,D extends Distance<D>,N extends SpatialNode<N,E>,E extends SpatialEntry>
extends AbstractMaterializeKNNPreprocessor<O,D>

A preprocessor for annotation of the k nearest neighbors (and their distances) to each database object. Used for example by LOF. TODO correct handling of datastore events


Nested Class Summary
static class SpatialApproximationMaterializeKNNPreprocessor.Factory<D extends Distance<D>,N extends SpatialNode<N,E>,E extends SpatialEntry>
          The actual preprocessor instance.
 
Field Summary
private static Logging logger
          Logger to use
 
Fields inherited from class de.lmu.ifi.dbs.elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor
distanceFunction, distanceQuery, k, listenerList
 
Fields inherited from class de.lmu.ifi.dbs.elki.index.preprocessed.AbstractPreprocessorIndex
storage
 
Fields inherited from class de.lmu.ifi.dbs.elki.index.AbstractIndex
relation
 
Constructor Summary
SpatialApproximationMaterializeKNNPreprocessor(Relation<O> relation, DistanceFunction<? super O,D> distanceFunction, int k)
          Constructor
 
Method Summary
protected  Logging getLogger()
          Get the classes static logger.
 String getLongName()
          A "pretty" name for the result, for use in titles, captions and menus.
 String getShortName()
          A short name for the result, useful for file names.
protected  void preprocess()
          Perform the preprocessing step.
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor
getDistanceFactory, getDistanceQuery, getK, getKNNQuery
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.AbstractIndex
delete, deleteAll, getPageFileStatistics, insert, insertAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.index.Index
delete, deleteAll, getPageFileStatistics, insert, insertAll
 

Field Detail

logger

private static final Logging logger
Logger to use

Constructor Detail

SpatialApproximationMaterializeKNNPreprocessor

public SpatialApproximationMaterializeKNNPreprocessor(Relation<O> relation,
                                                      DistanceFunction<? super O,D> distanceFunction,
                                                      int k)
Constructor

Parameters:
relation - Relation to preprocess
distanceFunction - the distance function to use
k - query k
Method Detail

preprocess

protected void preprocess()
Description copied from class: AbstractMaterializeKNNPreprocessor
Perform the preprocessing step.

Specified by:
preprocess in class AbstractMaterializeKNNPreprocessor<O extends NumberVector<?,?>,D extends Distance<D>>

getLogger

protected Logging getLogger()
Description copied from class: AbstractPreprocessorIndex
Get the classes static logger.

Specified by:
getLogger in class AbstractPreprocessorIndex<O extends NumberVector<?,?>,List<DistanceResultPair<D extends Distance<D>>>>
Returns:
Logger

getLongName

public String getLongName()
Description copied from interface: Result
A "pretty" name for the result, for use in titles, captions and menus.

Specified by:
getLongName in interface Result
Specified by:
getLongName in class AbstractIndex<O extends NumberVector<?,?>>
Returns:
result name

getShortName

public String getShortName()
Description copied from interface: Result
A short name for the result, useful for file names.

Specified by:
getShortName in interface Result
Specified by:
getShortName in class AbstractIndex<O extends NumberVector<?,?>>
Returns:
result name

Release 0.4.0 (2011-09-20_1324)