5 Jul
2006
5 Jul
'06
12:56 p.m.
On Jul 4, 2006, at 7:49 PM, sean yang wrote:
My question is: (1) is there an easy (some API, sorry I am not familar with the library) way to reverse edge direction?
Yes, the "reverse_graph" adaptor reverses the edge direction.
(2) is there an easy way to add a 'printf()' during BFS?
You can write your own BFS visitor, which has an "examine_vertex"
method that printf()'s the current vertex as it is processed.
The whole thing will look something like this:
struct print_visitor : boost::bfs_visitor<> {
template