public static void TestEdgeDisjointPath2() { var g = new UndirectedGraph <int>(); g.AddEdges(new int[] { 0, 1 }); TestEdgeDisjointPath(g, 0, 1); }
public static void TestEdgeDisjointPath1() { var g = new UndirectedGraph <int>(); g.AddEdges(new int[] { 0, 1, 0, 2, 1, 3, 2, 3, 3, 4, 3, 5, 4, 6, 5, 6 }); TestEdgeDisjointPath(g, 0, 6); }
public void VerticeDegreeTest() { var graph = new UndirectedGraph(3); graph.AddEdges(new System.Collections.Generic.List <Tuple <int, int> >() { new Tuple <int, int>(0, 1), new Tuple <int, int>(2, 1), }); Assert.IsTrue(graph.VerticeDegree(1) == 2); }
public void AdjacencyMatrixTestAfterDeleteEdge() { var graph = new UndirectedGraph(3); graph.AddEdges(new System.Collections.Generic.List <Tuple <int, int> >() { new Tuple <int, int>(0, 1), new Tuple <int, int>(2, 1), new Tuple <int, int>(0, 2), }); graph.RemoveEdge(0, 1); Assert.IsTrue(graph.VerticeDegree(1) == 1); }