<p>Thank you, taking a look</p>
<div class="gmail_quote">On 16 Apr 2013 18:02, "Stephen Woodbridge" <<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 4/16/2013 10:49 AM, Pavel Iacovlev wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I have a graph and I want to find all the the disconnected nodes, and by<br>
"disconnected" I mean all the nodes that have no path to node A. There<br>
is a case where A can be more then 1 node, and I need to find out if<br>
there is a path to at least one of them.<br>
<br>
My first idea is just to route to A from each node, easy to implement,<br>
but if I will have many nodes this will prove problematic.<br>
<br>
Any ideas how to do this more efficiently inside PostgreSQL ?<br>
</blockquote>
<br>
If you check out the sew-devel-2_0 branch in github you will find some graph analysis code that does this in src/common/sql/<br>
<br>
This can probably just copy the sql and use it. Or at least look at it for how it works. Ask if you have questions.<br>
<br>
This branch is stable at the moment if you want to clone it and build it and give it a test run. It installs on pg 9.1+ as an extension:<br>
<br>
create extension pgrouting;<br>
<br>
-Steve<br>
<br>
______________________________<u></u>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
</blockquote></div>