Beispiel #1
0
        public void PPM_FillTest()
        {
            // arrange
            int N    = 6;
            int N_M  = FourRussians.calculateParameter(N);
            int subN = N / N_M;

            int[][] A = new int[][] {
                new int[] { 0, 1, 1, 0, 0, 0 },
                new int[] { 1, 0, 1, 0, 1, 0 },
            };

            int[][] A_PPM = new int[][] {
                new int[] { 0, 0, 0, 0, 0, 0 }, // 00
                new int[] { 1, 0, 1, 0, 1, 0 }, // 01
                new int[] { 0, 1, 1, 0, 0, 0 }, // 10
                new int[] { 1, 1, 1, 0, 1, 0 }, // 11
            };

            // action
            bool actual1 = Operations.MatrixEqual(FourRussians.PPM_Fill(A, subN), A_PPM);

            // assert
            Assert.AreEqual(actual1, true);
        }