equal
deleted
inserted
replaced
181 SmartGraph::NodeMap<SmartGraph::Edge> em(G); |
181 SmartGraph::NodeMap<SmartGraph::Edge> em(G); |
182 |
182 |
183 MyVisitedMap vm(G); |
183 MyVisitedMap vm(G); |
184 |
184 |
185 |
185 |
186 //bfs(G,n).run(); |
186 //Runs BFS on graph 'G' from node 's'. |
187 |
187 //(It practically does nothing, for it throws away its result.) |
|
188 bfs(G,s).run(); |
|
189 |
|
190 //Runs BFS on graph 'G' from node 's'. Puts the predessor nodes to 'm'. |
188 bfs(G,s).setPredNodeMap(m).run(); |
191 bfs(G,s).setPredNodeMap(m).run(); |
189 |
192 |
|
193 //Runs BFS on graph 'G' from node 's'. |
|
194 //Puts the predessor nodes to 'm' and the edges of the bfs tree to 'em'. |
190 bfs(G,s).setPredNodeMap(m).setPredEdgeMap(em).run(); |
195 bfs(G,s).setPredNodeMap(m).setPredEdgeMap(em).run(); |
191 |
196 |
|
197 //Runs BFS on graph 'G' from node 's'. |
|
198 //It uses a scpecial 'visited map' that prints out the reached nodes. |
192 bfs(G,s).setVisitMap(vm).run(); |
199 bfs(G,s).setVisitMap(vm).run(); |
193 |
200 |
194 } |
201 } |