Exemplo n.º 1
0
        public void MarkRow()
        {
            CompatibilityMatrix m = new CompatibilityMatrix(5, 5);

            m.Set1(0, 1);
            m.Set1(0, 2);
            m.Set1(0, 4);
            Assert.IsTrue(Compares.AreEqual(new int[] { 0, 1, 1, 0, 1 }, m.Fix()[0]));
            m.MarkRow(0, -1);
            Assert.IsTrue(Compares.AreEqual(new int[] { 0, -1, -1, 0, -1 }, m.Fix()[0]));
        }
Exemplo n.º 2
0
        public void Fix()
        {
            CompatibilityMatrix m = new CompatibilityMatrix(5, 5);

            m.Set1(0, 1);
            m.Set1(0, 2);
            m.Set1(0, 4);
            m.Set1(1, 0);
            m.Set1(1, 3);
            m.Set1(2, 4);
            Assert.IsTrue(Compares.AreDeepEqual(new int[][] {
                new[] { 0, 1, 1, 0, 1 },
                new[] { 1, 0, 0, 1, 0 },
                new[] { 0, 0, 0, 0, 1 },
                new[] { 0, 0, 0, 0, 0 },
                new[] { 0, 0, 0, 0, 0 },
            }, m.Fix()));
        }