示例#1
0
        public void MaximumMatchingCount_ShouldReturn_4()
        {
            var g = GetGraph2();
            int correctEdgesCount = 4;

            var maximumMatching = EdmondsAlgorithm.CalculateMaximumMatching(g);
            var testResult      = VerifyMatching(maximumMatching, g, correctEdgesCount);

            Assert.IsTrue(testResult.IsCorrect, testResult.ErrorMessage);
        }
示例#2
0
        public void MaximumMatchingCount_FullGraph_6Vertices()
        {
            var generator         = new GraphGenerator();
            int verticesCount     = 6;
            var g                 = generator.GetFullGraph(verticesCount);
            int correctEdgesCount = 3;

            var maximumMatching = EdmondsAlgorithm.CalculateMaximumMatching(g);
            var testResult      = VerifyMatching(maximumMatching, g, correctEdgesCount);

            Assert.IsTrue(testResult.IsCorrect, testResult.ErrorMessage);
        }