public interface VertexVisitor<V> {
boolean visit(V v);
}
//广度优先搜索测试
static void testBfs() {
Graph<Object, Double> graph = directedGraph(Data.BFS_02);
graph.bfs(0, (Object v) -> {
System.out.println(v);
return false;
});
}
public interface VertexVisitor<V> {
boolean visit(V v);
}
//广度优先搜索测试
static void testBfs() {
Graph<Object, Double> graph = directedGraph(Data.BFS_02);
graph.bfs(0, (Object v) -> {
System.out.println(v);
return false;
});
}