Example #1
0
 public static void Begin(int[,] oldAdjacencyMatrix, int beginI)
 {
     AdjacencyMatrixSize = AlgorithmRunner.AdjacencyMatrixSize;
     AdjacencyMatrix     = oldAdjacencyMatrix;
     for (i = beginI; i < AdjacencyMatrixSize; i++)
     {
         for (j = i + 1; j < AdjacencyMatrixSize; j++)
         {
             //ProgressHelper.CreateMatrixInfo = (1 + i) + "/" + (1 + j);
             //ProgressHelper.pbCreateMatrix = 100 * (i * AdjacencyMatrixSize + j) / (AdjacencyMatrixSize * AdjacencyMatrixSize);
             AlgorithmRunner.SaveOBJ("Status", "inf Đang phân tích dữ liệu (" + (1 + i) + "/" + (1 + j) + ")...");
             AdjacencyMatrix[i, j] = AdjacencyMatrix[j, i] = CheckGroups(AlgorithmRunner.Groups[i], AlgorithmRunner.Groups[j]);
         }
         if (Stop)
         {
             //AlgorithmRunner.SaveOBJ("AdjacencyMatrix", AdjacencyMatrix);
             WriteAdjacencyMatrix(AdjacencyMatrix, AlgorithmRunner.RealPath("AdjacencyMatrix"));
             AlgorithmRunner.SaveOBJ("BeginI", i + 1);
             AlgorithmRunner.Clear();
             Stoped = true;
             Environment.Exit(0);
             return;
         }
     }
     WriteAdjacencyMatrix(AdjacencyMatrix, AlgorithmRunner.RealPath("AdjacencyMatrix"));
     AlgorithmRunner.DeleteOBJ("BeginI");
 }