[英]How does shortest path work in pgrouting?
I'm trying to find how the implementation of shortest_path() in pgRouting works. 我试图找到pgRouting中shortest_path()的实现是如何工作的。
This is the function definition: 这是函数定义:
CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer,target_id integer, directed boolean, has_reverse_cost boolean)
RETURNS SETOF path_result AS '$libdir/librouting', 'shortest_path'
LANGUAGE c IMMUTABLE STRICT
COST 1
ROWS 1000;
ALTER FUNCTION shortest_path(text, integer, integer, boolean, boolean) OWNER TO postgres;
My questions are: 我的问题是:
Here is the source for dijkstra.c. 这是dijkstra.c 的源代码 。 You can read this code to see what the function is doing.
您可以阅读此代码以查看该功能正在执行的操作。 The SQL you posted just shows the binding to the native C function.
您发布的SQL只显示与本机C函数的绑定。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.