public void RefineTest()
        {
            int   n = 3;
            Graph g = new Graph(n)
            {
                connectionTable = new int[][] { new[] { 0, 1, 1 }, new[] { 1, 0, 0 }, new[] { 1, 0, 0 } }
            };
            PermutationGroup group   = new PermutationGroup(n);
            MockRefiner      refiner = new MockRefiner(g);

            Setup(refiner, group, g);
            refiner.Refine(Partition.Unit(n));
            Assert.IsNotNull(refiner);
        }
        public void GetFirstHalfMatrixStringTest()
        {
            int   n = 3;
            Graph g = new Graph(n)
            {
                connectionTable = new int[][] { new[] { 0, 0, 1 }, new[] { 0, 0, 1 }, new[] { 1, 1, 0 } }
            };
            PermutationGroup group   = new PermutationGroup(n);
            MockRefiner      refiner = new MockRefiner(g);

            Setup(refiner, group, g);
            refiner.Refine(Partition.Unit(n));
            string hms      = refiner.GetFirstHalfMatrixString();
            string expected = "110";

            Assert.AreEqual(expected, hms);
        }
        public void GetFirstTest()
        {
            int   n = 3;
            Graph g = new Graph(n)
            {
                connectionTable = new int[][] { new[] { 0, 1, 0 }, new[] { 1, 0, 1 }, new[] { 0, 1, 0 } }
            };
            PermutationGroup group   = new PermutationGroup(n);
            MockRefiner      refiner = new MockRefiner(g);

            Setup(refiner, group, g);
            refiner.Refine(Partition.Unit(n));
            Permutation first    = refiner.GetFirst();
            Permutation expected = new Permutation(1, 0, 2);

            Assert.AreEqual(expected, first);
        }
        public void GetAutomorphismPartitionTest()
        {
            int   n = 3;
            Graph g = new Graph(n)
            {
                connectionTable = new int[][] { new[] { 0, 1, 1 }, new[] { 1, 0, 0 }, new[] { 1, 0, 0 } }
            };
            PermutationGroup group   = new PermutationGroup(n);
            MockRefiner      refiner = new MockRefiner(g);

            Setup(refiner, group, g);
            refiner.Refine(Partition.Unit(n));
            Partition autPartition = refiner.GetAutomorphismPartition();
            Partition expected     = Partition.FromString("0|1,2");

            Assert.AreEqual(expected, autPartition);
        }