Class KNNProcessor

  • All Implemented Interfaces:
    Processor

    public class KNNProcessor
    extends java.lang.Object
    implements Processor
    Processor to compute the kNN of each object.
    Since:
    0.7.0
    Author:
    Erich Schubert
    • Constructor Detail

      • KNNProcessor

        public KNNProcessor​(int k,
                            java.util.function.Supplier<KNNSearcher<DBIDRef>> knnq)
        Constructor.
        Parameters:
        k - K parameter
        knnq - Distance query to use
    • Method Detail

      • connectKNNOutput

        public void connectKNNOutput​(SharedObject<KNNList> output)
        Connect the output channel.
        Parameters:
        output - Output channel
      • instantiate

        public KNNProcessor.Instance instantiate​(Executor executor)
        Description copied from interface: Processor
        Create an instance. May be called multiple times, for example for multiple threads.
        Specified by:
        instantiate in interface Processor
        Parameters:
        executor - Job executor
        Returns:
        Instance