Skip to content

Commit 83a3201

Browse files
wifi:)wifi:)
authored andcommitted
(kingOrdering/sql) Adding SQL code for pgr_kingOrdering
1 parent 50ac5fa commit 83a3201

4 files changed

Lines changed: 99 additions & 1 deletion

File tree

sql/ordering/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
SET(LOCAL_FILES
22
_cuthillMckeeOrdering.sql
33
cuthillMckeeOrdering.sql
4+
_kingOrdering.sql
5+
kingOrdering.sql
46
)
57

68
# Do not modify below this line
@@ -12,4 +14,4 @@ foreach (f ${LOCAL_FILES})
1214
list(APPEND PACKAGE_SQL_FILES ${CMAKE_CURRENT_BINARY_DIR}/${f})
1315
endforeach()
1416

15-
set(PROJECT_SQL_FILES ${PROJECT_SQL_FILES} ${PACKAGE_SQL_FILES} PARENT_SCOPE)
17+
set(PROJECT_SQL_FILES ${PROJECT_SQL_FILES} ${PACKAGE_SQL_FILES} PARENT_SCOPE)

sql/ordering/_kingOrdering.sql

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*PGR-GNU*****************************************************************
2+
File: _kingOrdering.sql
3+
4+
Generated with Template by:
5+
Copyright (c) 2025 pgRouting developers
6+
Mail: project@pgrouting.org
7+
8+
Function's developer:
9+
Copyright (c) 2025 Fan Wu
10+
Mail: wifiblack0131 at gmail.com
11+
12+
------
13+
14+
This program is free software; you can redistribute it and/or modify
15+
it under the terms of the GNU General Public License as published by
16+
the Free Software Foundation; either version 2 of the License, or
17+
(at your option) any later version.
18+
19+
This program is distributed in the hope that it will be useful,
20+
but WITHOUT ANY WARRANTY; without even the implied warranty of
21+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22+
GNU General Public License for more details.
23+
24+
You should have received a copy of the GNU General Public License
25+
along with this program; if not, write to the Free Software
26+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27+
28+
********************************************************************PGR-GNU*/
29+
30+
--v4.0
31+
CREATE FUNCTION _pgr_kingOrdering(
32+
TEXT,
33+
OUT seq BIGINT,
34+
OUT node BIGINT
35+
)
36+
37+
RETURNS SETOF RECORD AS
38+
'MODULE_PATHNAME'
39+
LANGUAGE C VOLATILE STRICT
40+
COST ${COST_HIGH} ROWS ${ROWS_HIGH};
41+
42+
43+
COMMENT ON FUNCTION _pgr_kingOrdering(TEXT)
44+
IS 'pgRouting internal function';

sql/ordering/kingOrdering.sql

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*PGR-GNU*****************************************************************
2+
File: kingOrdering.sql
3+
4+
Generated with Template by:
5+
Copyright (c) 2025 pgRouting developers
6+
Mail: project@pgrouting.org
7+
8+
Function's developer:
9+
Copyright (c) 2025 Fan Wu
10+
Mail: wifiblack0131 at gmail.com
11+
12+
------
13+
14+
This program is free software; you can redistribute it and/or modify
15+
it under the terms of the GNU General Public License as published by
16+
the Free Software Foundation; either version 2 of the License, or
17+
(at your option) any later version.
18+
19+
This program is distributed in the hope that it will be useful,
20+
but WITHOUT ANY WARRANTY; without even the implied warranty of
21+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22+
GNU General Public License for more details.
23+
24+
You should have received a copy of the GNU General Public License
25+
along with this program; if not, write to the Free Software
26+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27+
28+
********************************************************************PGR-GNU*/
29+
30+
--v4.0
31+
CREATE FUNCTION pgr_kingOrdering(
32+
TEXT, -- edges_sql (required)
33+
OUT seq BIGINT,
34+
OUT node BIGINT)
35+
RETURNS SETOF RECORD AS
36+
$BODY$
37+
SELECT seq, node
38+
FROM _pgr_kingOrdering(_pgr_get_statement($1));
39+
$BODY$
40+
LANGUAGE SQL VOLATILE STRICT
41+
COST ${COST_HIGH} ROWS ${ROWS_HIGH};
42+
43+
COMMENT ON FUNCTION pgr_kingOrdering(TEXT)
44+
IS 'pgr_kingOrdering
45+
- EXPERIMENTAL
46+
- Parameters:
47+
- Edges SQL with columns: id, source, target, cost [,reverse_cost]
48+
- Documentation:
49+
- ${PROJECT_DOC_LINK}/pgr_kingOrdering.html
50+
';

sql/sigs/pgrouting--4.0.sig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ _pgr_isplanar(text)
164164
pgr_isplanar(text)
165165
_pgr_johnson(text,boolean)
166166
pgr_johnson(text,boolean)
167+
_pgr_kingordering(text)
168+
pgr_kingordering(text)
167169
pgr_kruskalbfs(text,anyarray,bigint)
168170
pgr_kruskalbfs(text,bigint,bigint)
169171
pgr_kruskaldd(text,anyarray,double precision)

0 commit comments

Comments
 (0)