Class SpatialApproximationMaterializeKNNPreprocessor<O extends elki.data.NumberVector>

  • Type Parameters:
    O - Data type to process
    All Implemented Interfaces:
    elki.index.Index, elki.index.KNNIndex<O>

    @Title("Spatial Approximation Materialize kNN Preprocessor")
    @Description("Caterializes the (approximate) k nearest neighbors of objects of a database using a spatial approximation.")
    public class SpatialApproximationMaterializeKNNPreprocessor<O extends elki.data.NumberVector>
    extends elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor<O>
    A preprocessor for annotation of the k nearest neighbors (and their distances) to each database object.

    Used for example by elki.outlier.lof.LOF.

    TODO correct handling of datastore events

    Since:
    0.2
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static elki.logging.Logging LOG
      Logger to use
      • Fields inherited from class elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor

        distance, distanceQuery, k, relation, storage
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected elki.logging.Logging getLogger()  
      protected AbstractRStarTree<?,​SpatialEntry,​?> getSpatialIndex​(elki.database.relation.Relation<O> relation)  
      protected void preprocess()  
      • Methods inherited from class elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor

        createStorage, get, getDistanceQuery, getK, initialize, kNNByDBID, kNNByObject
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface elki.index.Index

        logStatistics
    • Field Detail

      • LOG

        private static final elki.logging.Logging LOG
        Logger to use
    • Constructor Detail

      • SpatialApproximationMaterializeKNNPreprocessor

        public SpatialApproximationMaterializeKNNPreprocessor​(elki.database.relation.Relation<O> relation,
                                                              elki.distance.Distance<? super O> distance,
                                                              int k)
        Constructor
        Parameters:
        relation - Relation to preprocess
        distance - the distance function to use
        k - query k
    • Method Detail

      • preprocess

        protected void preprocess()
        Specified by:
        preprocess in class elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor<O extends elki.data.NumberVector>
      • getLogger

        protected elki.logging.Logging getLogger()
        Specified by:
        getLogger in class elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor<O extends elki.data.NumberVector>