ladanyi@63: #include ladanyi@63: #include ladanyi@63: #include ladanyi@63: #include ladanyi@63: #include ladanyi@63: alpar@921: using namespace lemon; ladanyi@63: ladanyi@63: int main(int, char **) { ladanyi@63: typedef ListGraph::NodeIt NodeIt; ladanyi@63: typedef ListGraph::EdgeIt EdgeIt; ladanyi@63: typedef ListGraph::EachNodeIt EachNodeIt; ladanyi@63: typedef ListGraph::EachEdgeIt EachEdgeIt; ladanyi@63: typedef ListGraph::OutEdgeIt OutEdgeIt; ladanyi@63: typedef ListGraph::InEdgeIt InEdgeIt; ladanyi@63: typedef ListGraph::SymEdgeIt SymEdgeIt; ladanyi@63: ladanyi@63: ListGraph G; ladanyi@63: LoadGraph(G, "demo.in"); ladanyi@63: ladanyi@63: std::cout << "bfs from the first node" << std::endl; ladanyi@63: bfs bfs_test(G, G.first()); ladanyi@63: bfs_test.run(); ladanyi@63: std::cout << "reached: "; ladanyi@63: for(EachNodeIt i=G.first(); i.valid(); ++i) { ladanyi@63: std::cout << bfs_test.reached.get(i) << " "; ladanyi@63: } ladanyi@63: std::cout<(); i.valid(); ++i) { ladanyi@63: std::cout << bfs_test.dist.get(i) << " "; ladanyi@63: } ladanyi@63: std::cout<