Class CacheDoubleDistanceKNNLists<O>

  • Type Parameters:
    O - Object type

    public class CacheDoubleDistanceKNNLists<O>
    extends AbstractApplication
    Precompute the k nearest neighbors in a disk cache.
    Erich Schubert
    • Field Detail

      • LOG

        private static final Logging LOG
        The logger for this class.
      • database

        private Database database
        Data source to process.
      • distance

        private Distance<? super O> distance
        Distance function that is to be cached.
      • k

        private int k
        Number of neighbors to precompute.
      • out

        private java.nio.file.Path out
        Output file.

        public static final int KNN_CACHE_MAGIC
        Magic number to identify files.

        Note, when cloning this class, and performing any incompatible change to the file format, you should also change this magic ID!

        See Also:
        Constant Field Values
    • Constructor Detail

      • CacheDoubleDistanceKNNLists

        public CacheDoubleDistanceKNNLists​(Database database,
                                           Distance<? super O> distance,
                                           int k,
                                           java.nio.file.Path out)
        database - Data source
        distance - Distance function
        k - Number of nearest neighbors
        out - Matrix output file
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        Main method, delegate to super class.
        args - Command line arguments