Exemple #1
0
        public virtual void Size_cyclophane_odd()
        {
            int[][]           cyclophane_even = CyclophaneEven;
            VertexShortCycles vsc             = new VertexShortCycles(cyclophane_even);

            Assert.AreEqual(3, vsc.Count);
        }
Exemple #2
0
        public virtual void Size_anthracene()
        {
            int[][]           anthracene = Anthracene;
            VertexShortCycles vsc        = new VertexShortCycles(anthracene);

            Assert.AreEqual(3, vsc.Count);
        }
Exemple #3
0
        public virtual void Size_napthalene()
        {
            int[][]           napthalene = Naphthalene;
            VertexShortCycles vsc        = new VertexShortCycles(napthalene);

            Assert.AreEqual(2, vsc.Count);
        }
Exemple #4
0
        public virtual void Size_bicyclo()
        {
            int[][]           bicyclo = Bicyclo;
            VertexShortCycles vsc     = new VertexShortCycles(bicyclo);

            Assert.AreEqual(3, vsc.Count);
        }
Exemple #5
0
        public virtual void Size_norbornane()
        {
            int[][]           norbornane = Norbornane;
            VertexShortCycles vsc        = new VertexShortCycles(norbornane);

            int[][] paths = vsc.GetPaths();
            Assert.AreEqual(2, paths.Length);
        }
Exemple #6
0
        public virtual void Paths_napthalene()
        {
            int[][]           napthalene = Naphthalene;
            VertexShortCycles vsc        = new VertexShortCycles(napthalene);

            int[][] paths    = vsc.GetPaths();
            int[][] expected = new int[][] { new[] { 5, 0, 1, 2, 3, 4, 5 }, new[] { 5, 4, 7, 8, 9, 6, 5 } };
            Assert.IsTrue(Compares.AreOrderLessDeepEqual(expected, paths));
        }
Exemple #7
0
        public virtual void Paths_bicyclo()
        {
            int[][]           bicyclo = Bicyclo;
            VertexShortCycles vsc     = new VertexShortCycles(bicyclo);

            int[][] paths    = vsc.GetPaths();
            int[][] expected = new int[][] { new[] { 5, 0, 1, 2, 3, 4, 5 }, new[] { 5, 0, 1, 2, 7, 6, 5 }, new[] { 5, 4, 3, 2, 7, 6, 5 } };
            Assert.IsTrue(Compares.AreOrderLessDeepEqual(expected, paths));
        }
Exemple #8
0
        public virtual void Paths_norbornane()
        {
            int[][]           norbornane = Norbornane;
            VertexShortCycles vsc        = new VertexShortCycles(norbornane);

            int[][] paths    = vsc.GetPaths();
            int[][] expected = new int[][] { new[] { 5, 6, 2, 1, 0, 5 }, new[] { 5, 6, 2, 3, 4, 5 } };
            Assert.IsTrue(Compares.AreOrderLessDeepEqual(expected, paths));
        }
Exemple #9
0
        public virtual void Paths_cyclophane_odd()
        {
            int[][]           cyclophane_even = CyclophaneEven;
            VertexShortCycles vsc             = new VertexShortCycles(cyclophane_even);

            int[][] paths    = vsc.GetPaths();
            int[][] expected = new int[][] {
                new[] { 3, 2, 1, 0, 5, 4, 3 },
                new[] { 3, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3 },
                new[] { 3, 6, 7, 8, 9, 10, 11, 0, 5, 4, 3 }
            };
            Assert.IsTrue(Compares.AreOrderLessDeepEqual(expected, paths));
        }
Exemple #10
0
        public virtual void Paths_anthracene()
        {
            int[][]           anthracene = Anthracene;
            VertexShortCycles vsc        = new VertexShortCycles(anthracene);

            int[][] paths    = vsc.GetPaths();
            int[][] expected = new int[][]
            {
                new[] { 5, 0, 1, 2, 3, 4, 5 },
                new[] { 9, 6, 5, 4, 7, 8, 9 },
                new[] { 9, 8, 10, 11, 12, 13, 9 }
            };
            Assert.IsTrue(Compares.AreOrderLessDeepEqual(expected, paths));
        }
Exemple #11
0
        public virtual void Paths_cyclophanelike2()
        {
            int[][]           g   = Cyclophanelike2();
            VertexShortCycles vsc = new VertexShortCycles(g);

            int[][] paths    = vsc.GetPaths();
            int[][] expected = new int[][]
            {
                new[] { 5, 0, 1, 2, 3, 4, 5 },
                new[] { 9, 8, 7, 6, 11, 10, 9 },
                new[] { 15, 14, 13, 12, 17, 16, 15 },
                new[] { 21, 20, 19, 18, 23, 22, 21 }
            };
            Assert.IsTrue(Compares.AreOrderLessDeepEqual(expected, paths));
        }