
7 Aug
2008
7 Aug
'08
3:41 p.m.
Hi, I am using BFS to find the shortest path between two nodes as suggested in the documentation for unweighted graphs (or all weights == 1). I have written a visitor and can now access a shortest path from the start vertex to the vertex of interest. ==================================================================== My question is: HOW to stop further BFS traversal of the graph? ==================================================================== Is there a possibility e.g. by emptying the vertex queue (e.g. by the visitor)? Or some other, more elegant way to do? Thanks in advance for your help, Martin