Skip to content

Commit 48aa076

Browse files
committed
[pgr_aStarCost] apply rfc-3
1 parent 0325935 commit 48aa076

1 file changed

Lines changed: 24 additions & 16 deletions

File tree

sql/astar/astarCost.sql

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
2828
********************************************************************PGR-GNU*/
2929

3030
CREATE OR REPLACE FUNCTION pgr_aStarCost(
31-
edges_sql TEXT, -- XY edges sql
32-
start_vid BIGINT,
33-
end_vid BIGINT,
31+
TEXT, -- edges sql (required)
32+
BIGINT, -- from_vid (required)
33+
BIGINT, -- to_vid (required)
34+
3435
directed BOOLEAN DEFAULT true,
3536
heuristic INTEGER DEFAULT 5,
3637
factor FLOAT DEFAULT 1.0,
@@ -51,9 +52,10 @@ COST 100
5152
ROWS 1000;
5253

5354
CREATE OR REPLACE FUNCTION pgr_aStarCost(
54-
edges_sql TEXT, -- XY edges sql
55-
start_vid BIGINT,
56-
end_vids ANYARRAY,
55+
TEXT, -- edges sql (required)
56+
BIGINT, -- from_vid (required)
57+
ANYARRAY, -- to_vids (required)
58+
5759
directed BOOLEAN DEFAULT true,
5860
heuristic INTEGER DEFAULT 5,
5961
factor FLOAT DEFAULT 1.0,
@@ -73,9 +75,10 @@ COST 100
7375
ROWS 1000;
7476

7577
CREATE OR REPLACE FUNCTION pgr_aStarCost(
76-
edges_sql TEXT, -- XY edges sql
77-
start_vids ANYARRAY,
78-
end_vid BIGINT,
78+
TEXT, -- edges sql (required)
79+
ANYARRAY, -- from_vids (required)
80+
BIGINT, -- to_vid (required)
81+
7982
directed BOOLEAN DEFAULT true,
8083
heuristic INTEGER DEFAULT 5,
8184
factor FLOAT DEFAULT 1.0,
@@ -95,9 +98,10 @@ COST 100
9598
ROWS 1000;
9699

97100
CREATE OR REPLACE FUNCTION pgr_aStarCost(
98-
edges_sql TEXT, -- XY edges sql
99-
start_vids ANYARRAY,
100-
end_vids ANYARRAY,
101+
TEXT, -- edges sql (required)
102+
ANYARRAY, -- from_vids (required)
103+
ANYARRAY, -- to_vids (required)
104+
101105
directed BOOLEAN DEFAULT true,
102106
heuristic INTEGER DEFAULT 5,
103107
factor FLOAT DEFAULT 1.0,
@@ -120,7 +124,11 @@ ROWS 1000;
120124

121125
-- COMMENTS
122126

123-
COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
124-
COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
125-
COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
126-
COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
127+
COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT)
128+
IS 'pgr_aStarCost--One to One--(edges_sql(id,source,target,cost[,reverse_cost],x1,y1,x2,y2), from_vid, to_vid [,directed ,heuristic, factor ,epsilon])';
129+
COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT)
130+
IS 'pgr_aStarCost--One to Many--(edges_sql(id,source,target,cost[,reverse_cost],x1,y1,x2,y2), from_vid, to_vids [,directed, heuristic, factor, epsilon])';
131+
COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT)
132+
IS 'pgr_aStarCost--Many to One--(edges_sql(id,source,target,cost[,reverse_cost],x1,y1,x2,y2), from_vids, to_vid [,directed, heuristic, factor, epsilon])';
133+
COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT)
134+
IS 'pgr_aStarCost--Many to Many--(edges_sql(id,source,target,cost[,reverse_cost],x1,y1,x2,y2), from_vids, to_vids [,directed, heuristic, factor, epsilon])';

0 commit comments

Comments
 (0)