<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote"><br><div>Why not just visualize the graph in VTK? This is the visualization toolkit after all ...</div>


<div><br></div><div>vtkGraphLayoutView* view = vtkGraphLayoutView::New();</div><div>view-&gt;AddRepresentationFromInput(G);</div><div><br></div><div>view-&gt;ResetCamera();</div><div>view-&gt;Render();</div><div>view-&gt;GetInteractor()-&gt;Start();</div>


<div><br></div><div>The view has a vtkGraphLayout filter inside, and allows you to change the layout strategy (which defaults to a force-directed strategy).</div><div><br></div><div>You can also use vtkBoostConnectedComponents to see if your graph is indeed connected. Just get the output of the filter, extract the vertex array named &quot;component&quot;, and see if the max value is indeed 0.</div>


<div><br></div><div>Jeff</div></div><br>
</blockquote></div><br>Jeff,<br><br>Very cool! This visualization is fantastic! I made a demo of it here:<br><a href="http://www.vtk.org/Wiki/Visualize_a_graph" target="_blank">http://www.vtk.org/Wiki/Visualize_a_graph</a><br>
<br>The connected component filter is exactly what I wrote yesterday, dang... haha I guess we&#39;ll call that one a good exercise for me.<br><br>I also made an example of this:<br><a href="http://www.vtk.org/Wiki/Find_Connected_Components">http://www.vtk.org/Wiki/Find_Connected_Components</a><br>
<br>Now that I have some nice tools I&#39;ll go check out my real problem...<br><br clear="all">Thanks,<br><br>David<br>