public void TestDepthFirstSearch() { MatrixGraph graph = new MatrixGraph(4, 10); graph.SetUniEdge(0, 1, 2); graph.SetUniEdge(1, 2, 5); graph.SetUniEdge(0, 2, 6); graph.SetUniEdge(1, 3, 2); graph.SetUniEdge(2, 3, 2); graph.SetUniEdge(3, 2, 2); graph.DepthFirstSearch(0); Console.WriteLine(); graph.DepthFirstSearch(1); Console.WriteLine(); graph.DepthFirstSearch(2); Console.WriteLine(); graph.DepthFirstSearch(3); }