Exemplo n.º 1
0
        public void MinCut_SmallGraphTest()
        {
            var graph = new AdjacencyListGraph <int>();

            graph.AddEdge(1, 2);
            graph.AddEdge(1, 3);
            graph.AddEdge(1, 4);
            graph.AddEdge(2, 3);
            graph.AddEdge(3, 4);

            var minCut = graph.RandomizedMinCut();

            Assert.AreEqual(2, minCut.Count());
        }