Пример #1
0
        public static void Solve()
        {
            for (; Config_matrix.Piececount < Config_matrix.L - 1; Config_matrix.Piececount++)
            {
                do
                {
                    Config_matrix.LocalDegreeCount();
                    InternalLinksCount();
                    ExternalLinksCount();
                    ConnectivityCount();
                    DeltaCount();
                } while (SwapResult.Flag);

                int[,] savearr = new int[Config_matrix.N - Config_matrix.M, Config_matrix.N - Config_matrix.M];
                for (int i = Config_matrix.M; i < Config_matrix.N; i++)
                {
                    for (int j = Config_matrix.M; j < Config_matrix.N; j++)
                    {
                        savearr[i - Config_matrix.M, j - Config_matrix.M] = Config_matrix.AdjMatrixC[i, j];
                    }
                }

                Config_matrix.N         -= Config_matrix.M;
                Config_matrix.AdjMatrixC = new int[Config_matrix.N, Config_matrix.N];

                for (int i = 0; i < Config_matrix.N; i++)
                {
                    for (int j = 0; j < Config_matrix.N; j++)
                    {
                        Config_matrix.AdjMatrixC[i, j] = savearr[i, j];
                    }
                }
            }
        }
Пример #2
0
 private void local_degree_show()
 {
     Config_matrix.LocalDegreeCount();
     for (int i = 0; i < Config_matrix.N; i++)
     {
         adj_matrix_data_grid[adj_matrix_data_grid.ColumnCount - 2, i].Value = Config_matrix.LocalDegree[i];
     }
 }