public void ChromaticPolinomialEmptyGraph()
        {
            var graph = BuildGraph(new int[] { 1, 2, 3, 4, 5 },
                                   new int[] {});

            CollectionAssert.AreEqual(new int[] { 1, 0, 0, 0, 0, 0 }, ChromaticPolynomial.findChromaticPolynomial(graph));
        }
示例#2
0
        public void ChromaticPolinomialEmptyGraph()
        {
            var graph = BuildGraph(new int[] { 1, 2, 3, 4, 5 },
                                   new int[] {});

            CollectionAssert.AreEqual(new int[] { 1, 0, 0, 0, 0, 0 }, ChromaticPolynomial.findChromaticPolynomial(graph, (int x, int y) => new UndirectedEdge <int>(x, y)));
        }
        public void ChromaticPolinomialAlmostFullGraph()
        {
            var graph = BuildGraph(new int[] { 1, 2, 3, 4 },
                                   new int[] { 1, 2, 1, 3, 1, 4,
                                               2, 3, 2, 4 });

            CollectionAssert.AreEqual(new int[] { 1, -5, 8, -4, 0 }, ChromaticPolynomial.findChromaticPolynomial(graph));
        }
示例#4
0
        public void ChromaticPolinomialAlmostFullGraph()
        {
            var graph = BuildGraph(new int[] { 1, 2, 3, 4 },
                                   new int[] { 1, 2, 1, 3, 1, 4,
                                               2, 3, 2, 4 });

            CollectionAssert.AreEqual(new int[] { 1, -5, 8, -4, 0 }, ChromaticPolynomial.findChromaticPolynomial(graph, (int x, int y) => new UndirectedEdge <int>(x, y)));
        }