Пример #1
0
        public void NapthaleneTest()
        {
            SimpleGraph         napthalene    = SimpleGraphFactory.MakeNapthalene();
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(napthalene);

            CheckParameters(quotientGraph, 3, 4, 2);
        }
Пример #2
0
        public void PermuteTest(SimpleGraph graph)
        {
            Console.Out.WriteLine(Arrays.ToJavaString(GetLabels(graph)) + " " + graph);
            SimpleGraphPermutor permutor = new SimpleGraphPermutor(graph);
            var relabelledStrings        = new HashSet <string>();

            // permute, and relabel
            foreach (var permutation in permutor)
            {
                int[]       labels     = GetLabels(permutation);
                SimpleGraph relabelled = new SimpleGraph(permutation, labels);
                bool        isIdentity = IsIdentity(labels);
                Console.Out.WriteLine(
                    Arrays.ToJavaString(labels) + " " + permutation + " " + relabelled
                    + " " + isIdentity);
                relabelledStrings.Add(relabelled.ToString());
            }
            Assert.AreEqual(1, relabelledStrings.Count);

            // list the number of unique strings
            var values = relabelledStrings.GetEnumerator();

            for (int i = 0; i < relabelledStrings.Count; i++)
            {
                values.MoveNext();
                Console.Out.WriteLine(i + " " + values.Current);
            }
        }
Пример #3
0
        public void PentagonalPrismTest()
        {
            SimpleGraph         pentaprism    = SimpleGraphFactory.MakePrism(5);
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(pentaprism);

            CheckParameters(quotientGraph, 1, 1, 1);
        }
Пример #4
0
        public void AdamantaneTest()
        {
            SimpleGraph         adamantane    = SimpleGraphFactory.MakeAdamantane();
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(adamantane);

            CheckParameters(quotientGraph, 2, 1, 0);
        }
Пример #5
0
        public void CubeTest()
        {
            SimpleGraph         cube          = SimpleGraphFactory.MakePrism(4);
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(cube);

            CheckParameters(quotientGraph, 1, 1, 1);
        }
Пример #6
0
        public void TwistaneTest()
        {
            SimpleGraph         twistane      = SimpleGraphFactory.MakeTwistane();
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(twistane);

            CheckParameters(quotientGraph, 3, 4, 2);
        }
Пример #7
0
        public void QuadricyclaneTest()
        {
            SimpleGraph         quadricyclane = SimpleGraphFactory.MakeQuadricyclane();
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(quadricyclane);

            CheckParameters(quotientGraph, 3, 3, 1);
        }
Пример #8
0
        public void PetersensGraphTest()
        {
            SimpleGraph         petersens     = SimpleGraphFactory.MakePetersensGraph();
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(petersens);

            CheckParameters(quotientGraph, 1, 1, 1);
        }
Пример #9
0
        public void DiamantaneTest()
        {
            SimpleGraph         diamantane = SimpleGraphFactory.MakeDiamantane();
            SimpleQuotientGraph qGraph     = new SimpleQuotientGraph(diamantane);

            CheckParameters(qGraph, 3, 3, 1);
        }
Пример #10
0
        public void GrotschGraphTest()
        {
            SimpleGraph         grotschGraph = SimpleGraphFactory.MakeGrotschGraph();
            SimpleQuotientGraph qgraph       = new SimpleQuotientGraph(grotschGraph);

            CheckParameters(qgraph, 3, 3, 1);
        }
Пример #11
0
        public void Symmetric2TwistaneTest()
        {
            SimpleGraph         symmetric2Twistane = SimpleGraphFactory.MakeSymmetric2Twistane();
            SimpleQuotientGraph quotientGraph      = new SimpleQuotientGraph(symmetric2Twistane);

            CheckParameters(quotientGraph, 2, 3, 2);
        }
Пример #12
0
        public void HerschelGraphTest()
        {
            SimpleGraph         herschel      = SimpleGraphFactory.MakeHerschelGraph();
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(herschel);

            CheckParameters(quotientGraph, 3, 2, 0);
        }
Пример #13
0
        public void HexagonalSandwichTest()
        {
            SimpleGraph         hexagon       = SimpleGraphFactory.MakeSandwich(6);
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(hexagon);

            CheckParameters(quotientGraph, 2, 2, 1);
        }
Пример #14
0
        public void SquareSandwichTest()
        {
            SimpleGraph         square        = SimpleGraphFactory.MakeSandwich(4);
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(square);

            CheckParameters(quotientGraph, 2, 2, 1);
        }
Пример #15
0
        public void TriangleSandwichTest()
        {
            SimpleGraph         triangle      = SimpleGraphFactory.MakeSandwich(3);
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(triangle);

            CheckParameters(quotientGraph, 2, 2, 1);
        }
