<div dir="ltr"><span style="font-family:monospace,monospace">Hey dear list,<br>this is my first post,<br>so sorry if my question <div class="gmail_default" style="font-family:monospace,monospace;display:inline">​feels strange.<br>​I use the latest pgr with 9.3 postgres<br>"(2.1.0,pgrouting-2.1.0,1,b38118a,master,1.54.0)"<br><br>​</div><br>I can't figure out how to use the result of the<br><div class="gmail_default" style="font-family:monospace,monospace;display:inline">​<span style="font-family:monospace,monospace">`</span>​</div>pgr_apspWarshall<div class="gmail_default" style="font-family:monospace,monospace;display:inline">​`​</div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">​ ​</div></span><div class="gmail_default" style="display:inline"><span style="font-family:monospace,monospace">​​function<br></span></div><div class="gmail_default" style="display:inline"><span style="font-family:monospace,monospace">According to the doc, it is supposed to<br>"</span><span style="font-family:monospace,monospace">Returns all costs for each pair of nodes in the graph."<br></span></div><span style="font-family:monospace,monospace"><br><div class="gmail_default" style="font-family:monospace,monospace;display:inline">​OK, so using the sample data,<br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">with a graph of 17 nodes, the results should be <br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">17 * ( 17 - 1 ) / 2​ costs, that is 136 edges .<br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">Yet I get only 74 edges.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">In short the algorithm seems to not use at all the <br>"<span style="font-family:monospace,monospace">directed</span>" parameter (true of false returns the same result).<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">Even when manually duplicating all edges to create a directed graph that is equivalent to an undirected graph (2 directed edges instead of 1 undirected edge), I still don't get the right result number (160). (same for jonhson)<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">Morevover, what's the point to return in the result all the <br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">source, target, cost<br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">X     , X     , 0<br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">, this is only bloating the result imo.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">At first I thought you had choose to return the shortest path tree for better memory management, but it doesn't seems to be the case<br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">(could be a good idea).<br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline"><br><br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">I tracked the problem to <br>'<a href="https://github.com/pgRouting/pgrouting/blob/master/src/apsp_warshall/src/apsp_boost_wrapper.cpp">https://github.com/pgRouting/pgrouting/blob/master/src/apsp_warshall/src/apsp_boost_wrapper.cpp</a>'<br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">, which is the function that get called at the end.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">It seems that the argument 'directed' is never used!<br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline"><br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">The querry is <br>-------------<br>SELECT seq, id1 AS source, id2 AS destination, cost aS cost_<br>        FROM pgr_apspWarshall(<br>        'SELECT id, source, target, cost FROM edge_table_test',<br>        directed:=false, has_reverse_cost:=false<br>--------------<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">Lastly the doc is out of data at<br>"<a href="http://docs.pgrouting.org/2.1/src/apsp_warshall/doc/index.html#pgr-apsp-warshall">http://docs.pgrouting.org/2.1/src/apsp_warshall/doc/index.html#pgr-apsp-warshall</a>"<br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">in 2.1 the argument is no more "<span class="">reverse_cos</span>t"<br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">but "<span style="font-family:monospace,monospace">has_reverse_cost</span>"<br><br><br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">Cheers,<br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">Rémi-C<br></div><div class="gmail_default" style="font-family:monospace,monospace;display:inline"><br><br></div><br></span></div>