martin.common.compthreads
Interface Problem<E>

All Known Implementing Classes:
ConcurrentMatcher.MatchProblem, ConvertToVariantsProblemIterator.ConvertToVariantsProblem, EvaluateProblem, GenerateAutomatons.ProcessProblem, GenerateAutomatons.ToAutomatonProblem, SimpleServerWorker

public interface Problem<E>

Implement this interface to allow easy parallelization of computational code. Objects of implementing classes can be sent to Master objects for concurrent computations.

Author:
Martin

Method Summary
 E compute()
          This is the method called by the master threads, and should contain the code that should be computed concurrently.
 

Method Detail

compute

E compute()
This is the method called by the master threads, and should contain the code that should be computed concurrently.

Returns:
a data object representing output data from the computation that you might want to read after finished computation. If there is no such output (e.g. results are written to file), just return null.