public void Compute(string command, int n, StreamReader reader, int numThreads) { IPermutationsCollection avoidedPermutations = ProcessPermutations(reader, n); ResultPPA result = resultFactories[command].CreateResultPPA(n); IAvoidersPPAComputationHandler computationHandler = computationHandlers[command]; result = computationHandler.Compute(avoidedPermutations, n, result, numThreads); ProcessResult(result); }
public void AddComputationHandler(string key, IAvoidersPPAComputationHandler computationHandler) { computationHandlers[key] = computationHandler; }