예제 #1
0
        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);
        }
예제 #2
0
 public void AddComputationHandler(string key, IAvoidersPPAComputationHandler computationHandler)
 {
     computationHandlers[key] = computationHandler;
 }