Package elki.parallel.processor
Class KNNProcessor
- java.lang.Object
-
- elki.parallel.processor.KNNProcessor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KNNProcessor.Instance
Instance for precomputing the kNN.
-
Field Summary
Fields Modifier and Type Field Description (package private) int
k
K parameter(package private) java.util.function.Supplier<KNNSearcher<DBIDRef>>
knnq
KNN query object(package private) SharedObject<KNNList>
out
Output channel to write to
-
Constructor Summary
Constructors Constructor Description KNNProcessor(int k, java.util.function.Supplier<KNNSearcher<DBIDRef>> knnq)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanup(Processor.Instance inst)
Invoke cleanup.void
connectKNNOutput(SharedObject<KNNList> output)
Connect the output channel.KNNProcessor.Instance
instantiate(Executor executor)
Create an instance.
-
-
-
Field Detail
-
k
int k
K parameter
-
knnq
java.util.function.Supplier<KNNSearcher<DBIDRef>> knnq
KNN query object
-
out
SharedObject<KNNList> out
Output channel to write to
-
-
Constructor Detail
-
KNNProcessor
public KNNProcessor(int k, java.util.function.Supplier<KNNSearcher<DBIDRef>> knnq)
Constructor.- Parameters:
k
- K parameterknnq
- 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 interfaceProcessor
- Parameters:
executor
- Job executor- Returns:
- Instance
-
cleanup
public void cleanup(Processor.Instance inst)
Description copied from interface:Processor
Invoke cleanup.
-
-