Esempio n. 1
0
 /// <summary>
   /// Инициализация потока для алгоритма
   /// </summary>
   /// <param name="alg">Алгоритм</param>
   /// <param name="tasks">Задания</param>
   /// <param name="function">Оптимизируемая функция</param>
   /// 
   public CalculatingThread(IAlgorithm alg,List<ITaskPackage> tasks,BlackBoxFunction function)
   {
       this.alg = alg;           
       this.tasks = tasks;
       this.function = function;
      
   }
Esempio n. 2
0
 /// <summary>
 /// Тест!!!
 /// </summary>
 public void Test()
 {
     foreach(IAlgorithm alg in algorithms)
     {
         BlackBoxFunction function = new BlackBoxFunction();
         alg.SetFunction(function);
         CalculatingThread th = new CalculatingThread(alg,tasks,function);
         thListener = new Listener(listener);
         th.SetEndListener(thListener);
         th.Start();
     }
 }