src/work/athos/bfs_test.cc
changeset 1167 ccbca6ba8b59
parent 921 818510fa3d99
equal deleted inserted replaced
1:c5732430357c 2:340fa074d605
    39     while (!bfs_queue.empty()) {
    39     while (!bfs_queue.empty()) {
    40       Node v=bfs_queue.front();	
    40       Node v=bfs_queue.front();	
    41       bfs_queue.pop();
    41       bfs_queue.pop();
    42       OutEdgeIt e;
    42       OutEdgeIt e;
    43       for(g.first(e,v); g.valid(e); g.next(e)) {
    43       for(g.first(e,v); g.valid(e); g.next(e)) {
    44 	Node w=g.head(e);
    44 	Node w=g.target(e);
    45 	if (!reached[w]) {
    45 	if (!reached[w]) {
    46 	  bfs_queue.push(w);
    46 	  bfs_queue.push(w);
    47 	  reached.set(w, true);
    47 	  reached.set(w, true);
    48 	  pred.set(w, e);
    48 	  pred.set(w, e);
    49 	}
    49 	}