Connected vertices question

Topics: graph
Sep 11, 2008 at 9:58 PM
Edited Sep 11, 2008 at 10:17 PM
This one should be pretty easy but I just started using this library and still can't figure it out.
After I populate an Undirected graph I want to find all the vertices connected (directly and indirectly) to a particular Vertex.
What would be a simple way to do this?
Thanks a lot

Sep 12, 2008 at 12:18 AM
You can do an undirected depth first search starting from that node.
Hook to the DiscoverVertex to see the vertices being touched by the DFS.
Sep 12, 2008 at 2:35 AM
Thanks for the quick reply. That solved my problem.
Btw, great piece of code you got there