<br><br><div class="gmail_quote">On Sat, Aug 13, 2011 at 4:07 AM, Jay Mahadeokar <span dir="ltr">&lt;<a href="mailto:jai.mahadeokar@gmail.com">jai.mahadeokar@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Kishore,<br><br>I read your report and saw the APSP_Johnson implementation. The prototype is:<br><pre><div style="background-color:transparent"><span>CREATE</span> <span>OR</span> <span>REPLACE</span> <span>FUNCTION</span> <span>apsp_johnson</span><span>(</span><span>sql</span> <span>text</span><span>)</span></div>


<div style="background-color:transparent">         <span>RETURNS</span> <span>SETOF</span> <span>apsp_edge</span></div><div style="background-color:transparent">
         <span>AS</span> <span>&#39;$libdir/librouting&#39;</span></div><div style="background-color:transparent">         <span>LANGUAGE</span> <span>&#39;C&#39;</span> <span>IMMUTABLE</span> <span>STRICT</span><span>;</span></div>


</pre><br>I guess this serves the same function as the apsp algorithm we already have[1]. <br><br>I think for your application, you need APSP for all vertices in the database table. So, if you use: <br><pre><span>SELECT</span> <span>*</span> <span>from</span> <span>all_pairs_shortest_path</span><br>


    <span>(</span><span>&#39;SELECT gid as id,source::integer,target::integer,length::double precision as cost </span><br><span>    from ways where source in (select distinct(source) from ways)&#39;</span><span>::</span><span>TEXT</span><br>


    <span>,</span><span>false</span><span>,</span><span>false</span><span>);</span><br><br></pre>
<br>it will solve your query. Please correct me if I am wrong, or any additional information is needed.<br><br>Also, Daniel, Steve - <br><br>Should we change my apsp implementation so that it gives option to use either johnsons boost implementation or warshall boost implementation? That would provide more options?  <br>


<pre><span></span>[1] <a href="https://github.com/pgRouting/pgrouting/wiki/APSP" target="_blank">https://github.com/pgRouting/pgrouting/wiki/APSP</a><br></pre><div><div></div><div class="h5"><br clear="all"></div></div></blockquote>

<div><br></div><div>Hi Jay,</div><div><br></div><div>Thank you very much for looking into this and for your comments! That&#39;s very valuable input.</div><div><br></div><div>Is it complicated to add this options?</div><div>

If it&#39;s not difficult, it would be nice to able to specify it as an option.</div><div><br></div><div>Daniel </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div class="h5"><br></div></div>-- <br>Regards,<br><font color="#888888">-Jay Mahadeokar<br><br>
</font><br>_______________________________________________<br>
pgrouting-dev mailing list<br>
<a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG &amp; Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66, 99, 171)" target="_blank">daniel.kastl@georepublic.de</a><br>

Web: <a href="http://georepublic.de/" style="color:rgb(66, 99, 171)" target="_blank">http://georepublic.de</a></span><br>