Class PreprocessorKNNQuery

    • Field Detail

      • LOG

        private static final Logging LOG
        Class logger
      • relation

        protected final Relation<?> relation
        The data to use for this query
      • warned

        private boolean warned
        Warn only once.
    • Constructor Detail

      • PreprocessorKNNQuery

        public PreprocessorKNNQuery​(Relation<?> relation,
                                    AbstractMaterializeKNNPreprocessor<?> preprocessor)
        Constructor.
        Parameters:
        relation - Relation to query
        preprocessor - Preprocessor instance to use
    • Method Detail

      • getKNN

        public KNNList getKNN​(DBIDRef id,
                              int k)
        Description copied from interface: KNNSearcher
        Get the k nearest neighbors for a particular object.
        Specified by:
        getKNN in interface KNNSearcher<DBIDRef>
        Parameters:
        id - query object
        k - Number of neighbors requested
        Returns:
        neighbors
      • getLogger

        protected Logging getLogger()
        Get the class logger. Override when subclassing!
        Returns:
        Class logger.