Example #1
0
        public virtual void CompletedTest()
        {
            AllCycles ac = new AllCycles(RegularPathGraphTest.CompleteGraphOfSize(4), 4, 100);

            Assert.IsTrue(ac.Completed);
            Assert.AreEqual(7, ac.Count);
        }
Example #2
0
        public virtual void Impractical()
        {
            // k12 - ouch
            AllCycles ac = new AllCycles(RegularPathGraphTest.CompleteGraphOfSize(12), 12, 100);

            Assert.IsFalse(ac.Completed);
        }
Example #3
0
        public virtual void K5Paths()
        {
            AllCycles ac = new AllCycles(RegularPathGraphTest.CompleteGraphOfSize(5), 5, 1000);

            Assert.IsTrue(Compares.AreDeepEqual(
                              new int[][] {
                new[] { 2, 1, 0, 2 }, new[] { 3, 1, 0, 3 }, new[] { 4, 1, 0, 4 }, new[] { 3, 2, 0, 3 }, new[] { 3, 2, 1, 3 },
                new[] { 3, 2, 1, 0, 3 }, new[] { 3, 2, 0, 1, 3 }, new[] { 4, 2, 0, 4 }, new[] { 4, 2, 1, 4 }, new[] { 4, 2, 1, 0, 4 }, new[] { 4, 2, 0, 1, 4 },
                new[] { 3, 0, 2, 1, 3 }, new[] { 4, 0, 2, 1, 4 }, new[] { 4, 3, 0, 4 }, new[] { 4, 3, 1, 4 }, new[] { 4, 3, 1, 0, 4 }, new[] { 4, 3, 0, 1, 4 },
                new[] { 4, 3, 2, 4 }, new[] { 4, 3, 2, 0, 4 }, new[] { 4, 3, 2, 1, 4 }, new[] { 4, 3, 2, 1, 0, 4 }, new[] { 4, 3, 2, 0, 1, 4 },
                new[] { 4, 3, 0, 2, 4 }, new[] { 4, 3, 1, 2, 4 }, new[] { 4, 3, 0, 1, 2, 4 }, new[] { 4, 3, 1, 0, 2, 4 }, new[] { 4, 3, 0, 2, 1, 4 },
                new[] { 4, 3, 1, 2, 0, 4 }, new[] { 4, 0, 3, 1, 4 }, new[] { 4, 0, 3, 2, 4 }, new[] { 4, 0, 3, 2, 1, 4 }, new[] { 4, 0, 3, 1, 2, 4 },
                new[] { 4, 1, 3, 2, 4 }, new[] { 4, 1, 3, 2, 0, 4 }, new[] { 4, 1, 3, 0, 2, 4 }, new[] { 4, 0, 1, 3, 2, 4 }, new[] { 4, 1, 0, 3, 2, 4 }
            },
                              ac.GetPaths()));
        }
Example #4
0
        public virtual void K5Size()
        {
            AllCycles ac = new AllCycles(RegularPathGraphTest.CompleteGraphOfSize(5), 5, 1000);

            Assert.AreEqual(37, ac.Count);
        }
Example #5
0
        public virtual void K7Size()
        {
            AllCycles ac = new AllCycles(RegularPathGraphTest.CompleteGraphOfSize(7), 7, 1000);

            Assert.AreEqual(1172, ac.Count);
        }