gov.sandia.cognition.algorithm
Interface ParallelAlgorithm

All Superinterfaces:
Cloneable, CloneableSerializable, Serializable
All Known Implementing Classes:
AbstractParallelAlgorithm, MaximumLikelihoodDistributionEstimator, ParallelBaumWelchAlgorithm, ParallelClusterDistortionMeasure, ParallelDirichletProcessMixtureModel, ParallelHiddenMarkovModel, ParallelizedCostFunctionContainer, ParallelizedGeneticAlgorithm, ParallelizedKMeansClusterer, ParallelLatentDirichletAllocationVectorGibbsSampler, ParallelLearnerValidationExperiment, ParallelNegativeLogLikelihood

public interface ParallelAlgorithm
extends CloneableSerializable

Interface for algorithms that are parallelized using multithreading. Using multithreading can provide a significant speedup by letting the threads execute in parallel on multi-core or hyperthreaded processors as well as multi-processor, shared-memory systems.

Since:
2.1
Author:
Kevin R. Dixon

Method Summary
 int getNumThreads()
          Gets the number of threads in the thread pool.
 ThreadPoolExecutor getThreadPool()
          Gets the thread pool for the algorithm to use.
 void setThreadPool(ThreadPoolExecutor threadPool)
          Sets the thread pool for the algorithm to use.
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Method Detail

getThreadPool

ThreadPoolExecutor getThreadPool()
Gets the thread pool for the algorithm to use.

Returns:
Thread pool used for parallelization.

setThreadPool

void setThreadPool(ThreadPoolExecutor threadPool)
Sets the thread pool for the algorithm to use.

Parameters:
threadPool - Thread pool used for parallelization.

getNumThreads

int getNumThreads()
Gets the number of threads in the thread pool.

Returns:
Number of threads in the thread pool