use of com.amazon.randomcutforest.executor.ParallelForestTraversalExecutor in project random-cut-forest-by-aws by aws.
the class RandomCutForest method initExecutors.
protected <PointReference, Point> void initExecutors(IStateCoordinator<PointReference, Point> updateCoordinator, ComponentList<PointReference, Point> components) {
if (parallelExecutionEnabled) {
traversalExecutor = new ParallelForestTraversalExecutor(components, threadPoolSize);
updateExecutor = new ParallelForestUpdateExecutor<>(updateCoordinator, components, threadPoolSize);
} else {
traversalExecutor = new SequentialForestTraversalExecutor(components);
updateExecutor = new SequentialForestUpdateExecutor<>(updateCoordinator, components);
}
}
Aggregations