public void TestSearch() { var g = GraphGenerator.graph(); var s = 0; var dfs = new DepthFirstSearch(g, s); for (var v = 0; v < g.V(); ++v) { if (!dfs.CanReach(v)) { continue; } console.WriteLine(s + " is connected to " + v); console.WriteLine("path: " + dfs.PathToString(v)); } }