Пример #16
0
        public void CuneaneTest()
        {
            SimpleGraph         cuneane       = SimpleGraphFactory.MakeCuneane();
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(cuneane);

            CheckParameters(quotientGraph, 3, 5, 3);
        }
Пример #17
0
        public void SpiroPentagonTest()
        {
            SimpleGraph         spiroPentagons = SimpleGraphFactory.MakeSpiroPentagons();
            SimpleQuotientGraph quotientGraph  = new SimpleQuotientGraph(spiroPentagons);

            CheckParameters(quotientGraph, 3, 3, 1);
        }
Пример #18
0
        public void PappusGraphTest()
        {
            SimpleGraph         pappus        = SimpleGraphFactory.MakePappusGraph();
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(pappus);

            CheckParameters(quotientGraph, 1, 1, 1);
        }
Пример #19
0
        public void TietzesGraphTest()
        {
            SimpleGraph         tietzes       = SimpleGraphFactory.MakeTietzesGraph();
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(tietzes);

            CheckParameters(quotientGraph, 3, 4, 2);
        }
Пример #20
0
        public void TriangularPrismTest()
        {
            SimpleGraph         pentaprism    = SimpleGraphFactory.MakePrism(3);
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(pentaprism);

            CheckParameters(quotientGraph, 1, 1, 1);
        }
Пример #21
0
        public void DoubleBridgedPentagonTest()
        {
            SimpleGraph         g             = SimpleGraphFactory.MakeDoubleBridgedPentagon();
            SimpleQuotientGraph quotientGraph = new SimpleQuotientGraph(g);

            CheckParameters(quotientGraph, 4, 5, 1);
        }
Пример #22
0
        public void DiSpiroOctaneQuotientGraphTest()
        {
            SimpleGraph         diSpiroOctane = SimpleGraphFactory.MakeDiSpiroOctane();
            SimpleQuotientGraph quotientGraph =
                new SimpleQuotientGraph(diSpiroOctane);

            CheckParameters(quotientGraph, 5, 6, 1);
        }
Пример #23
0
 public void Check4Regularity(SimpleGraph graph)
 {
     Console.Out.WriteLine(graph);
     for (int i = 0; i < graph.GetVertexCount(); i++)
     {
         Assert.AreEqual(4, graph.Degree(i), "failed for " + i);
     }
 }
Пример #24
0
 public SimpleGraph(SimpleGraph graph, int[] permutation)
     : this()
 {
     foreach (var e in graph.edges)
     {
         MakeEdge(permutation[e.a], permutation[e.b]);
     }
 }
Пример #25
0
        public void TruncatedTetrahedronTest()
        {
            SimpleGraph truncatedTetrahedron =
                SimpleGraphFactory.MakeTruncatedTetrahedron();
            SimpleQuotientGraph quotientGraph =
                new SimpleQuotientGraph(truncatedTetrahedron);

            CheckParameters(quotientGraph, 1, 1, 1);
        }
Пример #26
0
        public void ThreeFourFiveTwistedGraphTest()
        {
            SimpleGraph threeFourFive =
                SimpleGraphFactory.MakeThreeFourFiveTwisted();
            SimpleQuotientGraph quotientGraph =
                new SimpleQuotientGraph(threeFourFive);

            CheckParameters(quotientGraph, 3, 3, 1);
        }
Пример #27
0
        public void SquareQuotientGraphTest()
        {
            SimpleGraph squareQuotientGraph =
                SimpleGraphFactory.MakeSquareQuotientGraph();
            SimpleQuotientGraph quotientGraph =
                new SimpleQuotientGraph(squareQuotientGraph);

            CheckParameters(quotientGraph, 4, 4, 0);
        }
Пример #28
0
        public void TricycloPropaIndeneQuotientGraphTest()
        {
            SimpleGraph tricycloPropaIndene =
                SimpleGraphFactory.MakeTricycloPropaIndene();
            SimpleQuotientGraph quotientGraph =
                new SimpleQuotientGraph(tricycloPropaIndene);

            CheckParameters(quotientGraph, 6, 8, 2);
        }
Пример #29
0
        public void FourCubeTest()
        {
            SimpleGraph fourCube = SimpleGraphFactory.Make4Cube();

            Check4Regularity(fourCube);
            SimpleQuotientGraph qgraph = new SimpleQuotientGraph(fourCube);

            CheckParameters(qgraph, 1, 1, 1);
        }
Пример #30
0
        public void FourRegularExampleTest()
        {
            SimpleGraph fourRegular = SimpleGraphFactory.MakeFourRegularExample();

            Check4Regularity(fourRegular);
            SimpleQuotientGraph qgraph = new SimpleQuotientGraph(fourRegular);

            CheckParameters(qgraph, 1, 1, 1);
        }