コード例 #1
0
        public bool PruebaPermutacion(int[,] M1, int[,] M2, int[] permutacion, ref int[] p, ref List <int[, ]> pasos)
        {
            p = permutacion;
            bool band;

            band = true;
            int x = permutacion.Length;

            for (int i = 0; i < permutacion.Length; i++)
            {
                for (int j = 0; j < permutacion.Length; j++)
                {
                    if (M1[i, j] != M2[permutacion[i], permutacion[j]])
                    {
                        band = false;
                        break;
                    }
                }
                if (!band)
                {
                    break;
                }
            }
            pasos.Add(MetodosAuxiliares.clonaMatriz(M1));
            return(band);
        }