diff --git a/NEWS b/NEWS index 98ef453ac24..aa941ac60ee 100644 --- a/NEWS +++ b/NEWS @@ -161,6 +161,9 @@ Changes on the documentation to the following: * using bootstrap_version 2 because 3+ does not do dropdowns +**pgtap tests** + +* [#2559](https://github.com/pgRouting/pgrouting/issues/2559) pgtap test using sampledata **Build fixes** diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index 3caf9a318c0..87a0cd441fd 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -123,6 +123,9 @@ Changes on the documentation to the following: * using bootstrap_version 2 because 3+ does not do dropdowns +.. rubric:: pgtap tests + +* `#2559 `__ pgtap test using sampledata .. rubric:: Build fixes diff --git a/doc/src/sampledata.rst b/doc/src/sampledata.rst index b6e2e7c841d..add1d71bcc0 100644 --- a/doc/src/sampledata.rst +++ b/doc/src/sampledata.rst @@ -211,38 +211,13 @@ will be stored on a table. :start-after: -- p1 :end-before: -- p2 -Points of interest geometry +Points of interest fillup +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -Inserting the data of the points of interest: .. literalinclude:: sampledata.queries :start-after: -- p2 :end-before: -- p3 -Points of interest fillup -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -Using :doc:`pgr_findCloseEdges` -Calculating for visual purposes the points over the graph. - -.. literalinclude:: sampledata.queries - :start-after: -- p3 - :end-before: -- p4 - -A special case to arrive from both sides of the edge. -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -.. literalinclude:: sampledata.queries - :start-after: -- p4 - :end-before: -- p5 - -Points of interest data -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -.. literalinclude:: sampledata.queries - :start-after: -- p5 - :end-before: -- p6 - .. pois_end Support tables diff --git a/docqueries/src/sampledata.result b/docqueries/src/sampledata.result index 2e6d42cf7bf..e2f362aa791 100644 --- a/docqueries/src/sampledata.result +++ b/docqueries/src/sampledata.result @@ -156,50 +156,18 @@ CREATE TABLE pointsOfInterest( edge_id BIGINT, side CHAR, fraction FLOAT, - geom geometry, - newPoint geometry); + geom geometry); CREATE TABLE /* -- p2 */ -INSERT INTO pointsOfInterest (geom) VALUES -(ST_POINT(1.8, 0.4)), -(ST_POINT(4.2, 2.4)), -(ST_POINT(2.6, 3.2)), -(ST_POINT(0.3, 1.8)), -(ST_POINT(2.9, 1.8)), -(ST_POINT(2.2, 1.7)); +INSERT INTO pointsOfInterest (edge_id, side, fraction, geom) VALUES +(1, 'l' , 0.4, ST_POINT(1.8, 0.4)), +(15, 'r' , 0.4, ST_POINT(4.2, 2.4)), +(12, 'l' , 0.6, ST_POINT(2.6, 3.2)), +(6, 'r' , 0.3, ST_POINT(0.3, 1.8)), +(5, 'l' , 0.8, ST_POINT(2.9, 1.8)), +(4, 'b' , 0.7, ST_POINT(2.2, 1.7)); INSERT 0 6 /* -- p3 */ -UPDATE pointsOfInterest AS p SET - edge_id = q.edge_id, - side = q.side, - fraction = q.fraction, - newPoint = ST_endPoint(q.edge) -FROM (SELECT * FROM pgr_findCloseEdges( - $$SELECT id, geom FROM edges$$, - (SELECT array_agg(geom) FROM pointsOfInterest), - 0.5, partial => false)) AS q -WHERE p.geom = q.geom; -UPDATE 6 -/* -- p4 */ -UPDATE pointsOfInterest SET side = 'b' -WHERE pid = 6; -UPDATE 1 -/* -- p5 */ -SELECT pid, edge_id, side, fraction, - ST_AsText(geom), ST_AsText(newPoint) -FROM pointsOfInterest -ORDER BY pid; - pid | edge_id | side | fraction | st_astext | st_astext ------+---------+------+--------------------+----------------+-------------- - 1 | 1 | l | 0.4 | POINT(1.8 0.4) | POINT(2 0.4) - 2 | 15 | r | 0.3999999999999999 | POINT(4.2 2.4) | POINT(4 2.4) - 3 | 12 | l | 0.6000000000000001 | POINT(2.6 3.2) | POINT(2.6 3) - 4 | 6 | r | 0.3 | POINT(0.3 1.8) | POINT(0.3 2) - 5 | 5 | l | 0.8 | POINT(2.9 1.8) | POINT(3 1.8) - 6 | 4 | b | 0.7 | POINT(2.2 1.7) | POINT(2 1.7) -(6 rows) - -/* -- p6 */ /* --POINTS CREATE end */ /* --COMBINATIONS CREATE start */ /* -- c1 */ diff --git a/docqueries/src/withPoints-category.result b/docqueries/src/withPoints-category.result index 14b91de69a0..20deee8b5b2 100644 --- a/docqueries/src/withPoints-category.result +++ b/docqueries/src/withPoints-category.result @@ -4,14 +4,14 @@ SET client_min_messages TO NOTICE; SET /* --q1 */ SELECT pid, edge_id, fraction, side FROM pointsOfInterest; - pid | edge_id | fraction | side ------+---------+--------------------+------ - 1 | 1 | 0.4 | l - 4 | 6 | 0.3 | r - 3 | 12 | 0.6000000000000001 | l - 2 | 15 | 0.3999999999999999 | r - 5 | 5 | 0.8 | l - 6 | 4 | 0.7 | b + pid | edge_id | fraction | side +-----+---------+----------+------ + 1 | 1 | 0.4 | l + 2 | 15 | 0.4 | r + 3 | 12 | 0.6 | l + 4 | 6 | 0.3 | r + 5 | 5 | 0.8 | l + 6 | 4 | 0.7 | b (6 rows) /* --q2 */ @@ -25,9 +25,9 @@ FROM edges WHERE id = 15; /* --q3 */ SELECT pid, edge_id, fraction, side FROM pointsOfInterest WHERE pid = 2; - pid | edge_id | fraction | side ------+---------+--------------------+------ - 2 | 15 | 0.3999999999999999 | r + pid | edge_id | fraction | side +-----+---------+----------+------ + 2 | 15 | 0.4 | r (1 row) /* --q4 */ diff --git a/docqueries/trsp/trsp_withPoints.result b/docqueries/trsp/trsp_withPoints.result index 2f075e28983..364d45241d0 100644 --- a/docqueries/trsp/trsp_withPoints.result +++ b/docqueries/trsp/trsp_withPoints.result @@ -17,10 +17,10 @@ SELECT * FROM pgr_trsp_withPoints( 2 | 2 | -1 | 10 | 5 | 1 | 1 | 0.4 3 | 3 | -1 | 10 | 6 | 4 | 0.7 | 1.4 4 | 4 | -1 | 10 | -6 | 4 | 0.3 | 2.1 - 5 | 5 | -1 | 10 | 7 | 8 | 1 | 2.4 - 6 | 6 | -1 | 10 | 11 | 9 | 1 | 3.4 - 7 | 7 | -1 | 10 | 16 | 15 | 0.4 | 4.4 - 8 | 8 | -1 | 10 | -2 | 15 | 0.6 | 4.8 + 5 | 5 | -1 | 10 | 7 | 10 | 1 | 2.4 + 6 | 6 | -1 | 10 | 8 | 12 | 0.6 | 3.4 + 7 | 7 | -1 | 10 | -3 | 12 | 0.4 | 4 + 8 | 8 | -1 | 10 | 12 | 13 | 1 | 4.4 9 | 9 | -1 | 10 | 17 | 15 | 1 | 5.4 10 | 10 | -1 | 10 | 16 | 16 | 1 | 6.4 11 | 11 | -1 | 10 | 15 | 3 | 1 | 7.4 @@ -79,29 +79,30 @@ SELECT * FROM pgr_trsp_withPoints( 5 | 5 | -1 | -3 | -3 | -1 | 0 | 4 6 | 1 | -1 | 1 | -1 | 1 | 1.4 | 0 7 | 2 | -1 | 1 | 6 | 4 | 1 | 1.4 - 8 | 3 | -1 | 1 | 7 | 8 | 1 | 2.4 - 9 | 4 | -1 | 1 | 11 | 9 | 1 | 3.4 - 10 | 5 | -1 | 1 | 16 | 15 | 2 | 4.4 - 11 | 6 | -1 | 1 | 16 | 9 | 1 | 6.4 - 12 | 7 | -1 | 1 | 11 | 8 | 1 | 7.4 - 13 | 8 | -1 | 1 | 7 | 7 | 1 | 8.4 - 14 | 9 | -1 | 1 | 3 | 6 | 1 | 9.4 - 15 | 10 | -1 | 1 | 1 | -1 | 0 | 10.4 - 16 | 1 | 6 | -3 | 6 | 4 | 1 | 0 - 17 | 2 | 6 | -3 | 7 | 10 | 1 | 1 - 18 | 3 | 6 | -3 | 8 | 12 | 0.6 | 2 - 19 | 4 | 6 | -3 | -3 | -1 | 0 | 2.6 - 20 | 1 | 6 | 1 | 6 | 4 | 1 | 0 - 21 | 2 | 6 | 1 | 7 | 10 | 1 | 1 - 22 | 3 | 6 | 1 | 8 | 12 | 1 | 2 - 23 | 4 | 6 | 1 | 12 | 13 | 1 | 3 - 24 | 5 | 6 | 1 | 17 | 15 | 1 | 4 - 25 | 6 | 6 | 1 | 16 | 9 | 1 | 5 - 26 | 7 | 6 | 1 | 11 | 8 | 1 | 6 - 27 | 8 | 6 | 1 | 7 | 7 | 1 | 7 - 28 | 9 | 6 | 1 | 3 | 6 | 1 | 8 - 29 | 10 | 6 | 1 | 1 | -1 | 0 | 9 -(29 rows) + 8 | 3 | -1 | 1 | 7 | 10 | 1 | 2.4 + 9 | 4 | -1 | 1 | 8 | 12 | 1 | 3.4 + 10 | 5 | -1 | 1 | 12 | 13 | 1 | 4.4 + 11 | 6 | -1 | 1 | 17 | 15 | 1 | 5.4 + 12 | 7 | -1 | 1 | 16 | 9 | 1 | 6.4 + 13 | 8 | -1 | 1 | 11 | 8 | 1 | 7.4 + 14 | 9 | -1 | 1 | 7 | 7 | 1 | 8.4 + 15 | 10 | -1 | 1 | 3 | 6 | 1 | 9.4 + 16 | 11 | -1 | 1 | 1 | -1 | 0 | 10.4 + 17 | 1 | 6 | -3 | 6 | 4 | 1 | 0 + 18 | 2 | 6 | -3 | 7 | 10 | 1 | 1 + 19 | 3 | 6 | -3 | 8 | 12 | 0.6 | 2 + 20 | 4 | 6 | -3 | -3 | -1 | 0 | 2.6 + 21 | 1 | 6 | 1 | 6 | 4 | 1 | 0 + 22 | 2 | 6 | 1 | 7 | 10 | 1 | 1 + 23 | 3 | 6 | 1 | 8 | 12 | 1 | 2 + 24 | 4 | 6 | 1 | 12 | 13 | 1 | 3 + 25 | 5 | 6 | 1 | 17 | 15 | 1 | 4 + 26 | 6 | 6 | 1 | 16 | 9 | 1 | 5 + 27 | 7 | 6 | 1 | 11 | 8 | 1 | 6 + 28 | 8 | 6 | 1 | 7 | 7 | 1 | 7 + 29 | 9 | 6 | 1 | 3 | 6 | 1 | 8 + 30 | 10 | 6 | 1 | 1 | -1 | 0 | 9 +(30 rows) /* --e5 */ SELECT * FROM pgr_trsp_withPoints( @@ -117,10 +118,10 @@ SELECT * FROM pgr_trsp_withPoints( 2 | 2 | -1 | 10 | 5 | 1 | 1 | 0.4 3 | 3 | -1 | 10 | 6 | 4 | 0.7 | 1.4 4 | 4 | -1 | 10 | -6 | 4 | 0.3 | 2.1 - 5 | 5 | -1 | 10 | 7 | 8 | 1 | 2.4 - 6 | 6 | -1 | 10 | 11 | 9 | 1 | 3.4 - 7 | 7 | -1 | 10 | 16 | 15 | 0.4 | 4.4 - 8 | 8 | -1 | 10 | -2 | 15 | 0.6 | 4.8 + 5 | 5 | -1 | 10 | 7 | 10 | 1 | 2.4 + 6 | 6 | -1 | 10 | 8 | 12 | 0.6 | 3.4 + 7 | 7 | -1 | 10 | -3 | 12 | 0.4 | 4 + 8 | 8 | -1 | 10 | 12 | 13 | 1 | 4.4 9 | 9 | -1 | 10 | 17 | 15 | 1 | 5.4 10 | 10 | -1 | 10 | 16 | 16 | 1 | 6.4 11 | 11 | -1 | 10 | 15 | 3 | 1 | 7.4 @@ -154,7 +155,6 @@ ELSE ' passes in front of' (-1 => -6) at 4th step: | visits | Point | 6 (-1 => -3) at 4th step: | passes in front of | Point | 6 (-1 => 10) at 4th step: | passes in front of | Point | 6 - (-1 => 10) at 6th step: | passes in front of | Vertex | 11 (-1 => 11) at 4th step: | passes in front of | Point | 6 (-1 => 11) at 6th step: | visits | Vertex | 11 (5 => -6) at 3th step: | visits | Point | 6 @@ -162,7 +162,7 @@ ELSE ' passes in front of' (5 => 10) at 3th step: | passes in front of | Point | 6 (5 => 11) at 3th step: | passes in front of | Point | 6 (5 => 11) at 5th step: | visits | Vertex | 11 -(11 rows) +(10 rows) /* --q2 */ SELECT * FROM pgr_trsp_withPoints( diff --git a/docqueries/utilities/findCloseEdges.result b/docqueries/utilities/findCloseEdges.result index 810c9f5f281..185071edbd1 100644 --- a/docqueries/utilities/findCloseEdges.result +++ b/docqueries/utilities/findCloseEdges.result @@ -200,7 +200,7 @@ FROM pgr_findCloseEdges( NOTICE: WITH edges_sql AS (SELECT id, geom FROM edges), -point_sql AS (SELECT unnest('{0101000000CDCCCCCCCCCCFC3F9A9999999999D93F:0101000000333333333333D33FCDCCCCCCCCCCFC3F:0101000000CDCCCCCCCCCC04409A99999999990940:0101000000CDCCCCCCCCCC10403333333333330340:01010000003333333333330740CDCCCCCCCCCCFC3F:01010000009A99999999990140333333333333FB3F}'::geometry[]) AS point), +point_sql AS (SELECT unnest('{0101000000CDCCCCCCCCCCFC3F9A9999999999D93F:0101000000CDCCCCCCCCCC10403333333333330340:0101000000CDCCCCCCCCCC04409A99999999990940:0101000000333333333333D33FCDCCCCCCCCCCFC3F:01010000003333333333330740CDCCCCCCCCCCFC3F:01010000009A99999999990140333333333333FB3F}'::geometry[]) AS point), results AS ( SELECT id::BIGINT AS edge_id, diff --git a/pgtap/allpairs/compare_directed.pg b/pgtap/allpairs/compare_directed.pg deleted file mode 100644 index 860b9881cda..00000000000 --- a/pgtap/allpairs/compare_directed.pg +++ /dev/null @@ -1,162 +0,0 @@ - -/*PGR-GNU***************************************************************** - -Copyright (c) 2018 pgRouting developers -Mail: project@pgrouting.org - ------- -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - ********************************************************************PGR-GNU*/ -BEGIN; - -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(15); - --- TESTS WITH DIRECTED - --- all values must be >= 0 -PREPARE q1 AS -SELECT * -FROM pgr_floydWarshall( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', - TRUE -) WHERE agg_cost < 0; - -PREPARE q2 AS -SELECT * -FROM pgr_floydWarshall( - 'SELECT id, source, target, cost FROM edge_table ORDER BY id', - TRUE -) WHERE agg_cost < 0; - -PREPARE q3 AS -SELECT * -FROM pgr_floydWarshall( - 'SELECT id, source, target, cost, -1::float as reverse_cost FROM edge_table ORDER BY id', - TRUE -) WHERE agg_cost < 0; - -PREPARE q4 AS -SELECT * -FROM pgr_floydWarshall( - 'SELECT id, source, target, -1::float as cost, reverse_cost FROM edge_table ORDER BY id', - TRUE -) WHERE agg_cost < 0; - - -SELECT is_empty('q1', '1: No cost can be negative'); -SELECT is_empty('q2', '2: No cost can be negative'); -SELECT is_empty('q3', '3: No cost can be negative'); -SELECT is_empty('q4', '4: No cost can be negative'); - -PREPARE q10 AS -SELECT * -FROM pgr_floydWarshall( - 'SELECT id, source, target, cost FROM edge_table ORDER BY id', - TRUE -); - -PREPARE q11 AS -SELECT * -FROM pgr_floydWarshall( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', - TRUE -); - -SELECT set_ne('q10', 'q11', '5: Results of with reverse_cost must be different of the one without it'); - -PREPARE q20 AS -SELECT * -FROM pgr_dijkstraCost( - 'SELECT id, source, target, cost FROM edge_table ORDER BY id', - ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17], - ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17] -); - -PREPARE q21 AS -SELECT * -FROM pgr_dijkstraCost( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', - ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17], - ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17] -); - -SELECT set_eq('q10', 'q20','6: With Out reverse_cost: Compare with (directed) pgr_dijkstraCost -> must give the same results'); -SELECT set_eq('q11', 'q21','7: With reverse_cost: Compare with (directed) pgr_dijkstraCost -> must give the same results'); - - -PREPARE q30 AS -SELECT * -FROM pgr_johnson( - 'SELECT id, source, target, cost FROM edge_table ORDER BY id', - TRUE -); - -PREPARE q31 AS -SELECT * -FROM pgr_johnson( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id' -); - -SELECT set_eq('q10', 'q30','8: With Out reverse_cost: Compare with (directed) pgr_johnson -> must give the same results'); -SELECT set_eq('q11', 'q31','9: With reverse_cost: Compare with (directed) pgr_johnson -> must give the same results'); - - - --- errors: - --- flags -SELECT lives_ok( - 'SELECT * FROM pgr_floydWarshall( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id'' - )', - '10: Documentation says works with no flags'); - -SELECT lives_ok( - 'SELECT * FROM pgr_floydWarshall( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id'', - FALSE - )', - '11: Documentation says works with 1 flag'); - -SELECT throws_ok( - 'SELECT * FROM pgr_floydWarshall( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id'', - FALSE, TRUE - )','42883','function pgr_floydwarshall(unknown, boolean, boolean) does not exist', - '12: Documentation says it does work with 2 flags'); - -SELECT lives_ok( - 'SELECT * FROM pgr_johnson( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id'' - )', - '13: Documentation says works with no flags'); - -SELECT lives_ok( - 'SELECT * FROM pgr_johnson( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id'', - FALSE - )', - '14: Documentation says works with 1 flag'); - -SELECT throws_ok( - 'SELECT * FROM pgr_johnson( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id'', - FALSE, TRUE - )','42883','function pgr_johnson(unknown, boolean, boolean) does not exist', - '15: Documentation says it does work with 2 flags'); - - --- Finish the tests and clean up. -SELECT * FROM finish(); -ROLLBACK; diff --git a/pgtap/allpairs/compare_undirected.pg b/pgtap/allpairs/compare_undirected.pg deleted file mode 100644 index e713146683d..00000000000 --- a/pgtap/allpairs/compare_undirected.pg +++ /dev/null @@ -1,122 +0,0 @@ - -/*PGR-GNU***************************************************************** - -Copyright (c) 2018 pgRouting developers -Mail: project@pgrouting.org - ------- -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - ********************************************************************PGR-GNU*/ -BEGIN; - -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(9); - --- TESTS WITH DIRECTED - --- all values must be >= 0 -PREPARE q1 AS -SELECT * -FROM pgr_floydWarshall( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', - FALSE -) WHERE agg_cost < 0; - -PREPARE q2 AS -SELECT * -FROM pgr_floydWarshall( - 'SELECT id, source, target, cost FROM edge_table ORDER BY id', - FALSE -) WHERE agg_cost < 0; - -PREPARE q3 AS -SELECT * -FROM pgr_floydWarshall( - 'SELECT id, source, target, cost, -1::float as reverse_cost FROM edge_table ORDER BY id', - FALSE -) WHERE agg_cost < 0; - -PREPARE q4 AS -SELECT * -FROM pgr_floydWarshall( - 'SELECT id, source, target, -1::float as cost, reverse_cost FROM edge_table ORDER BY id', - FALSE -) WHERE agg_cost < 0; - - -SELECT is_empty('q1', '1: No cost can be negative'); -SELECT is_empty('q2', '2: No cost can be negative'); -SELECT is_empty('q3', '3: No cost can be negative'); -SELECT is_empty('q4', '4: No cost can be negative'); - -PREPARE q10 AS -SELECT * -FROM pgr_floydWarshall( - 'SELECT id, source, target, cost FROM edge_table ORDER BY id', - FALSE -); - -PREPARE q11 AS -SELECT * -FROM pgr_floydWarshall( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', - FALSE -); - -SELECT set_ne('q10', 'q11', '5: Results of with reverse_cost must be different of the one without it'); - -PREPARE q20 AS -SELECT * -FROM pgr_dijkstraCost( - 'SELECT id, source, target, cost FROM edge_table ORDER BY id', - ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17], - ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17], - FALSE -); - -PREPARE q21 AS -SELECT * -FROM pgr_dijkstraCost( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', - ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17], - ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17], - FALSE -); - -SELECT set_eq('q10', 'q20','6: With Out reverse_cost: Compare with (directed) pgr_dijkstraCost -> must give the same results'); -SELECT set_eq('q11', 'q21','7: With reverse_cost: Compare with (directed) pgr_dijkstraCost -> must give the same results'); - - -PREPARE q30 AS -SELECT * -FROM pgr_johnson( - 'SELECT id, source, target, cost FROM edge_table ORDER BY id', - FALSE -); - -PREPARE q31 AS -SELECT * -FROM pgr_johnson( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', - FALSE -); - -SELECT set_eq('q10', 'q30','8: With Out reverse_cost: Compare with (directed) pgr_johnson -> must give the same results'); -SELECT set_eq('q11', 'q31','9: With reverse_cost: Compare with (directed) pgr_johnson -> must give the same results'); - - - - --- Finish the tests and clean up. -SELECT * FROM finish(); -ROLLBACK; diff --git a/pgtap/allpairs/floydWarshall/compare_dijkstra.pg b/pgtap/allpairs/floydWarshall/compare_dijkstra.pg new file mode 100644 index 00000000000..a128f532295 --- /dev/null +++ b/pgtap/allpairs/floydWarshall/compare_dijkstra.pg @@ -0,0 +1,29 @@ +/*PGR-GNU***************************************************************** + +Copyright (c) 2023 pgRouting developers +Mail: project@pgrouting.org + +------ +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + ********************************************************************PGR-GNU*/ + +BEGIN; + +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +SELECT plan(4); + +SELECT allPairs_compare_dijkstra('pgr_floydWarshall', true); +SELECT allPairs_compare_dijkstra('pgr_floydWarshall', false); + +SELECT finish(); +ROLLBACK; diff --git a/pgtap/allpairs/floydWarshall/edge_cases.pg b/pgtap/allpairs/floydWarshall/edge_cases.pg index c6b97c626fa..813870442f5 100644 --- a/pgtap/allpairs/floydWarshall/edge_cases.pg +++ b/pgtap/allpairs/floydWarshall/edge_cases.pg @@ -1,4 +1,3 @@ - /*PGR-GNU***************************************************************** Copyright (c) 2018 pgRouting developers @@ -20,53 +19,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); +SELECT plan(15); -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(4); - -PREPARE q1 AS -SELECT * FROM pgr_floydWarshall( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table' -); +SELECT test_agg_cost('pgr_floydWarshall', true); +SELECT test_agg_cost('pgr_floydWarshall', false); +SELECT allPairs_test_flags('pgr_floydwarshall'); PREPARE q2 AS SELECT * FROM pgr_floydWarshall( - 'SELECT source, target, cost, reverse_cost FROM edge_table' + 'SELECT source, target, cost, reverse_cost FROM edges' ); - PREPARE q3 AS SELECT * FROM pgr_floydWarshall( - 'SELECT source, target, cost FROM edge_table', + 'SELECT source, target, cost FROM edges', true ); - -SELECT lives_ok('q1', 'SHOULD WORK: without flag & with id'); -SELECT lives_ok('q2', 'SHOULD WORK: without flag'); -SELECT lives_ok('q3', 'SHOULD WORK: with flag'); - - --- CHECKING THE RETURN TYPES -PREPARE v21q00 AS -SELECT pg_typeof(start_vid)::text AS t1, - pg_typeof(end_vid)::text AS t2, - pg_typeof(agg_cost)::TEXT AS t3 -FROM ( - SELECT * FROM pgr_floydWarshall( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table' - )) AS a -LIMIT 1 -; - -PREPARE v21q01 AS -SELECT 'bigint'::text AS t1, - 'bigint'::text AS t2, - 'double precision'::text AS t3; - -SELECT set_eq('v21q00', 'v21q01','Expected columns names & types'); - - +SELECT lives_ok('q2', 'SHOULD WORK: without id with flag'); +SELECT lives_ok('q3', 'SHOULD WORK: without id, with flag'); SELECT finish(); ROLLBACK; diff --git a/pgtap/allpairs/floydWarshall/inner_query.pg b/pgtap/allpairs/floydWarshall/inner_query.pg index 8c133380ebf..6aba138d415 100644 --- a/pgtap/allpairs/floydWarshall/inner_query.pg +++ b/pgtap/allpairs/floydWarshall/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(96); diff --git a/pgtap/allpairs/floydWarshall/no_crash_test.pg b/pgtap/allpairs/floydWarshall/no_crash_test.pg index 6e380ee8b64..1602a66269a 100644 --- a/pgtap/allpairs/floydWarshall/no_crash_test.pg +++ b/pgtap/allpairs/floydWarshall/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; SELECT isnt_empty('edges', 'Should not be empty true to tests be meaningful'); @@ -34,7 +34,7 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$']::TEXT[]; + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$']::TEXT[]; subs = ARRAY[ 'NULL' ]::TEXT[]; diff --git a/pgtap/allpairs/johnson/compare_dijkstra.pg b/pgtap/allpairs/johnson/compare_dijkstra.pg new file mode 100644 index 00000000000..cb9975c50b9 --- /dev/null +++ b/pgtap/allpairs/johnson/compare_dijkstra.pg @@ -0,0 +1,29 @@ +/*PGR-GNU***************************************************************** + +Copyright (c) 2018 pgRouting developers +Mail: project@pgrouting.org + +------ +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + ********************************************************************PGR-GNU*/ + +BEGIN; + +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +SELECT plan(4); + +SELECT allPairs_compare_dijkstra('pgr_johnson', true); +SELECT allPairs_compare_dijkstra('pgr_johnson', false); + +SELECT finish(); +ROLLBACK; diff --git a/pgtap/allpairs/johnson/edge_cases.pg b/pgtap/allpairs/johnson/edge_cases.pg index e67336fc49e..85fd98f571d 100644 --- a/pgtap/allpairs/johnson/edge_cases.pg +++ b/pgtap/allpairs/johnson/edge_cases.pg @@ -1,4 +1,3 @@ - /*PGR-GNU***************************************************************** Copyright (c) 2018 pgRouting developers @@ -20,53 +19,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); +SELECT plan(15); -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(4); - -PREPARE q1 AS -SELECT * FROM pgr_johnson( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table' -); +SELECT test_agg_cost('pgr_johnson', true); +SELECT test_agg_cost('pgr_johnson', false); +SELECT allPairs_test_flags('pgr_johnson'); PREPARE q2 AS SELECT * FROM pgr_johnson( - 'SELECT source, target, cost, reverse_cost FROM edge_table' + 'SELECT source, target, cost, reverse_cost FROM edges' ); PREPARE q3 AS SELECT * FROM pgr_johnson( - 'SELECT source, target, cost FROM edge_table', + 'SELECT source, target, cost FROM edges', true ); - -SELECT lives_ok('q1', 'SHOULD WORK: without flag & with id'); -SELECT lives_ok('q2', 'SHOULD WORK: without flag'); -SELECT lives_ok('q3', 'SHOULD WORK: with flag'); - - --- CHECKING THE RETURN TYPES -PREPARE v21q00 AS -SELECT pg_typeof(start_vid)::text AS t1, - pg_typeof(end_vid)::text AS t2, - pg_typeof(agg_cost)::TEXT AS t3 -FROM ( - SELECT * FROM pgr_johnson( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table' - )) AS a -LIMIT 1 -; - -PREPARE v21q01 AS -SELECT 'bigint'::text AS t1, - 'bigint'::text AS t2, - 'double precision'::text AS t3; - -SELECT set_eq('v21q00', 'v21q01','Expected columns names & types'); - - +SELECT lives_ok('q2', 'SHOULD WORK: without id with flag'); +SELECT lives_ok('q3', 'SHOULD WORK: without id, with flag'); SELECT finish(); ROLLBACK; diff --git a/pgtap/allpairs/johnson/inner_query.pg b/pgtap/allpairs/johnson/inner_query.pg index 8d4a4076a4a..2f210d47a92 100644 --- a/pgtap/allpairs/johnson/inner_query.pg +++ b/pgtap/allpairs/johnson/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(96); SELECT style_dijkstra_no_id('pgr_johnson(', ', true)'); diff --git a/pgtap/allpairs/johnson/no_crash_test.pg b/pgtap/allpairs/johnson/no_crash_test.pg index b7e0a5c4f42..374a824d82d 100644 --- a/pgtap/allpairs/johnson/no_crash_test.pg +++ b/pgtap/allpairs/johnson/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; SELECT isnt_empty('edges', 'Should not be empty true to tests be meaningful'); @@ -34,7 +34,7 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$']::TEXT[]; + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$']::TEXT[]; subs = ARRAY[ 'NULL' ]::TEXT[]; diff --git a/pgtap/alpha_shape/edge_cases/issue_544.pg b/pgtap/alpha_shape/edge_cases/issue_544.pg index 1af05cb1a32..930ab9e3bd8 100644 --- a/pgtap/alpha_shape/edge_cases/issue_544.pg +++ b/pgtap/alpha_shape/edge_cases/issue_544.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(3); --DROP TABLE nodes; diff --git a/pgtap/alpha_shape/edge_cases/notebook.pg b/pgtap/alpha_shape/edge_cases/notebook.pg index e5e96b34da3..029180d0c25 100644 --- a/pgtap/alpha_shape/edge_cases/notebook.pg +++ b/pgtap/alpha_shape/edge_cases/notebook.pg @@ -25,7 +25,7 @@ Benchmark test with data from: https://github.com/plotly/graphing-library-docs/blob/master/_posts/python-v3/scientific/alpha-shapes/data-ex-2d.txt https://plotly.com/python/v3/alpha-shapes/ */ -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(147); diff --git a/pgtap/alpha_shape/edge_cases/s_shape.pg b/pgtap/alpha_shape/edge_cases/s_shape.pg index 62f63d38454..f6cd700cff6 100644 --- a/pgtap/alpha_shape/edge_cases/s_shape.pg +++ b/pgtap/alpha_shape/edge_cases/s_shape.pg @@ -23,7 +23,7 @@ BEGIN; data from http://www.bostongis.com/postgis_concavehull.snippet */ -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(167); CREATE TABLE s_test(geom geometry); diff --git a/pgtap/alpha_shape/edge_cases/sampledata.pg b/pgtap/alpha_shape/edge_cases/sampledata.pg index 651c54fa196..17f9356c7a6 100644 --- a/pgtap/alpha_shape/edge_cases/sampledata.pg +++ b/pgtap/alpha_shape/edge_cases/sampledata.pg @@ -23,14 +23,14 @@ BEGIN; Test for old code VS new code results Data from sample data of the documentation */ -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); PREPARE q1 AS -SELECT ST_area(pgr_alphaShape) FROM pgr_alphaShape((SELECT ST_Collect(the_geom) FROM edge_table)); +SELECT ST_area(pgr_alphaShape) FROM pgr_alphaShape((SELECT ST_Collect(geom) FROM edges)); PREPARE q2 AS -SELECT ST_area(pgr_alphaShape((SELECT ST_Collect(the_geom) FROM edge_table), 1.582)); +SELECT ST_area(pgr_alphaShape((SELECT ST_Collect(geom) FROM edges), 1.582)); SELECT CASE WHEN _pgr_versionless((SELECT boost from pgr_full_version()), '1.54.0') THEN skip('pgr_alphaSahpe not supported when compiled with Boost version < 1.54.0', 2) @@ -40,25 +40,25 @@ SELECT CASE WHEN _pgr_versionless((SELECT boost from pgr_full_version()), '1.54. ) END; -SELECT alphaShape_tester('edge_table', 'the_geom', 0, false, 11.75, 9); -SELECT alphaShape_tester('edge_table', 'the_geom', 1.582, false, 11.75, 9); +SELECT alphaShape_tester('edges', 'geom', 0, false, 11.75, 9); +SELECT alphaShape_tester('edges', 'geom', 1.582, false, 11.75, 9); -- next area -SELECT alphaShape_tester('edge_table', 'the_geom', 1.581, false, 9.75, 12); +SELECT alphaShape_tester('edges', 'geom', 1.581, false, 9.75, 12); -- some additional values for spoon radius -SELECT alphaShape_tester('edge_table', 'the_geom', 1.5, false, 9.75, 12); -SELECT alphaShape_tester('edge_table', 'the_geom', 1.4, false, 9.75, 12); -SELECT alphaShape_tester('edge_table', 'the_geom', 1.3, false, 9.75, 12); -SELECT alphaShape_tester('edge_table', 'the_geom', 1.2, false, 9.75, 12); -SELECT alphaShape_tester('edge_table', 'the_geom', 1.1, false, 9.75, 12); -SELECT alphaShape_tester('edge_table', 'the_geom', 1.0, false, 9.75, 12); -SELECT alphaShape_tester('edge_table', 'the_geom', 0.9, false, 9.75, 12); -SELECT alphaShape_tester('edge_table', 'the_geom', 0.8, false, 8, 12); -SELECT alphaShape_tester('edge_table', 'the_geom', 0.7, false, 1.75, 10); +SELECT alphaShape_tester('edges', 'geom', 1.5, false, 9.75, 12); +SELECT alphaShape_tester('edges', 'geom', 1.4, false, 9.75, 12); +SELECT alphaShape_tester('edges', 'geom', 1.3, false, 9.75, 12); +SELECT alphaShape_tester('edges', 'geom', 1.2, false, 9.75, 12); +SELECT alphaShape_tester('edges', 'geom', 1.1, false, 9.75, 12); +SELECT alphaShape_tester('edges', 'geom', 1.0, false, 9.75, 12); +SELECT alphaShape_tester('edges', 'geom', 0.9, false, 9.75, 12); +SELECT alphaShape_tester('edges', 'geom', 0.8, false, 8, 12); +SELECT alphaShape_tester('edges', 'geom', 0.7, false, 1.75, 10); -- no area -SELECT alphaShape_tester('edge_table', 'the_geom', 0.4301, true, 0, 0); +SELECT alphaShape_tester('edges', 'geom', 0.4301, true, 0, 0); SELECT finish(); ROLLBACK; diff --git a/pgtap/alpha_shape/edge_cases/special_cases.pg b/pgtap/alpha_shape/edge_cases/special_cases.pg index 13d96fa7b18..aebfc254bb2 100644 --- a/pgtap/alpha_shape/edge_cases/special_cases.pg +++ b/pgtap/alpha_shape/edge_cases/special_cases.pg @@ -19,29 +19,29 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(2); -- duplicated points are removed PREPARE q1 AS SELECT ST_Area(pgr_alphaShape( - (SELECT ST_Collect(the_geom) FROM edge_table_vertices_pgr) + (SELECT ST_Collect(geom) FROM vertices) )); PREPARE q2 AS SELECT ST_Area(pgr_alphaShape( (WITH data AS ( - SELECT the_geom FROM edge_table_vertices_pgr + SELECT geom FROM vertices UNION ALL - SELECT the_geom FROM edge_table_vertices_pgr) - SELECT ST_Collect(the_geom) FROM data) + SELECT geom FROM vertices) + SELECT ST_Collect(geom) FROM data) )); -- Ordering does not affect the result PREPARE q3 AS SELECT ST_Area(pgr_alphaShape( - (SELECT ST_Collect(the_geom) FROM edge_table) + (SELECT ST_Collect(geom) FROM edges) )); SELECT CASE WHEN _pgr_versionless((SELECT boost from pgr_full_version()), '1.54.0') diff --git a/pgtap/alpha_shape/no_crash_test.pg b/pgtap/alpha_shape/no_crash_test.pg index 53138f08d43..56390497e25 100644 --- a/pgtap/alpha_shape/no_crash_test.pg +++ b/pgtap/alpha_shape/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); PREPARE alpha_sql AS -SELECT the_geom FROM edge_table_vertices_pgr; +SELECT geom FROM vertices; SELECT isnt_empty('alpha_sql', 'Should not be empty true to tests be meaningful'); @@ -38,7 +38,7 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY[$$(SELECT ST_Collect(the_geom) FROM edge_table_vertices_pgr)$$]::TEXT[]; + params = ARRAY[$$(SELECT ST_Collect(geom) FROM vertices)$$]::TEXT[]; subs = ARRAY[ 'NULL::geometry' ]::TEXT[]; diff --git a/pgtap/astar/aStarCostMatrix/inner_query.pg b/pgtap/astar/aStarCostMatrix/inner_query.pg index e4b3ad89b9c..152dd0c8343 100644 --- a/pgtap/astar/aStarCostMatrix/inner_query.pg +++ b/pgtap/astar/aStarCostMatrix/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(102); -- ONE MATRIX diff --git a/pgtap/astar/aStarCostMatrix/no_crash_test.pg b/pgtap/astar/aStarCostMatrix/no_crash_test.pg index 6268993df9d..8342a119d80 100644 --- a/pgtap/astar/aStarCostMatrix/no_crash_test.pg +++ b/pgtap/astar/aStarCostMatrix/no_crash_test.pg @@ -19,23 +19,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(15); -PREPARE edges AS -SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table; +PREPARE edges_q AS +SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); -SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); +SELECT isnt_empty('edges_q', 'Should be not empty to tests be meaningful'); SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); SELECT set_eq('null_ret_arr', 'SELECT NULL::BIGINT[]', 'Should be empty to tests be meaningful'); - CREATE OR REPLACE FUNCTION test_function() RETURNS SETOF TEXT AS $BODY$ @@ -44,10 +43,10 @@ params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY['$$edges$$','ARRAY[1,2]::BIGINT[]']::TEXT[]; + params = ARRAY['$$edges_q$$','ARRAY[5,6]::BIGINT[]']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_astarCostMatrix', params, subs); diff --git a/pgtap/astar/astar/compare_dijkstra/combinations.pg b/pgtap/astar/astar/compare_dijkstra/combinations.pg index 37335a23ca4..e26e6f9aec6 100644 --- a/pgtap/astar/astar/compare_dijkstra/combinations.pg +++ b/pgtap/astar/astar/compare_dijkstra/combinations.pg @@ -25,7 +25,7 @@ BEGIN; SELECT CASE WHEN min_version('3.2.0') THEN plan(4) ELSE plan(1) END; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION astarCompareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -44,13 +44,13 @@ BEGIN END IF; data := ' path_seq, start_vid, end_vid, round(cost::numeric,8) AS cost, round(agg_cost::numeric,8) AS agg_cost '; - vids := ' SELECT * FROM combinations_table '; + vids := ' SELECT * FROM combinations '; ----------------------- -- with reverse cost ----------------------- - inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'; -- DIRECTED dijkstra_sql := 'SELECT ' || data || ' FROM pgr_dijkstra($$' || inner_sql || '$$, $$' || vids || '$$, true)'; astar_sql := 'SELECT ' || data || ' FROM pgr_astar($$' || inner_sql || '$$, $$' || vids || '$$, true, heuristic := 0)'; @@ -65,7 +65,7 @@ BEGIN -- NO reverse cost ----------------------- -- DIRECTED - inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || data || ' FROM pgr_dijkstra($$' || inner_sql || '$$, $$' || vids || '$$, true)'; astar_sql := 'SELECT ' || data || ' FROM pgr_astar($$' || inner_sql || '$$, $$' || vids || '$$, true, heuristic := 0)'; RETURN query SELECT set_eq(astar_sql, dijkstra_sql, astar_sql); diff --git a/pgtap/astar/astar/compare_dijkstra/many_to_many.pg b/pgtap/astar/astar/compare_dijkstra/many_to_many.pg index 944298c6a17..bcd15bb190e 100644 --- a/pgtap/astar/astar/compare_dijkstra/many_to_many.pg +++ b/pgtap/astar/astar/compare_dijkstra/many_to_many.pg @@ -25,7 +25,7 @@ BEGIN; SELECT plan(4); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION astarCompareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -45,7 +45,7 @@ BEGIN -- with reverse cost ----------------------- -- DIRECTED - inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || data || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || vids || ',' || vids || ', true)'; @@ -65,7 +65,7 @@ BEGIN -- NO reverse cost ----------------------- -- DIRECTED - inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || data || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || vids || ',' || vids || ', true)'; diff --git a/pgtap/astar/astar/compare_dijkstra/many_to_one.pg b/pgtap/astar/astar/compare_dijkstra/many_to_one.pg index 8b41a45620b..277f116dbd7 100644 --- a/pgtap/astar/astar/compare_dijkstra/many_to_one.pg +++ b/pgtap/astar/astar/compare_dijkstra/many_to_one.pg @@ -27,7 +27,7 @@ SELECT plan(68); SET client_min_messages TO ERROR; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION astarCompareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -53,7 +53,7 @@ BEGIN -- with reverse cost ----------------------- -- DIRECTED - inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || data || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || vids || ',' || i || ', true)'; @@ -73,7 +73,7 @@ BEGIN -- NO reverse cost ----------------------- -- DIRECTED - inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || data || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || vids || ',' || i || ', true)'; diff --git a/pgtap/astar/astar/compare_dijkstra/one_to_many.pg b/pgtap/astar/astar/compare_dijkstra/one_to_many.pg index 31e12dc176e..f448a22e046 100644 --- a/pgtap/astar/astar/compare_dijkstra/one_to_many.pg +++ b/pgtap/astar/astar/compare_dijkstra/one_to_many.pg @@ -27,7 +27,7 @@ SELECT plan(68); SET client_min_messages TO ERROR; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION astarCompareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -53,7 +53,7 @@ BEGIN -- with reverse cost ----------------------- -- DIRECTED - inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || data || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || vids || ', true)'; @@ -73,7 +73,7 @@ BEGIN -- NO reverse cost ----------------------- -- DIRECTED - inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || data || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || vids || ', true)'; diff --git a/pgtap/astar/astar/compare_dijkstra/one_to_one.pg b/pgtap/astar/astar/compare_dijkstra/one_to_one.pg index 2c9e8d2a4b9..ec6d0436212 100644 --- a/pgtap/astar/astar/compare_dijkstra/one_to_one.pg +++ b/pgtap/astar/astar/compare_dijkstra/one_to_one.pg @@ -25,7 +25,7 @@ BEGIN; SELECT plan(612); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION astarCompareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -46,7 +46,7 @@ BEGIN FOR j IN 1.. cant LOOP -- DIRECTED WITH REVERSE COST - inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || result_columns || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', true)'; @@ -56,7 +56,7 @@ BEGIN -- DIRECTED WITHOUT REVERSE COST - inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || result_columns || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', true)'; @@ -66,7 +66,7 @@ BEGIN -- UNDIRECTED WITH REVERSE COST - inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || result_columns || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', false)'; @@ -76,7 +76,7 @@ BEGIN -- UNDIRECTED WITHOUT REVERSE COST - inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || result_columns || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', false)'; diff --git a/pgtap/astar/astar/edge_cases/empty_inner_queries_empty_result.pg b/pgtap/astar/astar/edge_cases/empty_inner_queries_empty_result.pg index af44f5840ca..0f22b46b4f5 100644 --- a/pgtap/astar/astar/edge_cases/empty_inner_queries_empty_result.pg +++ b/pgtap/astar/astar/edge_cases/empty_inner_queries_empty_result.pg @@ -38,28 +38,28 @@ BEGIN RETURN query SELECT is_empty( 'SELECT ' || result1 || ' FROM pgr_aStar( - $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table WHERE id > 20$$, + $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges WHERE id > 20$$, 1, 3, false)' ); RETURN query SELECT is_empty( 'SELECT ' || result2 || ' FROM pgr_aStar( - $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table WHERE id > 20$$, + $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges WHERE id > 20$$, 1, ARRAY[3,12], false)' ); RETURN query SELECT is_empty( 'SELECT ' || result3 || ' FROM pgr_aStar( - $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table WHERE id > 20$$, + $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges WHERE id > 20$$, ARRAY[1,2], 3, false)' ); RETURN query SELECT is_empty( 'SELECT ' || result_all || ' FROM pgr_aStar( - $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table WHERE id > 20$$, + $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges WHERE id > 20$$, ARRAY[1, 2], ARRAY[3,12], false)' ); @@ -72,15 +72,15 @@ BEGIN RETURN query SELECT is_empty( 'SELECT path_seq, start_vid, end_vid, node, edge, cost, agg_cost FROM pgr_aStar( - $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table WHERE id > 20$$, - $$SELECT * FROM combinations_table$$)' + $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges WHERE id > 20$$, + $$SELECT * FROM combinations$$)' ); RETURN query SELECT is_empty( 'SELECT path_seq, start_vid, end_vid, node, edge, cost, agg_cost FROM pgr_aStar( - $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table$$, - $$SELECT * FROM combinations_table WHERE source IN (-1)$$)' + $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges$$, + $$SELECT * FROM combinations WHERE source IN (-1)$$)' ); END diff --git a/pgtap/astar/astar/edge_cases/remaining_tests.pg b/pgtap/astar/astar/edge_cases/remaining_tests.pg index 166084d1676..0c6c1b30238 100644 --- a/pgtap/astar/astar/edge_cases/remaining_tests.pg +++ b/pgtap/astar/astar/edge_cases/remaining_tests.pg @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(116); SET client_min_messages TO ERROR; @@ -75,7 +75,7 @@ BEGIN END IF; start_sql = start_sql || p || ', '; END LOOP; - end_sql = ' FROM edge_table $$, 2, 3, true)'; + end_sql = ' FROM edges $$, 2, 3, true)'; query := start_sql || parameter || '::SMALLINT ' || end_sql; RETURN query SELECT lives_ok(query); @@ -112,7 +112,7 @@ BEGIN END IF; start_sql = start_sql || p || ', '; END LOOP; - end_sql = ' FROM edge_table $$, 2, 3, true)'; + end_sql = ' FROM edges $$, 2, 3, true)'; query := start_sql || parameter || '::SMALLINT ' || end_sql; RETURN query SELECT lives_ok(query); @@ -191,7 +191,7 @@ SELECT test_anyNumerical('pgr_astar', 'y2'); SELECT throws_ok( - $$SELECT * FROM pgr_astar('SELECT * FROM edge_table', + $$SELECT * FROM pgr_astar('SELECT * FROM edges', 2, 3, true, 6, 1, 1)$$, 'XX000', @@ -200,7 +200,7 @@ SELECT throws_ok( ); SELECT throws_ok( - $$SELECT * FROM pgr_astar('SELECT * FROM edge_table', + $$SELECT * FROM pgr_astar('SELECT * FROM edges', 2, 3, true, -1, 1, 1)$$, 'XX000', @@ -209,7 +209,7 @@ SELECT throws_ok( ); SELECT throws_ok( - $$SELECT * FROM pgr_astar('SELECT * FROM edge_table', + $$SELECT * FROM pgr_astar('SELECT * FROM edges', 2, 3, true, 0, 0, 1)$$, 'XX000', @@ -218,7 +218,7 @@ SELECT throws_ok( ); SELECT throws_ok( - $$SELECT * FROM pgr_astar('SELECT * FROM edge_table', + $$SELECT * FROM pgr_astar('SELECT * FROM edges', 2, 3, true, 0, -1.4, 1)$$, 'XX000', @@ -227,7 +227,7 @@ SELECT throws_ok( ); SELECT throws_ok( - $$SELECT * FROM pgr_astar('SELECT * FROM edge_table', + $$SELECT * FROM pgr_astar('SELECT * FROM edges', 2, 3, true, 0, 1, -3)$$, 'XX000', @@ -235,7 +235,7 @@ SELECT throws_ok( 'SHOULD THROW because epsilon < 0' ); SELECT throws_ok( - $$SELECT * FROM pgr_astar('SELECT * FROM edge_table', + $$SELECT * FROM pgr_astar('SELECT * FROM edges', 2, 3, true, 0, 1, 0.9)$$, 'XX000', diff --git a/pgtap/astar/astar/inner_query.pg b/pgtap/astar/astar/inner_query.pg index 8486816528b..d3c63e108cc 100644 --- a/pgtap/astar/astar/inner_query.pg +++ b/pgtap/astar/astar/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(522) ELSE plan(410) END; @@ -37,8 +37,8 @@ CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_astar('pgr_astar(', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_astar($$SELECT * FROM edge_table$$,',', true)'); + RETURN QUERY SELECT style_astar('pgr_astar(', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_astar($$SELECT * FROM edges$$,',', true)'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/astar/astar/no_crash_test.pg b/pgtap/astar/astar/no_crash_test.pg index 4bc6fc93aca..246ad7f2e33 100644 --- a/pgtap/astar/astar/no_crash_test.pg +++ b/pgtap/astar/astar/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(97) ELSE plan(84) END; SELECT general_no_crash('pgr_aStar'); diff --git a/pgtap/astar/astarCost/edge_cases/empty_combinations_empty_result.pg b/pgtap/astar/astarCost/edge_cases/empty_combinations_empty_result.pg index 95bf283ca43..cf89ad99dae 100644 --- a/pgtap/astar/astarCost/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/astar/astarCost/edge_cases/empty_combinations_empty_result.pg @@ -35,8 +35,8 @@ BEGIN RETURN query SELECT is_empty( 'SELECT start_vid, end_vid, agg_cost FROM pgr_aStarCost( - $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table$$, - $$SELECT * FROM combinations_table WHERE source IN (-1)$$ ) ' + $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges$$, + $$SELECT * FROM combinations WHERE source IN (-1)$$ ) ' ); END $BODY$ diff --git a/pgtap/astar/astarCost/inner_query.pg b/pgtap/astar/astarCost/inner_query.pg index cc929771a24..72ff20f1bdb 100644 --- a/pgtap/astar/astarCost/inner_query.pg +++ b/pgtap/astar/astarCost/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(522) ELSE plan(410) END; @@ -37,8 +37,8 @@ CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_astar('pgr_astarCost(', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_astarCost($$SELECT * FROM edge_table$$,',', true)'); + RETURN QUERY SELECT style_astar('pgr_astarCost(', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_astarCost($$SELECT * FROM edges$$,',', true)'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/astar/astarCost/no_crash_test.pg b/pgtap/astar/astarCost/no_crash_test.pg index ec98116a994..464bca4b0dc 100644 --- a/pgtap/astar/astarCost/no_crash_test.pg +++ b/pgtap/astar/astarCost/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(97) ELSE plan(84) END; diff --git a/pgtap/astar/edge_cases/many_to_many_eq_combinations.pg b/pgtap/astar/edge_cases/many_to_many_eq_combinations.pg index 16aff3f577d..9b197cfe81c 100644 --- a/pgtap/astar/edge_cases/many_to_many_eq_combinations.pg +++ b/pgtap/astar/edge_cases/many_to_many_eq_combinations.pg @@ -22,7 +22,7 @@ BEGIN; SELECT plan(2); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE OR REPLACE FUNCTION astar_combinations(sql_TestFunction TEXT, cant INTEGER DEFAULT 18 ) RETURNS SETOF TEXT AS @@ -56,11 +56,11 @@ BEGIN sql_Combinations := trim(trailing ',' from sql_Combinations); sql_Many := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'', ARRAY[' || sql_Many ||'], ARRAY[' || sql_Many || '] ) '); sql_Combinations := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'', ''SELECT * FROM (VALUES' || sql_Combinations ||') AS combinations (source, target)'' ) '); RETURN query diff --git a/pgtap/bdAstar/bdAstar/compare_dijkstra/one_to_one.pg b/pgtap/bdAstar/bdAstar/compare_dijkstra/one_to_one.pg index 90594924ebd..8bd45a8c2db 100644 --- a/pgtap/bdAstar/bdAstar/compare_dijkstra/one_to_one.pg +++ b/pgtap/bdAstar/bdAstar/compare_dijkstra/one_to_one.pg @@ -23,7 +23,7 @@ SET client_min_messages TO ERROR; SELECT plan(544); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION bdastar_compare_dijkstra(cant INTEGER default 17) @@ -39,7 +39,7 @@ BEGIN -- DIRECTED -- with reverse_cost - inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2 FROM edges'; dijkstra_sql := 'SELECT seq,node,edge,round(cost::numeric,8) AS cost, round(agg_cost::numeric,8) AS agg_cost FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', true)'; @@ -50,7 +50,7 @@ BEGIN -- DIRECTED -- NO reverse_cost - inner_sql := 'SELECT id, source, target, cost, x1,y1,x2,y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, x1,y1,x2,y2 FROM edges'; dijkstra_sql := 'SELECT seq,node,edge,round(cost::numeric,8) AS cost, round(agg_cost::numeric,8) AS agg_cost FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', true)'; @@ -60,7 +60,7 @@ BEGIN -- UNDIRECTED -- with reverse_cost - inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2 FROM edges'; dijkstra_sql := 'SELECT seq,node,edge,round(cost::numeric,8) AS cost, round(agg_cost::numeric,8) AS agg_cost FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', false)'; @@ -71,7 +71,7 @@ BEGIN -- UNDIRECTED -- NO reverse_cost - inner_sql := 'SELECT id, source, target, cost, x1,y1,x2,y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, x1,y1,x2,y2 FROM edges'; dijkstra_sql := 'SELECT seq,node,edge,round(cost::numeric,8) AS cost, round(agg_cost::numeric,8) AS agg_cost FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', false)'; diff --git a/pgtap/bdAstar/bdAstar/edge_cases/empty_combinations_empty_result.pg b/pgtap/bdAstar/bdAstar/edge_cases/empty_combinations_empty_result.pg index bade81e691d..dc86f42ce60 100644 --- a/pgtap/bdAstar/bdAstar/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/bdAstar/bdAstar/edge_cases/empty_combinations_empty_result.pg @@ -35,8 +35,8 @@ BEGIN RETURN query SELECT is_empty( 'SELECT path_seq, start_vid, end_vid, node, edge, cost, agg_cost FROM pgr_bdAstar( - ''SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'', - ''SELECT * FROM combinations_table WHERE source IN (-1)'' ) ' + ''SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'', + ''SELECT * FROM combinations WHERE source IN (-1)'' ) ' ); RETURN; END diff --git a/pgtap/bdAstar/bdAstar/edge_cases/remaining_tests.pg b/pgtap/bdAstar/bdAstar/edge_cases/remaining_tests.pg index 82ec975c3f1..6b2a90df21c 100644 --- a/pgtap/bdAstar/bdAstar/edge_cases/remaining_tests.pg +++ b/pgtap/bdAstar/bdAstar/edge_cases/remaining_tests.pg @@ -20,12 +20,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(6); SELECT throws_ok( - $$SELECT * FROM pgr_bdastar('SELECT * FROM edge_table', + $$SELECT * FROM pgr_bdastar('SELECT * FROM edges', 2, 3, true, 6, 1, 1)$$, 'XX000', @@ -34,7 +34,7 @@ SELECT throws_ok( ); SELECT throws_ok( - $$SELECT * FROM pgr_bdastar('SELECT * FROM edge_table', + $$SELECT * FROM pgr_bdastar('SELECT * FROM edges', 2, 3, true, -1, 1, 1)$$, 'XX000', @@ -43,7 +43,7 @@ SELECT throws_ok( ); SELECT throws_ok( - $$SELECT * FROM pgr_bdastar('SELECT * FROM edge_table', + $$SELECT * FROM pgr_bdastar('SELECT * FROM edges', 2, 3, true, 0, 0, 1)$$, 'XX000', @@ -52,7 +52,7 @@ SELECT throws_ok( ); SELECT throws_ok( - $$SELECT * FROM pgr_bdastar('SELECT * FROM edge_table', + $$SELECT * FROM pgr_bdastar('SELECT * FROM edges', 2, 3, true, 0, -1.4, 1)$$, 'XX000', @@ -61,7 +61,7 @@ SELECT throws_ok( ); SELECT throws_ok( - $$SELECT * FROM pgr_bdastar('SELECT * FROM edge_table', + $$SELECT * FROM pgr_bdastar('SELECT * FROM edges', 2, 3, true, 0, 1, -3)$$, 'XX000', @@ -69,7 +69,7 @@ SELECT throws_ok( 'SHOULD THROW because epsilon < 0' ); SELECT throws_ok( - $$SELECT * FROM pgr_bdastar('SELECT * FROM edge_table', + $$SELECT * FROM pgr_bdastar('SELECT * FROM edges', 2, 3, true, 0, 1, 0.9)$$, 'XX000', diff --git a/pgtap/bdAstar/bdAstar/inner_query.pg b/pgtap/bdAstar/bdAstar/inner_query.pg index d1b361eb045..c61549bd8cc 100644 --- a/pgtap/bdAstar/bdAstar/inner_query.pg +++ b/pgtap/bdAstar/bdAstar/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(522) ELSE plan(410) END; @@ -37,8 +37,8 @@ CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_astar('pgr_bdastar(', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_bdastar($$SELECT * FROM edge_table$$,',', true)'); + RETURN QUERY SELECT style_astar('pgr_bdastar(', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_bdastar($$SELECT * FROM edges$$,',', true)'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/bdAstar/bdAstar/no_crash_test.pg b/pgtap/bdAstar/bdAstar/no_crash_test.pg index 0374f3df253..b9e400d5a50 100644 --- a/pgtap/bdAstar/bdAstar/no_crash_test.pg +++ b/pgtap/bdAstar/bdAstar/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(97) ELSE plan(84) END; diff --git a/pgtap/bdAstar/bdAstarCost/edge_cases/empty_combinations_empty_result.pg b/pgtap/bdAstar/bdAstarCost/edge_cases/empty_combinations_empty_result.pg index 99e3318cf8e..e1af53a93ce 100644 --- a/pgtap/bdAstar/bdAstarCost/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/bdAstar/bdAstarCost/edge_cases/empty_combinations_empty_result.pg @@ -35,8 +35,8 @@ BEGIN RETURN QUERY SELECT is_empty( 'SELECT start_vid, end_vid, agg_cost FROM pgr_bdAstarCost( - ''SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'', - ''SELECT * FROM combinations_table WHERE source IN (-1)'' ) ' + ''SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'', + ''SELECT * FROM combinations WHERE source IN (-1)'' ) ' ); RETURN; END diff --git a/pgtap/bdAstar/bdAstarCost/inner_query.pg b/pgtap/bdAstar/bdAstarCost/inner_query.pg index 46dd5e6ed79..0700f0431eb 100644 --- a/pgtap/bdAstar/bdAstarCost/inner_query.pg +++ b/pgtap/bdAstar/bdAstarCost/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(522) ELSE plan(410) END; @@ -37,8 +37,8 @@ CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_astar('pgr_bdastarCost(', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_bdastarCost($$SELECT * FROM edge_table$$,',', true)'); + RETURN QUERY SELECT style_astar('pgr_bdastarCost(', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_bdastarCost($$SELECT * FROM edges$$,',', true)'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/bdAstar/bdAstarCost/no_crash_test.pg b/pgtap/bdAstar/bdAstarCost/no_crash_test.pg index 3632077ee2b..7564423e163 100644 --- a/pgtap/bdAstar/bdAstarCost/no_crash_test.pg +++ b/pgtap/bdAstar/bdAstarCost/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(97) ELSE plan(84) END; diff --git a/pgtap/bdAstar/bdAstarCostMatrix/inner_query.pg b/pgtap/bdAstar/bdAstarCostMatrix/inner_query.pg index 987f9bf950d..949ff7e8942 100644 --- a/pgtap/bdAstar/bdAstarCostMatrix/inner_query.pg +++ b/pgtap/bdAstar/bdAstarCostMatrix/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(102); -- ONE MATRIX diff --git a/pgtap/bdAstar/edge_cases/issue_1733.pg b/pgtap/bdAstar/edge_cases/issue_1733.pg index 98de71a8b56..c1e2587035e 100644 --- a/pgtap/bdAstar/edge_cases/issue_1733.pg +++ b/pgtap/bdAstar/edge_cases/issue_1733.pg @@ -23,7 +23,7 @@ SELECT plan(3); SELECT is_empty( 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 - FROM edge_table + FROM edges WHERE source = 100 OR target = 100', 'Vertex 100 does not exist in sample data' ); @@ -31,7 +31,7 @@ SELECT is_empty( PREPARE q1 AS SELECT * FROM pgr_bdAstar( 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 - FROM edge_table', + FROM edges', 2, 100, true, heuristic := 2 ); diff --git a/pgtap/bdAstar/edge_cases/many_to_many_eq_combinations.pg b/pgtap/bdAstar/edge_cases/many_to_many_eq_combinations.pg index a4563b6a416..baf5a536b1e 100644 --- a/pgtap/bdAstar/edge_cases/many_to_many_eq_combinations.pg +++ b/pgtap/bdAstar/edge_cases/many_to_many_eq_combinations.pg @@ -22,7 +22,7 @@ BEGIN; SELECT plan(2); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; create or REPLACE FUNCTION foo( sql_TestFunction TEXT, cant INTEGER default 18 ) RETURNS SETOF TEXT AS @@ -57,11 +57,11 @@ BEGIN sql_Combinations := trim(trailing ',' from sql_Combinations); sql_Many := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'', ARRAY[' || sql_Many ||'], ARRAY[' || sql_Many || '] ) '); sql_Combinations := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'', ''SELECT * FROM (VALUES' || sql_Combinations ||') AS combinations (source, target)'' ) '); RETURN query SELECT set_eq( sql_Many, sql_Combinations ); diff --git a/pgtap/bdDijkstra/bdDijkstra/compare_dijkstra/one_to_one.pg b/pgtap/bdDijkstra/bdDijkstra/compare_dijkstra/one_to_one.pg index c13640c581c..bf9e8150237 100644 --- a/pgtap/bdDijkstra/bdDijkstra/compare_dijkstra/one_to_one.pg +++ b/pgtap/bdDijkstra/bdDijkstra/compare_dijkstra/one_to_one.pg @@ -23,7 +23,7 @@ SET client_min_messages TO ERROR; SELECT plan(544); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION bddijkstra_compare_dijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -38,7 +38,7 @@ BEGIN FOR j IN 2.. cant BY 2 LOOP -- DIRECTED - inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edges'; dijkstra_sql := 'SELECT seq,node,edge,round(cost::numeric,8) AS cost, round(agg_cost::numeric,8) AS agg_cost FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', true)'; @@ -47,7 +47,7 @@ BEGIN RETURN query SELECT set_eq(bddijkstra_sql, dijkstra_sql, bddijkstra_sql); - inner_sql := 'SELECT id, source, target, cost FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost FROM edges'; dijkstra_sql := 'SELECT seq,node,edge,round(cost::numeric,8) AS cost, round(agg_cost::numeric,8) AS agg_cost FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', true)'; @@ -56,7 +56,7 @@ BEGIN RETURN query SELECT set_eq(bddijkstra_sql, dijkstra_sql, bddijkstra_sql); -- UNDIRECTED - inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edges'; dijkstra_sql := 'SELECT seq,node,edge,round(cost::numeric,8) AS cost, round(agg_cost::numeric,8) AS agg_cost FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', false)'; @@ -65,7 +65,7 @@ BEGIN RETURN query SELECT set_eq(bddijkstra_sql, dijkstra_sql, bddijkstra_sql); - inner_sql := 'SELECT id, source, target, cost FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost FROM edges'; dijkstra_sql := 'SELECT seq,node,edge,round(cost::numeric,8) AS cost, round(agg_cost::numeric,8) AS agg_cost FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', false)'; diff --git a/pgtap/bdDijkstra/bdDijkstra/edge_cases/empty_combinations_empty_result.pg b/pgtap/bdDijkstra/bdDijkstra/edge_cases/empty_combinations_empty_result.pg index e1fd20ebe90..13e31c61f8d 100644 --- a/pgtap/bdDijkstra/bdDijkstra/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/bdDijkstra/bdDijkstra/edge_cases/empty_combinations_empty_result.pg @@ -36,8 +36,8 @@ BEGIN RETURN query SELECT is_empty( 'SELECT path_seq, start_vid, end_vid, node, edge, cost, agg_cost FROM pgr_bdDijkstra( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', - ''SELECT * FROM combinations_table WHERE source IN (-1)'' ) ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', + ''SELECT * FROM combinations WHERE source IN (-1)'' ) ' ); RETURN; END diff --git a/pgtap/bdDijkstra/bdDijkstra/edge_cases/remaining_tests.pg b/pgtap/bdDijkstra/bdDijkstra/edge_cases/remaining_tests.pg index a63e3d83ccd..8404a4a1a50 100644 --- a/pgtap/bdDijkstra/bdDijkstra/edge_cases/remaining_tests.pg +++ b/pgtap/bdDijkstra/bdDijkstra/edge_cases/remaining_tests.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(3); -- testing for the signature that they return the correct names & columns @@ -31,8 +31,8 @@ SELECT pg_typeof(seq)::text AS t1, pg_typeof(path_seq)::text AS t2, pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8 FROM ( SELECT * FROM pgr_bddijkstra( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - 2, 3, true) ) AS a + 'SELECT id, source, target, cost, reverse_cost FROM edges', + 6, 10, true) ) AS a limit 1 ; @@ -48,12 +48,12 @@ SELECT set_eq('v21q00', 'v21q01','Expected columns names & types in version 2.4' PREPARE v20q1 AS SELECT * FROM pgr_bddijkstra( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', 2, 3, true); PREPARE v20q3 AS SELECT * FROM pgr_bddijkstra( - 'SELECT id, source, target, cost FROM edge_table', + 'SELECT id, source, target, cost FROM edges', 2, 3, false); SELECT lives_ok('v20q1','with reverse cost'); diff --git a/pgtap/bdDijkstra/bdDijkstra/inner_query.pg b/pgtap/bdDijkstra/bdDijkstra/inner_query.pg index f9e7390b788..f232ce866f6 100644 --- a/pgtap/bdDijkstra/bdDijkstra/inner_query.pg +++ b/pgtap/bdDijkstra/bdDijkstra/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(282) ELSE plan(218) END; @@ -37,8 +37,8 @@ CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_dijkstra('pgr_bddijkstra(', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_bddijkstra($$SELECT * FROM edge_table$$,',', true)'); + RETURN QUERY SELECT style_dijkstra('pgr_bddijkstra(', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_bddijkstra($$SELECT * FROM edges$$,',', true)'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/bdDijkstra/bdDijkstra/no_crash_test.pg b/pgtap/bdDijkstra/bdDijkstra/no_crash_test.pg index 1f9d696d14b..6ba370aa213 100644 --- a/pgtap/bdDijkstra/bdDijkstra/no_crash_test.pg +++ b/pgtap/bdDijkstra/bdDijkstra/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(97) ELSE plan(84) END; diff --git a/pgtap/bdDijkstra/bdDijkstraCost/edge_cases/empty_combinations_empty_result.pg b/pgtap/bdDijkstra/bdDijkstraCost/edge_cases/empty_combinations_empty_result.pg index d1d739f8cdb..5a6006403e1 100644 --- a/pgtap/bdDijkstra/bdDijkstraCost/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/bdDijkstra/bdDijkstraCost/edge_cases/empty_combinations_empty_result.pg @@ -35,8 +35,8 @@ BEGIN RETURN query SELECT is_empty( 'SELECT start_vid, end_vid, agg_cost FROM pgr_bdDijkstraCost( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', - ''SELECT * FROM combinations_table WHERE source IN (-1)'' ) ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', + ''SELECT * FROM combinations WHERE source IN (-1)'' ) ' ); RETURN; END diff --git a/pgtap/bdDijkstra/bdDijkstraCost/inner_query.pg b/pgtap/bdDijkstra/bdDijkstraCost/inner_query.pg index 511d948ca6a..e61186a5352 100644 --- a/pgtap/bdDijkstra/bdDijkstraCost/inner_query.pg +++ b/pgtap/bdDijkstra/bdDijkstraCost/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(282) ELSE plan(218) END; @@ -37,8 +37,8 @@ CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_dijkstra('pgr_bddijkstraCost(', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_bddijkstraCost($$SELECT * FROM edge_table$$,',', true)'); + RETURN QUERY SELECT style_dijkstra('pgr_bddijkstraCost(', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_bddijkstraCost($$SELECT * FROM edges$$,',', true)'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/bdDijkstra/bdDijkstraCost/no_crash_test.pg b/pgtap/bdDijkstra/bdDijkstraCost/no_crash_test.pg index 7fe44a233b2..583170a0832 100644 --- a/pgtap/bdDijkstra/bdDijkstraCost/no_crash_test.pg +++ b/pgtap/bdDijkstra/bdDijkstraCost/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(97) ELSE plan(84) END; diff --git a/pgtap/bdDijkstra/bdDijkstraCostMatrix/inner_query.pg b/pgtap/bdDijkstra/bdDijkstraCostMatrix/inner_query.pg index 95000f2f394..b90c5a256c3 100644 --- a/pgtap/bdDijkstra/bdDijkstraCostMatrix/inner_query.pg +++ b/pgtap/bdDijkstra/bdDijkstraCostMatrix/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); -- ONE MATRIX diff --git a/pgtap/bdDijkstra/bdDijkstraCostMatrix/no_crash_test.pg b/pgtap/bdDijkstra/bdDijkstraCostMatrix/no_crash_test.pg index de701c6b6f3..851fe28e9fb 100644 --- a/pgtap/bdDijkstra/bdDijkstraCostMatrix/no_crash_test.pg +++ b/pgtap/bdDijkstra/bdDijkstraCostMatrix/no_crash_test.pg @@ -19,14 +19,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(14); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); SELECT set_eq('null_ret', 'SELECT NULL::BIGINT[]', 'Should be empty to tests be meaningful'); @@ -39,10 +39,10 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY['$$edges$$','ARRAY[1,2]::BIGINT[]']::TEXT[]; + params = ARRAY['$$edges$$','ARRAY[5,6]::BIGINT[]']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_bdDijkstraCostMatrix', params, subs); diff --git a/pgtap/bdDijkstra/edge_cases/many_to_many_eq_combinations.pg b/pgtap/bdDijkstra/edge_cases/many_to_many_eq_combinations.pg index 174ab1f32a9..6d245e68382 100644 --- a/pgtap/bdDijkstra/edge_cases/many_to_many_eq_combinations.pg +++ b/pgtap/bdDijkstra/edge_cases/many_to_many_eq_combinations.pg @@ -22,7 +22,7 @@ BEGIN; SELECT plan(2); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; create or REPLACE FUNCTION test_function( sql_TestFunction TEXT, cant INTEGER default 18 ) RETURNS SETOF TEXT AS @@ -57,11 +57,11 @@ BEGIN sql_Combinations := trim(trailing ',' from sql_Combinations); sql_Many := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ARRAY[' || sql_Many ||'], ARRAY[' || sql_Many || '] ) '); sql_Combinations := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ''SELECT * FROM (VALUES' || sql_Combinations ||') AS combinations (source, target)'' ) '); RETURN query SELECT set_eq( sql_Many, sql_Combinations ); diff --git a/pgtap/bellman_ford/bellman_ford/compare_dijkstra.pg b/pgtap/bellman_ford/bellman_ford/compare_dijkstra.pg index d29a5b5b2e7..5b79397d12d 100644 --- a/pgtap/bellman_ford/bellman_ford/compare_dijkstra.pg +++ b/pgtap/bellman_ford/bellman_ford/compare_dijkstra.pg @@ -21,7 +21,7 @@ BEGIN; SELECT plan(1300); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION bellman_ford_compare_dijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS diff --git a/pgtap/bellman_ford/bellman_ford/edge_cases/empty_combinations_empty_result.pg b/pgtap/bellman_ford/bellman_ford/edge_cases/empty_combinations_empty_result.pg index 19fd95a1dfb..eebc331ae78 100644 --- a/pgtap/bellman_ford/bellman_ford/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/bellman_ford/bellman_ford/edge_cases/empty_combinations_empty_result.pg @@ -35,8 +35,8 @@ BEGIN RETURN query SELECT is_empty( 'SELECT seq, path_seq, node, edge, cost, agg_cost FROM pgr_bellmanFord( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', - ''SELECT * FROM combinations_table WHERE source IN (-1)'' ) ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', + ''SELECT * FROM combinations WHERE source IN (-1)'' ) ' ); RETURN; END diff --git a/pgtap/bellman_ford/bellman_ford/edge_cases/many_to_many_eq_combinations.pg b/pgtap/bellman_ford/bellman_ford/edge_cases/many_to_many_eq_combinations.pg index 1b2135c17aa..0e05e2f8f31 100644 --- a/pgtap/bellman_ford/bellman_ford/edge_cases/many_to_many_eq_combinations.pg +++ b/pgtap/bellman_ford/bellman_ford/edge_cases/many_to_many_eq_combinations.pg @@ -21,7 +21,7 @@ BEGIN; SELECT plan(1); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE OR REPLACE FUNCTION foo( sql_TestFunction TEXT, cant INTEGER default 18 ) RETURNS SETOF TEXT AS @@ -55,11 +55,11 @@ BEGIN sql_Combinations := trim(trailing ',' from sql_Combinations); sql_Many := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ARRAY[' || sql_Many ||'], ARRAY[' || sql_Many || '] ) '); sql_Combinations := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ''SELECT * FROM (VALUES' || sql_Combinations ||') AS combinations (source, target)'' ) '); RETURN query SELECT set_eq( sql_Many, sql_Combinations ); diff --git a/pgtap/bellman_ford/bellman_ford/inner_query.pg b/pgtap/bellman_ford/bellman_ford/inner_query.pg index d1f9d4b9e76..e2e6db31b6c 100644 --- a/pgtap/bellman_ford/bellman_ford/inner_query.pg +++ b/pgtap/bellman_ford/bellman_ford/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(282) ELSE plan(218) END; -- ONE TO ONE @@ -36,8 +36,8 @@ CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_dijkstra('pgr_bellmanFord(', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_bellmanFord($$SELECT * FROM edge_table$$,',', true)'); + RETURN QUERY SELECT style_dijkstra('pgr_bellmanFord(', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_bellmanFord($$SELECT * FROM edges$$,',', true)'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/bellman_ford/bellman_ford/no_crash_test.pg b/pgtap/bellman_ford/bellman_ford/no_crash_test.pg index 6901c91e1f6..f081e427b82 100644 --- a/pgtap/bellman_ford/bellman_ford/no_crash_test.pg +++ b/pgtap/bellman_ford/bellman_ford/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (97) ELSE plan(84) END; diff --git a/pgtap/bellman_ford/edwardMoore/compare_dijkstra.pg b/pgtap/bellman_ford/edwardMoore/compare_dijkstra.pg index a629acafce1..19f8eb51db9 100644 --- a/pgtap/bellman_ford/edwardMoore/compare_dijkstra.pg +++ b/pgtap/bellman_ford/edwardMoore/compare_dijkstra.pg @@ -21,7 +21,7 @@ BEGIN; SELECT CASE WHEN min_version('3.1.1') THEN plan(1300) ELSE plan(1) END; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION edwardMoore_compare_dijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS diff --git a/pgtap/bellman_ford/edwardMoore/edge_cases/empty_combinations_empty_result.pg b/pgtap/bellman_ford/edwardMoore/edge_cases/empty_combinations_empty_result.pg index 809d89b7c10..ccf260bfee8 100644 --- a/pgtap/bellman_ford/edwardMoore/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/bellman_ford/edwardMoore/edge_cases/empty_combinations_empty_result.pg @@ -34,8 +34,8 @@ BEGIN RETURN query SELECT is_empty( 'SELECT seq, path_seq, node, edge, cost, agg_cost FROM pgr_edwardMoore( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', - ''SELECT * FROM combinations_table WHERE source IN (-1)'' ) ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', + ''SELECT * FROM combinations WHERE source IN (-1)'' ) ' ); RETURN; END diff --git a/pgtap/bellman_ford/edwardMoore/edge_cases/many_to_many_eq_combinations.pg b/pgtap/bellman_ford/edwardMoore/edge_cases/many_to_many_eq_combinations.pg index 04c08e68e82..5e84cba2ef6 100644 --- a/pgtap/bellman_ford/edwardMoore/edge_cases/many_to_many_eq_combinations.pg +++ b/pgtap/bellman_ford/edwardMoore/edge_cases/many_to_many_eq_combinations.pg @@ -21,7 +21,7 @@ BEGIN; SELECT plan(1); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE OR REPLACE FUNCTION compare_many_to_many( sql_TestFunction TEXT, cant INTEGER default 18 ) RETURNS SETOF TEXT AS @@ -55,11 +55,11 @@ BEGIN sql_Combinations := trim(trailing ',' from sql_Combinations); sql_Many := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ARRAY[' || sql_Many ||'], ARRAY[' || sql_Many || '] ) '); sql_Combinations := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ''SELECT * FROM (VALUES' || sql_Combinations ||') AS combinations (source, target)'' ) '); RETURN query SELECT set_eq( sql_Many, sql_Combinations ); diff --git a/pgtap/bellman_ford/edwardMoore/inner_query.pg b/pgtap/bellman_ford/edwardMoore/inner_query.pg index 45a1b7839c3..b7cacbc2ccf 100644 --- a/pgtap/bellman_ford/edwardMoore/inner_query.pg +++ b/pgtap/bellman_ford/edwardMoore/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(282) ELSE plan(218) END; -- ONE TO ONE @@ -36,8 +36,8 @@ CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_dijkstra('pgr_edwardMoore(', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_edwardMoore($$SELECT * FROM edge_table$$,',', true)'); + RETURN QUERY SELECT style_dijkstra('pgr_edwardMoore(', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_edwardMoore($$SELECT * FROM edges$$,',', true)'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/bellman_ford/edwardMoore/no_crash_test.pg b/pgtap/bellman_ford/edwardMoore/no_crash_test.pg index 74ba905eba3..d3a91be156a 100644 --- a/pgtap/bellman_ford/edwardMoore/no_crash_test.pg +++ b/pgtap/bellman_ford/edwardMoore/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (97) ELSE plan(84) END; diff --git a/pgtap/chinese/chinesePostman/inner_query.pg b/pgtap/chinese/chinesePostman/inner_query.pg index 2750dbac701..77c3c6c6e72 100644 --- a/pgtap/chinese/chinesePostman/inner_query.pg +++ b/pgtap/chinese/chinesePostman/inner_query.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_lib_version('3.1.1') THEN plan(1) ELSE plan(54) END; -DELETE FROM edge_table WHERE id > 16; +DELETE FROM edges WHERE id > 16; CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS diff --git a/pgtap/chinese/chinesePostman/types_check.pg b/pgtap/chinese/chinesePostman/types_check.pg index 6b3744d7520..8cf7d599083 100644 --- a/pgtap/chinese/chinesePostman/types_check.pg +++ b/pgtap/chinese/chinesePostman/types_check.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); SELECT has_function('pgr_chinesepostman'); diff --git a/pgtap/chinese/chinesePostmanCost/inner_query.pg b/pgtap/chinese/chinesePostmanCost/inner_query.pg index 2e3f5901fd6..8fad68edaeb 100644 --- a/pgtap/chinese/chinesePostmanCost/inner_query.pg +++ b/pgtap/chinese/chinesePostmanCost/inner_query.pg @@ -19,10 +19,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); -DELETE FROM edge_table WHERE id > 10; +DELETE FROM edges WHERE id > 10; SELECT style_dijkstra('pgr_chinesepostmancost(', ')'); diff --git a/pgtap/chinese/chinesePostmanCost/types_check.pg b/pgtap/chinese/chinesePostmanCost/types_check.pg index e7e8eebcf9b..8becde73f77 100644 --- a/pgtap/chinese/chinesePostmanCost/types_check.pg +++ b/pgtap/chinese/chinesePostmanCost/types_check.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(6); SELECT has_function('pgr_chinesepostmancost'); diff --git a/pgtap/circuits/hawickCircuits/edge_cases.pg b/pgtap/circuits/hawickCircuits/edge_cases.pg index ab2b056b49d..065f2564f72 100644 --- a/pgtap/circuits/hawickCircuits/edge_cases.pg +++ b/pgtap/circuits/hawickCircuits/edge_cases.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.4.0') THEN plan(1) ELSE plan(9) END; CREATE OR REPLACE FUNCTION edge_cases() @@ -37,7 +37,7 @@ END IF; PREPARE q1 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id > 18; RETURN QUERY @@ -54,7 +54,7 @@ SELECT is_empty('hawickCircuits1', 'Graph with 0 edge and 0 vertex -> Empty row PREPARE q2 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id = 2; PREPARE hawickCircuits2 AS @@ -67,11 +67,11 @@ SELECT is_empty('hawickCircuits2', 'One vertex graph can not have circuits -> Em PREPARE q3 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id = 7; RETURN QUERY -SELECT set_eq('q3', $$VALUES (7, 8, 5, 1, 1)$$, 'Graph with two connected vertices 8 and 5'); +SELECT set_eq('q3', $$VALUES (7, 3, 7, 1, 1)$$, 'Graph with two connected vertices 3 and 7'); PREPARE hawickCircuits3 AS SELECT * FROM pgr_hawickcircuits('q3'); @@ -79,21 +79,21 @@ SELECT * FROM pgr_hawickcircuits('q3'); RETURN QUERY SELECT set_eq('hawickCircuits3', $$VALUES - (1, 1, 0, 8, 8, 8, 7, 1, 0), - (2, 1, 1, 8, 8, 5, 7, 1, 1), - (3, 1, 2, 8, 8, 8, -1, 0, 2) + (1, 1, 0, 3, 3, 3, 7, 1, 0), + (2, 1, 1, 3, 3, 7, 7, 1, 1), + (3, 1, 2, 3, 3, 3, -1, 0, 2) $$, - 'Circuit between the vertex 8 and 5'); + 'Circuit between the vertex 3 and 7'); -- 3 vertices test PREPARE q4 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id <= 2; RETURN QUERY -SELECT set_eq('q4', $$VALUES (1, 1, 2, 1, 1), (2, 2, 3, -1, 1)$$, 'Graph with three vertices 1, 2 and 3'); +SELECT set_eq('q4', $$VALUES (1, 5, 6, 1, 1), (2, 6, 10, -1, 1)$$, 'Graph with three vertices 5, 6 and 10'); PREPARE hawickCircuits4 AS SELECT * FROM pgr_hawickcircuits('q4'); @@ -101,48 +101,48 @@ SELECT * FROM pgr_hawickcircuits('q4'); RETURN QUERY SELECT set_eq('hawickCircuits4', $$VALUES - (1, 1, 0, 1, 1, 1, 1, 1, 0), - (2, 1, 1, 1, 1, 2, 1, 1, 1), - (3, 1, 2, 1, 1, 1, -1, 0, 2) + (1, 1, 0, 5, 5, 5, 1, 1, 0), + (2, 1, 1, 5, 5, 6, 1, 1, 1), + (3, 1, 2, 5, 5, 5, -1, 0, 2) $$, - 'Circuit between the vertex 1 and 2'); + 'Circuit between the vertex 5 and 6'); -- 4 vertices test PREPARE q5 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id IN (3, 5, 9, 16); RETURN QUERY SELECT set_eq('q5', $$VALUES - (3, 3, 4, -1, 1), - (5, 3, 6, 1, -1), - (9, 6, 9, 1, 1), - (16, 4, 9, 1, 1) + (3, 10, 15, -1, 1), + (5, 10, 11, 1, -1), + (9, 11, 16, 1, 1), + (16, 15, 16, 1, 1) $$, - 'Graph with four vertices 3, 4, 6 and 9'); + 'Graph with four vertices 10, 11, 15, 16'); PREPARE hawickCircuits5 AS -SELECT * FROM pgr_hawickCircuits('q5'); +SELECT path_seq, start_vid, end_vid, node, edge, cost, agg_cost FROM pgr_hawickCircuits('q5'); RETURN QUERY SELECT set_eq('hawickCircuits5', $$VALUES - (1, 1, 0, 3, 3, 3, 5, 1, 0), - (2, 1, 1, 3, 3, 6, 9, 1, 1), - (3, 1, 2, 3, 3, 9, 16, 1, 2), - (4, 1, 3, 3, 3, 4, 3, 1, 3), - (5, 1, 4, 3, 3, 3, -1, 0, 4), - (6, 2, 0, 4, 4, 4, 16, 1, 0), - (7, 2, 1, 4, 4, 9, 16, 1, 1), - (8, 2, 2, 4, 4, 4, -1, 0, 2), - (9, 3, 0, 6, 6, 6, 9, 1, 0), - (10, 3, 1, 6, 6, 9, 9, 1, 1), - (11, 3, 2, 6, 6, 6, -1, 0, 2) + ( 0, 10, 10, 10, 5, 1, 0), + ( 1, 10, 10, 11, 9, 1, 1), + ( 2, 10, 10, 16, 16, 1, 2), + ( 3, 10, 10, 15, 3, 1, 3), + ( 4, 10, 10, 10, -1, 0, 4), + ( 0, 15, 15, 15, 16, 1, 0), + ( 1, 15, 15, 16, 16, 1, 1), + ( 2, 15, 15, 15, -1, 0, 2), + ( 0, 11, 11, 11, 9, 1, 0), + ( 1, 11, 11, 16, 9, 1, 1), + ( 2, 11, 11, 11, -1, 0, 2) $$, - 'Circuit between 3->6->9->4->3, 4->9->4 & 6->9->6 expected'); + 'TEST 9: Circuits 10->11->16->15->10, 15->16->15 & 11>16>11 expected'); END; $BODY$ diff --git a/pgtap/circuits/hawickCircuits/inner_query.pg b/pgtap/circuits/hawickCircuits/inner_query.pg index ea3edbc3348..a308dce39ea 100644 --- a/pgtap/circuits/hawickCircuits/inner_query.pg +++ b/pgtap/circuits/hawickCircuits/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.4.0') THEN plan(1) ELSE plan(54) END; CREATE OR REPLACE FUNCTION inner_query() diff --git a/pgtap/circuits/hawickCircuits/no_crash_test.pg b/pgtap/circuits/hawickCircuits/no_crash_test.pg index a4fa9819f8e..26c9f8838d3 100644 --- a/pgtap/circuits/hawickCircuits/no_crash_test.pg +++ b/pgtap/circuits/hawickCircuits/no_crash_test.pg @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.4.0') THEN plan(1) ELSE plan(7) END; -PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +PREPARE edges_q AS +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); CREATE OR REPLACE FUNCTION no_crash() @@ -46,14 +46,14 @@ BEGIN END IF; RETURN QUERY - SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); + SELECT isnt_empty('edges_q', 'Should be not empty to tests be meaningful'); RETURN QUERY SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); RETURN QUERY SELECT set_eq('null_ret_arr', 'SELECT NULL::BIGINT[]', 'Should be empty to tests be meaningful'); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$' + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$' ]::TEXT[]; subs = ARRAY[ 'NULL' diff --git a/pgtap/coloring/bipartite/edge_cases.pg b/pgtap/coloring/bipartite/edge_cases.pg index 5489c55a178..2afea8e8c14 100644 --- a/pgtap/coloring/bipartite/edge_cases.pg +++ b/pgtap/coloring/bipartite/edge_cases.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(16) END; CREATE OR REPLACE FUNCTION edge_cases() @@ -37,7 +37,7 @@ END IF; PREPARE q1 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id > 18; RETURN QUERY @@ -56,12 +56,12 @@ SELECT is_empty('bipartite1', '2: Graph with 0 edge and 0 vertex -> Empty row is -- 1 vertex test PREPARE q2 AS -SELECT id, source, 2 AS target, cost, reverse_cost -FROM edge_table +SELECT id, source, 6 AS target, cost, reverse_cost +FROM edges WHERE id = 2; RETURN QUERY -SELECT set_eq('q2', $$VALUES (2, 2, 2, -1, 1)$$, '3: Graph with only vertex 2'); +SELECT set_eq('q2', $$VALUES (2, 6, 6, -1, 1)$$, '3: Graph with only vertex 2'); PREPARE bipartite2 AS SELECT * @@ -77,11 +77,11 @@ SELECT is_empty('bipartite2', '4: One vertex graph can not be bipartite-> Empty PREPARE q3 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id = 7; RETURN QUERY -SELECT set_eq('q3', $$VALUES (7, 8, 5, 1, 1)$$, '5: Graph with two connected vertices 8 and 5'); +SELECT set_eq('q3', $$VALUES (7, 3, 7, 1, 1)$$, '5: Graph with two connected vertices 3 and 7'); PREPARE bipartite3 AS SELECT * @@ -90,7 +90,7 @@ FROM pgr_bipartite( ); RETURN QUERY -SELECT set_eq('bipartite3', $$VALUES (8, 0), (5, 1)$$, '6: Graph is bi-partite'); +SELECT set_eq('bipartite3', $$VALUES (3, 0), (7, 1)$$, '6: Graph is bi-partite'); -- linear tests @@ -99,11 +99,11 @@ SELECT set_eq('bipartite3', $$VALUES (8, 0), (5, 1)$$, '6: Graph is bi-partite') PREPARE q4 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id <= 2; RETURN QUERY -SELECT set_eq('q4', $$VALUES (1, 1, 2, 1, 1), (2, 2, 3, -1, 1)$$, '7: Graph with three vertices 1, 2 and 3'); +SELECT set_eq('q4', $$VALUES (1, 5, 6, 1, 1), (2, 6, 10, -1, 1)$$, '7: Graph with three vertices 1, 2 and 3'); PREPARE bipartite4 AS SELECT * @@ -112,22 +112,22 @@ FROM pgr_bipartite( ); RETURN QUERY -SELECT set_eq('bipartite4', $$VALUES (1, 0), (2, 1), (3, 0)$$, '8: Bi-partite graph with 3 vertices'); +SELECT set_eq('bipartite4', $$VALUES (5, 0), (6, 1), (10, 0)$$, '8: Bi-partite graph with 3 vertices'); -- 4 vertices test PREPARE q5 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id <= 3; RETURN QUERY SELECT set_eq('q5', $$VALUES - (1, 1, 2, 1, 1), - (2, 2, 3, -1, 1), - (3, 3, 4, -1, 1) + (1, 5, 6, 1, 1), + (2, 6, 10, -1, 1), + (3, 10, 15, -1, 1) $$, '9: Graph with four vertices 1, 2, 3 and 4' ); @@ -139,7 +139,7 @@ FROM pgr_bipartite( ); RETURN QUERY -SELECT set_eq('bipartite5', $$VALUES (1, 0), (2, 1), (3, 0), (4, 1)$$, '10: Bi-partite graph with 4 vertices'); +SELECT set_eq('bipartite5', $$VALUES (5, 0), (6, 1), (10, 0), (15, 1)$$, '10: Bi-partite graph with 4 vertices'); @@ -150,16 +150,16 @@ SELECT set_eq('bipartite5', $$VALUES (1, 0), (2, 1), (3, 0), (4, 1)$$, '10: Bi-p -- 4 vertices length PREPARE q6 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id IN (8, 10, 11, 12); RETURN QUERY SELECT set_eq('q6', $$VALUES - (8, 5, 6, 1, 1), - (10, 5, 10, 1, 1), - (11, 6, 11, 1, -1), - (12, 10, 11, 1, -1) + (8, 7, 11, 1, 1), + (10, 7, 8, 1, 1), + (11, 11, 12, 1, -1), + (12, 8, 12, 1, -1) $$, '11: Graph with four vertices 5, 6, 10 and 11 (cyclic)' ); @@ -171,7 +171,7 @@ FROM pgr_bipartite( ); RETURN QUERY -SELECT set_eq('bipartite6', $$VALUES (5, 0), (6, 1), (10, 1), (11, 0)$$, '12: Cyclic and bipartite graph'); +SELECT set_eq('bipartite6', $$VALUES (7, 0), (8, 1), (11, 1), (12, 0)$$, '12: Cyclic and bipartite graph'); -- odd length cycle test diff --git a/pgtap/coloring/bipartite/inner_query.pg b/pgtap/coloring/bipartite/inner_query.pg index 68d7ec2e49b..a742b6f7c15 100644 --- a/pgtap/coloring/bipartite/inner_query.pg +++ b/pgtap/coloring/bipartite/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(54) END; CREATE OR REPLACE FUNCTION inner_query() diff --git a/pgtap/coloring/bipartite/no_crash_test.pg b/pgtap/coloring/bipartite/no_crash_test.pg index 8176e97a3d5..8dcc8753a68 100644 --- a/pgtap/coloring/bipartite/no_crash_test.pg +++ b/pgtap/coloring/bipartite/no_crash_test.pg @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(7) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); CREATE OR REPLACE FUNCTION no_crash() @@ -54,7 +54,7 @@ BEGIN -- bipartite params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$' + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$' ]::TEXT[]; subs = ARRAY[ 'NULL' diff --git a/pgtap/coloring/edgeColoring/edge_cases.pg b/pgtap/coloring/edgeColoring/edge_cases.pg index 9965c5f7f93..abda973d113 100644 --- a/pgtap/coloring/edgeColoring/edge_cases.pg +++ b/pgtap/coloring/edgeColoring/edge_cases.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.3.0') THEN plan(1) ELSE plan(29) END; CREATE OR REPLACE FUNCTION edge_cases() @@ -37,7 +37,7 @@ END IF; PREPARE q1 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id > 18; RETURN QUERY @@ -53,8 +53,8 @@ SELECT is_empty('edgeColoring1', 'Graph with 0 edge and 0 vertex -> Empty row is -- 1 vertex test PREPARE q2 AS -SELECT id, source, 2 AS target, cost, reverse_cost -FROM edge_table +SELECT id, source, 6 AS target, cost, reverse_cost +FROM edges WHERE id = 2; PREPARE edgeColoring2 AS @@ -68,11 +68,11 @@ SELECT is_empty('edgeColoring2', 'One vertex graph can not be edgeColored -> Emp PREPARE q3 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id = 7; RETURN QUERY -SELECT set_eq('q3', $$VALUES (7, 8, 5, 1, 1)$$, 'Graph with two connected vertices 8 and 5'); +SELECT set_eq('q3', $$VALUES (7, 3, 7, 1, 1)$$, 'Graph with two connected vertices'); PREPARE edgeColoring3 AS SELECT * FROM pgr_edgeColoring('q3'); @@ -87,11 +87,11 @@ SELECT set_eq('edgeColoring3', $$VALUES (7, 1)$$, 'Edge is colored with color 1' PREPARE q4 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id <= 2; RETURN QUERY -SELECT set_eq('q4', $$VALUES (1, 1, 2, 1, 1), (2, 2, 3, -1, 1)$$, 'Graph with three vertices 1, 2 and 3'); +SELECT set_eq('q4', $$VALUES (1, 5, 6, 1, 1), (2, 6, 10, -1, 1)$$, 'Graph with three vertices'); PREPARE edgeColoring4 AS SELECT * FROM pgr_edgeColoring('q4'); @@ -104,24 +104,21 @@ SELECT set_eq('edgeColoring4', $$VALUES (1, 1), (2, 2)$$, 'Two colors are expect PREPARE q5 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id <= 3; RETURN QUERY SELECT set_eq('q5', $$VALUES - (1, 1, 2, 1, 1), - (2, 2, 3, -1, 1), - (3, 3, 4, -1, 1) + (1, 5, 6, 1, 1), + (2, 6, 10, -1, 1), + (3, 10, 15, -1, 1) $$, - 'Graph with four vertices 1, 2, 3 and 4' + 'Graph with four vertices' ); -PREPARE edgeColoring5 AS -SELECT * FROM pgr_edgeColoring('q5'); - RETURN QUERY -SELECT is((SELECT count(DISTINCT color_id)::INTEGER FROM pgr_edgeColoring('q5')), 3, 'Three colors are expected'); +SELECT ok((SELECT count(DISTINCT color_id) <= 3 FROM pgr_edgeColoring('q5')), 'At most three colors are expected'); -- even length cycle test @@ -130,23 +127,20 @@ SELECT is((SELECT count(DISTINCT color_id)::INTEGER FROM pgr_edgeColoring('q5')) PREPARE q6 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id IN (8, 10, 11, 12); RETURN QUERY SELECT set_eq('q6', $$VALUES - (8, 5, 6, 1, 1), - (10, 5, 10, 1, 1), - (11, 6, 11, 1, -1), - (12, 10, 11, 1, -1) + (8, 7, 11, 1, 1), + (10, 7, 8, 1, 1), + (11, 11, 12, 1, -1), + (12, 8, 12, 1, -1) $$, - 'Graph with four vertices 5, 6, 10 and 11 (cyclic)' + 'Graph with four vertices (cyclic)' ); -PREPARE edgeColoring6 AS -SELECT * FROM pgr_edgeColoring('q6'); - RETURN QUERY SELECT ok((SELECT count(DISTINCT color_id) <= 3 FROM pgr_edgeColoring('q6')), 'At most three colors are expected'); @@ -156,23 +150,20 @@ SELECT ok((SELECT count(DISTINCT color_id) <= 3 FROM pgr_edgeColoring('q6')), 'A PREPARE q7 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id IN (8, 10, 11, 12) ORDER BY id DESC; RETURN QUERY SELECT set_eq('q7', $$VALUES - (12, 10, 11, 1, -1), - (11, 6, 11, 1, -1), - (10, 5, 10, 1, 1), - (8, 5, 6, 1, 1) + (8, 7, 11, 1, 1), + (10, 7, 8, 1, 1), + (11, 11, 12, 1, -1), + (12, 8, 12, 1, -1) $$, - 'Graph with four vertices 5, 6, 10 and 11 (cyclic)' + 'Graph with four vertices (cyclic)' ); -PREPARE edgeColoring7 AS -SELECT * FROM pgr_edgeColoring('q7'); - RETURN QUERY SELECT is((SELECT count(DISTINCT color_id)::INTEGER FROM pgr_edgeColoring('q7')), 2, 'Two colors are expected'); @@ -208,9 +199,6 @@ SELECT set_eq('q8', 'Cyclic Graph with three vertices 3, 6 and 8' ); -PREPARE edgeColoring8 AS -SELECT * FROM pgr_edgeColoring('q8'); - RETURN QUERY SELECT is((SELECT count(DISTINCT color_id)::INTEGER FROM pgr_edgeColoring('q8')), 3, 'Three colors are expected'); @@ -248,9 +236,6 @@ SELECT set_eq('q9', 'Cyclic Graph with five vertices 1, 2, 3, 4 and 5' ); -PREPARE edgeColoring9 AS -SELECT * FROM pgr_edgeColoring('q9'); - RETURN QUERY SELECT is((SELECT count(DISTINCT color_id)::INTEGER FROM pgr_edgeColoring('q9')), 3, 'Three colors are expected'); @@ -358,9 +343,6 @@ SELECT set_eq('q12', 'A tree Graph with seven vertices 1, 2, 3, 4, 5, 6 and 7' ); -PREPARE edgeColoring12 AS -SELECT * FROM pgr_edgeColoring('q12'); - RETURN QUERY SELECT is((SELECT count(DISTINCT color_id)::INTEGER FROM pgr_edgeColoring('q12')), 3, 'Three colors are expected'); @@ -394,9 +376,6 @@ SELECT set_eq('q13', 'Multiple edge Graph with three vertices 1, 2 and 3' ); -PREPARE edgeColoring13 AS -SELECT * FROM pgr_edgeColoring('q13'); - RETURN QUERY SELECT is((SELECT count(DISTINCT color_id)::INTEGER FROM pgr_edgeColoring('q13')), 2, 'Two colors are expected'); @@ -462,9 +441,6 @@ SELECT set_eq('q15', 'Disconnected Graph with four vertices 1, 2, 3 and 4' ); -PREPARE edgeColoring15 AS -SELECT count(DISTINCT color_id) FROM pgr_edgeColoring('q15'); - RETURN QUERY SELECT is((SELECT count(DISTINCT color_id)::INTEGER FROM pgr_edgeColoring('q15')), 1, 'One color is required'); diff --git a/pgtap/coloring/edgeColoring/inner_query.pg b/pgtap/coloring/edgeColoring/inner_query.pg index 8300102c3f2..52fcd4e37c4 100644 --- a/pgtap/coloring/edgeColoring/inner_query.pg +++ b/pgtap/coloring/edgeColoring/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.3.0') THEN plan(1) ELSE plan(54) END; CREATE OR REPLACE FUNCTION inner_query() diff --git a/pgtap/coloring/edgeColoring/no_crash_test.pg b/pgtap/coloring/edgeColoring/no_crash_test.pg index d2214ee9aee..442a2feba9e 100644 --- a/pgtap/coloring/edgeColoring/no_crash_test.pg +++ b/pgtap/coloring/edgeColoring/no_crash_test.pg @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.3.0') THEN plan(1) ELSE plan(7) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); CREATE OR REPLACE FUNCTION no_crash() @@ -54,7 +54,7 @@ BEGIN -- bipartite params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$' + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$' ]::TEXT[]; subs = ARRAY[ 'NULL' diff --git a/pgtap/coloring/sequentialVertexColoring/edge_cases.pg b/pgtap/coloring/sequentialVertexColoring/edge_cases.pg index 5d11ce8c082..c7db2823013 100644 --- a/pgtap/coloring/sequentialVertexColoring/edge_cases.pg +++ b/pgtap/coloring/sequentialVertexColoring/edge_cases.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(18) END; CREATE OR REPLACE FUNCTION edge_cases() @@ -37,7 +37,7 @@ END IF; PREPARE q1 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id > 18; RETURN QUERY @@ -56,41 +56,36 @@ SELECT is_empty('sequentialVertexColoring2', '2: Graph with 0 edge and 0 vertex -- 1 vertex test PREPARE q3 AS -SELECT id, source, 2 AS target, cost, reverse_cost -FROM edge_table +SELECT id, source, 6 AS target, cost, reverse_cost +FROM edges WHERE id = 2; RETURN QUERY -SELECT set_eq('q3', $$VALUES (2, 2, 2, -1, 1)$$, 'q3: Graph with only vertex 2'); +SELECT set_eq('q3', $$VALUES (2, 6, 6, -1, 1)$$, 'q3: Graph with one vertex'); PREPARE sequentialVertexColoring4 AS -SELECT * -FROM pgr_sequentialVertexColoring( - 'q3' -); +SELECT * FROM pgr_sequentialVertexColoring('q3'); RETURN QUERY -SELECT set_eq('sequentialVertexColoring4', $$VALUES (2, 1)$$, '4: Node 2 with color 1 is returned'); +SELECT set_eq('sequentialVertexColoring4', $$VALUES (6, 1)$$, '4: Node 6 with color 1'); -- 2 vertices test (connected) PREPARE q5 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id = 7; RETURN QUERY -SELECT set_eq('q5', $$VALUES (7, 8, 5, 1, 1)$$, 'q5: Graph with two connected vertices 8 and 5'); +SELECT set_eq('q5', $$VALUES (7, 3, 7, 1, 1)$$, 'q5: Graph with two connected vertices'); PREPARE sequentialVertexColoring6 AS -SELECT * -FROM pgr_sequentialVertexColoring( - 'q5' -); +SELECT color_id, count(DISTINCT color_id) +FROM pgr_sequentialVertexColoring('q5') GROUP BY color_id; RETURN QUERY -SELECT set_eq('sequentialVertexColoring6', $$VALUES (5, 2), (8, 1)$$, '6: Both vertices have different color'); +SELECT set_eq('sequentialVertexColoring6', $$VALUES (1,1), (2, 1)$$, '6: Both vertices have different color'); -- 2 vertices test (isolated) @@ -112,7 +107,7 @@ SELECT id, source, target, cost, reverse_cost FROM two_isolated_vertices_table; RETURN QUERY -SELECT set_eq('q7', $$VALUES (1, 2, 2, -1, 1), (2, 1, 1, 1, -1)$$, 'q7: Graph with two isolated vertices 1 and 2'); +SELECT set_eq('q7', $$VALUES (1, 2, 2, -1, 1), (2, 1, 1, 1, -1)$$, 'q7: Graph with two isolated vertices'); PREPARE sequentialVertexColoring8 AS SELECT * @@ -128,20 +123,17 @@ SELECT set_eq('sequentialVertexColoring8', $$VALUES (1, 1), (2, 1)$$, '8: Both v PREPARE q9 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id <= 2; RETURN QUERY -SELECT set_eq('q9', $$VALUES (1, 1, 2, 1, 1), (2, 2, 3, -1, 1)$$, 'q9: Graph with three vertices 1, 2 and 3'); +SELECT set_eq('q9', $$VALUES (1, 5, 6, 1, 1), (2, 6, 10, -1, 1)$$, 'q9: Graph with three vertices'); PREPARE sequentialVertexColoring10 AS -SELECT * -FROM pgr_sequentialVertexColoring( - 'q9' -); +SELECT count(DISTINCT color_id) FROM pgr_sequentialVertexColoring('q9'); RETURN QUERY -SELECT set_eq('sequentialVertexColoring10', $$VALUES (1, 1), (2, 2), (3, 1)$$, '10: Two colors are required'); +SELECT set_eq('sequentialVertexColoring10', $$VALUES (2)$$, '10: Two colors are required'); -- 3 vertices test (cyclic) @@ -170,72 +162,64 @@ SELECT set_eq('q11', (2, 3, 8, 10, -10), (3, 6, 8, -1, 12) $$, - 'q11: Cyclic Graph with three vertices 3, 6 and 8' + 'q11: Cyclic Graph with three vertices' ); PREPARE sequentialVertexColoring12 AS -SELECT * -FROM pgr_sequentialVertexColoring( - 'q11' -); +SELECT count(DISTINCT color_id) +FROM pgr_sequentialVertexColoring('q11'); RETURN QUERY -SELECT set_eq('sequentialVertexColoring12', $$VALUES (3, 1), (6, 2), (8, 3)$$, '12: Three colors are required'); +SELECT set_eq('sequentialVertexColoring12', $$VALUES (3)$$, '12: Three colors are required'); -- 4 vertices test (linear) PREPARE q13 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id <= 3; RETURN QUERY SELECT set_eq('q13', $$VALUES - (1, 1, 2, 1, 1), - (2, 2, 3, -1, 1), - (3, 3, 4, -1, 1) + (1, 5, 6, 1, 1), + (2, 6, 10, -1, 1), + (3, 10, 15, -1, 1) $$, - 'q13: Graph with four vertices 1, 2, 3 and 4' + 'q13: Graph with four vertices' ); PREPARE sequentialVertexColoring14 AS -SELECT * -FROM pgr_sequentialVertexColoring( - 'q13' -); +SELECT count(DISTINCT color_id) FROM pgr_sequentialVertexColoring('q13'); RETURN QUERY -SELECT set_eq('sequentialVertexColoring14', $$VALUES (1, 1), (2, 2), (3, 1), (4, 2)$$, '14: Two colors are required'); +SELECT set_eq('sequentialVertexColoring14', $$VALUES (2)$$, '14: Two colors are required'); -- 4 vertices test (cyclic) PREPARE q15 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id IN (8, 10, 11, 12); RETURN QUERY SELECT set_eq('q15', $$VALUES - (8, 5, 6, 1, 1), - (10, 5, 10, 1, 1), - (11, 6, 11, 1, -1), - (12, 10, 11, 1, -1) + (8,7,11,1,1), + (10,7,8,1,1), + (11,11,12,1,-1), + (12,8,12,1,-1) $$, - 'q15: Graph with four vertices 5, 6, 10 and 11 (cyclic)' -); + 'q15: Graph with four vertices (cyclic)' + ); PREPARE sequentialVertexColoring16 AS -SELECT * -FROM pgr_sequentialVertexColoring( - 'q15' -); +SELECT count(DISTINCT color_id) FROM pgr_sequentialVertexColoring('q15'); RETURN QUERY -SELECT set_eq('sequentialVertexColoring16', $$VALUES (5, 1), (6, 2), (10, 2), (11, 1)$$, '16: Two colors are required'); +SELECT set_eq('sequentialVertexColoring16', $$VALUES (2)$$, '16: Two colors are required'); -- 4 vertices test (all connected) diff --git a/pgtap/coloring/sequentialVertexColoring/inner_query.pg b/pgtap/coloring/sequentialVertexColoring/inner_query.pg index a8010c58135..d2d0329ea07 100644 --- a/pgtap/coloring/sequentialVertexColoring/inner_query.pg +++ b/pgtap/coloring/sequentialVertexColoring/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(54) END; CREATE OR REPLACE FUNCTION inner_query() diff --git a/pgtap/coloring/sequentialVertexColoring/no_crash_test.pg b/pgtap/coloring/sequentialVertexColoring/no_crash_test.pg index a1fc2a53191..9b16babd305 100644 --- a/pgtap/coloring/sequentialVertexColoring/no_crash_test.pg +++ b/pgtap/coloring/sequentialVertexColoring/no_crash_test.pg @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(7) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); @@ -55,7 +55,7 @@ BEGIN -- sequentialVertexColoring params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$' + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$' ]::TEXT[]; subs = ARRAY[ 'NULL' diff --git a/pgtap/common/checkVertTab.pg b/pgtap/common/checkVertTab.pg index a0f48681341..32a08bb814a 100644 --- a/pgtap/common/checkVertTab.pg +++ b/pgtap/common/checkVertTab.pg @@ -20,26 +20,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(12); SET client_min_messages to WARNING; - -SELECT has_column( 'edge_table_vertices_pgr', 'cnt', '1' ); -SELECT has_column( 'edge_table_vertices_pgr', 'chk', '2' ); -SELECT results_eq( 'SELECT 3, * FROM _pgr_checkVertTab(''edge_table_vertices_pgr'', ''{"id","cnt","chk"}''::text[]) ', - 'SELECT 3, ''public''::TEXT,''edge_table_vertices_pgr''::TEXT'); -SELECT has_column( 'edge_table_vertices_pgr', 'cnt', '4' ); -SELECT has_column( 'edge_table_vertices_pgr', 'chk', '5' ); - -SELECT hasnt_column( 'edge_table', 'cnt', '6' ); -SELECT hasnt_column( 'edge_table', 'chk', '7' ); -SELECT has_column( 'edge_table', 'id', '8' ); -SELECT results_eq( 'SELECT 9, * FROM _pgr_checkVertTab(''edge_table'', ''{"id","cnt","chk"}''::text[]) ', - 'SELECT 9, ''public''::TEXT,''edge_table''::TEXT'); -SELECT has_column( 'edge_table', 'cnt', '10' ); -SELECT has_column( 'edge_table', 'chk', '11' ); +SELECT pgr_createVerticesTable('edges', 'geom'); + +SELECT has_column( 'edges_vertices_pgr', 'cnt', '1' ); +SELECT has_column( 'edges_vertices_pgr', 'chk', '2' ); +SELECT results_eq( 'SELECT 3, * FROM _pgr_checkVertTab(''edges_vertices_pgr'', ''{"id","cnt","chk"}''::text[]) ', + 'SELECT 3, ''public''::TEXT,''edges_vertices_pgr''::TEXT'); +SELECT has_column( 'edges_vertices_pgr', 'cnt', '4' ); +SELECT has_column( 'edges_vertices_pgr', 'chk', '5' ); + +SELECT hasnt_column( 'edges', 'cnt', '6' ); +SELECT hasnt_column( 'edges', 'chk', '7' ); +SELECT has_column( 'edges', 'id', '8' ); +SELECT results_eq( 'SELECT 9, * FROM _pgr_checkVertTab(''edges'', ''{"id","cnt","chk"}''::text[]) ', + 'SELECT 9, ''public''::TEXT,''edges''::TEXT'); +SELECT has_column( 'edges', 'cnt', '10' ); +SELECT has_column( 'edges', 'chk', '11' ); SELECT throws_ok('SELECT * FROM _pgr_checkVertTab(''no_table'', ''{"id","cnt","chk"}''::text[])', 'P0001', 'raise_exception', '12'); diff --git a/pgtap/common/getColumnName.pg b/pgtap/common/getColumnName.pg index 38e9749532d..cc90a1f21e4 100644 --- a/pgtap/common/getColumnName.pg +++ b/pgtap/common/getColumnName.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(32); SET client_min_messages to WARNING; diff --git a/pgtap/common/getColumnType.pg b/pgtap/common/getColumnType.pg index 3967ae4ba82..bd2ab464369 100644 --- a/pgtap/common/getColumnType.pg +++ b/pgtap/common/getColumnType.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(21); diff --git a/pgtap/common/getTableName.pg b/pgtap/common/getTableName.pg index b1069e51648..f964bb3456f 100644 --- a/pgtap/common/getTableName.pg +++ b/pgtap/common/getTableName.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(35); set client_min_messages to warning; diff --git a/pgtap/common/isColumnInTable.pg b/pgtap/common/isColumnInTable.pg index a3f2bc7f9a4..4ee8646559d 100644 --- a/pgtap/common/isColumnInTable.pg +++ b/pgtap/common/isColumnInTable.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(56); CREATE SCHEMA s1; diff --git a/pgtap/common/isColumnIndexed.pg b/pgtap/common/isColumnIndexed.pg index b8b87292f7a..fb40f3bfba3 100644 --- a/pgtap/common/isColumnIndexed.pg +++ b/pgtap/common/isColumnIndexed.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(60); CREATE SCHEMA s1; diff --git a/pgtap/components/articulationPoints/inner_query.pg b/pgtap/components/articulationPoints/inner_query.pg index d2d844e62cc..c442b1a914c 100644 --- a/pgtap/components/articulationPoints/inner_query.pg +++ b/pgtap/components/articulationPoints/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_articulationPoints(', ')'); diff --git a/pgtap/components/articulationPoints/no_crash_test.pg b/pgtap/components/articulationPoints/no_crash_test.pg index ab9cbd18612..44653813789 100644 --- a/pgtap/components/articulationPoints/no_crash_test.pg +++ b/pgtap/components/articulationPoints/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; SELECT isnt_empty('edges', 'Should not be empty true to tests be meaningful'); @@ -34,7 +34,7 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$']::TEXT[]; + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$']::TEXT[]; subs = ARRAY[ 'NULL' ]::TEXT[]; diff --git a/pgtap/components/articulationPoints/types_check.pg b/pgtap/components/articulationPoints/types_check.pg index cbe46434d4c..eb80c7ca442 100644 --- a/pgtap/components/articulationPoints/types_check.pg +++ b/pgtap/components/articulationPoints/types_check.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); SELECT has_function('pgr_articulationpoints'); diff --git a/pgtap/components/biconnectedComponents/inner_query.pg b/pgtap/components/biconnectedComponents/inner_query.pg index 6c4794a701e..a84820d6330 100644 --- a/pgtap/components/biconnectedComponents/inner_query.pg +++ b/pgtap/components/biconnectedComponents/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_biconnectedComponents(', ')'); diff --git a/pgtap/components/biconnectedComponents/no_crash_test.pg b/pgtap/components/biconnectedComponents/no_crash_test.pg index 02121d87a31..0a5bea2f1c9 100644 --- a/pgtap/components/biconnectedComponents/no_crash_test.pg +++ b/pgtap/components/biconnectedComponents/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; SELECT isnt_empty('edges', 'Should not be empty true to tests be meaningful'); @@ -34,7 +34,7 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$']::TEXT[]; + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$']::TEXT[]; subs = ARRAY[ 'NULL' ]::TEXT[]; diff --git a/pgtap/components/biconnectedComponents/types_check.pg b/pgtap/components/biconnectedComponents/types_check.pg index 8cd2b7440a4..9770e657ccd 100644 --- a/pgtap/components/biconnectedComponents/types_check.pg +++ b/pgtap/components/biconnectedComponents/types_check.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); SELECT has_function('pgr_biconnectedcomponents'); diff --git a/pgtap/components/bridges/inner_query.pg b/pgtap/components/bridges/inner_query.pg index 19804fd46fe..cb8990c40f8 100644 --- a/pgtap/components/bridges/inner_query.pg +++ b/pgtap/components/bridges/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_bridges(', ')'); diff --git a/pgtap/components/bridges/no_crash_test.pg b/pgtap/components/bridges/no_crash_test.pg index 5a146576708..2ff3e58d1f5 100644 --- a/pgtap/components/bridges/no_crash_test.pg +++ b/pgtap/components/bridges/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; SELECT isnt_empty('edges', 'Should not be empty true to tests be meaningful'); @@ -34,7 +34,7 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$']::TEXT[]; + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$']::TEXT[]; subs = ARRAY[ 'NULL' ]::TEXT[]; diff --git a/pgtap/components/bridges/types_check.pg b/pgtap/components/bridges/types_check.pg index 5df8111897f..e9c6797d3ce 100644 --- a/pgtap/components/bridges/types_check.pg +++ b/pgtap/components/bridges/types_check.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); SELECT has_function('pgr_bridges'); diff --git a/pgtap/components/connectedComponenes/inner_query.pg b/pgtap/components/connectedComponenes/inner_query.pg index 42ee813b0cd..92344a2284b 100644 --- a/pgtap/components/connectedComponenes/inner_query.pg +++ b/pgtap/components/connectedComponenes/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_connectedComponents(', ')'); diff --git a/pgtap/components/connectedComponenes/no_crash_test.pg b/pgtap/components/connectedComponenes/no_crash_test.pg index ae991f16dda..8d8b3231b61 100644 --- a/pgtap/components/connectedComponenes/no_crash_test.pg +++ b/pgtap/components/connectedComponenes/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; SELECT isnt_empty('edges', 'Should not be empty true to tests be meaningful'); @@ -34,7 +34,7 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$']::TEXT[]; + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$']::TEXT[]; subs = ARRAY[ 'NULL' ]::TEXT[]; diff --git a/pgtap/components/makeConnected/edge_cases.pg b/pgtap/components/makeConnected/edge_cases.pg index 3fdafb6d3d9..9d409dfe586 100644 --- a/pgtap/components/makeConnected/edge_cases.pg +++ b/pgtap/components/makeConnected/edge_cases.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(20) END; @@ -38,7 +38,7 @@ END IF; PREPARE q1 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id > 18; -- Graph is empty - it has 0 edge and 0 vertex @@ -58,7 +58,7 @@ SELECT is_empty('makeConnected2', '2: Graph with 0 edge and 0 vertex -> Empty ro PREPARE q3 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table WHERE source = 50; +FROM edges WHERE source = 50; RETURN QUERY SELECT is_empty('q3','3: Vertex 50 does not exist in sample data'); @@ -73,148 +73,148 @@ SELECT is_empty('vertexNotPresent4', '4: Vertex Not present in the graph -> Empt -- 1 vertex tests PREPARE q5 AS -SELECT id, source, 6 AS target, cost, reverse_cost -FROM edge_table +SELECT id, source, source AS target, cost, reverse_cost +FROM edges WHERE id = 9; -- Graph with only vertex 9 RETURN QUERY -SELECT set_eq('q5', $$VALUES (9, 6, 6, 1, 1)$$, 'q5: Graph with only vertex 6'); +SELECT set_eq('q5', $$VALUES (9, 11, 11, 1, 1)$$, 'q5: u<->u'); PREPARE oneVertexTest6 AS SELECT * FROM pgr_makeConnected('q5'); RETURN QUERY -SELECT is_empty('oneVertexTest6', '6: Graph is already Connected -> Empty row is returned'); +SELECT is_empty('oneVertexTest6', '6: u<->u already Connected -> Empty row'); -- 2 vertices tests ===> Already Connected PREPARE q7 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id = 1; RETURN QUERY -SELECT set_eq('q7', $$VALUES (1, 1, 2, 1, 1)$$, 'q9: Graph with two vertices 1 and 2'); +SELECT set_eq('q7', $$VALUES (1, 5, 6, 1, 1)$$, 'q9: u<->v'); PREPARE twoVerticesTest8 AS SELECT * FROM pgr_makeConnected('q7'); RETURN QUERY -SELECT is_empty('twoVerticesTest8', '8: Graph is already Connected -> Empty row is returned'); +SELECT is_empty('twoVerticesTest8', '8: u<->v is Connected -> Empty row'); -- 2 vertices tests ===> Not Connected PREPARE q9 AS -SELECT id, source, 2 AS target, cost, reverse_cost FROM edge_table WHERE id = 2 +SELECT id, source, source AS target, cost, reverse_cost FROM edges WHERE id = 2 UNION -SELECT id, source, 6 AS target, cost, reverse_cost FROM edge_table WHERE id = 9; +SELECT id, source, source AS target, cost, reverse_cost FROM edges WHERE id = 9; RETURN QUERY -SELECT set_eq('q9', $$VALUES (2, 2, 2, -1, 1), (9, 6, 6, 1, 1)$$, 'q9: Graph with two vertices 2 and 6'); +SELECT set_eq('q9', $$VALUES (2, 6, 6, -1, 1), (9, 11, 11, 1, 1)$$, 'q9: u<->u v<->v'); PREPARE twoVerticesTest10 AS -SELECT * +SELECT count(*) FROM pgr_makeConnected('q9'); RETURN QUERY -SELECT set_eq('twoVerticesTest10', $$VALUES (1, 2, 6)$$, '10: One row is returned'); +SELECT results_eq('twoVerticesTest10', 'SELECT 1::BIGINT', '10: u<->u v<->v => One row'); -- 3 vertices tests ====> Already Connnected PREPARE q11 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id IN (1,2); RETURN QUERY -SELECT set_eq('q11', $$VALUES (1, 1, 2, 1, 1), (2, 2, 3, -1, 1)$$, 'q11: Graph with three vertices 1, 2 and 3'); +SELECT set_eq('q11', $$VALUES (1, 5, 6, 1, 1), (2, 6, 10, -1, 1)$$, 'q11: u<->v<-w'); PREPARE threeVerticesTest12 AS SELECT * FROM pgr_makeConnected('q11'); RETURN QUERY -SELECT is_empty('threeVerticesTest12', '12: Graph is already Connected -> Empty row is returned'); +SELECT is_empty('threeVerticesTest12', '12: u<->v<-w already Connected => Empty'); -- 3 vertices tests ====> Not Connnected PREPARE q13 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 +SELECT id, source, source AS target, cost, reverse_cost FROM edges WHERE id = 2 UNION -SELECT id, source, 6 AS target, cost, reverse_cost FROM edge_table WHERE id = 9; +SELECT id, source, source AS target, cost, reverse_cost FROM edges WHERE id = 9; RETURN QUERY -SELECT set_eq('q13', $$VALUES (2, 2, 3, -1, 1), (9, 6, 6, 1, 1)$$, 'q13: Graph with two vertices 2 and 6'); +SELECT set_eq('q13', $$VALUES (2, 6, 6, -1, 1), (9, 11, 11, 1, 1)$$, 'q13: u->u v<->v'); PREPARE threeVerticesTest14 AS -SELECT * +SELECT count(*) FROM pgr_makeConnected('q13'); RETURN QUERY -SELECT set_eq('threeVerticesTest14', $$VALUES (1, 3, 6)$$, '14: One row is returned'); +SELECT results_eq('threeVerticesTest14', $$SELECT 1::BIGINT$$, 'u->u v<->v => One row'); -- 4 vertex tests ===> Cyclic PREPARE q15 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id IN (8, 10, 11, 12); RETURN QUERY SELECT set_eq('q15', $$VALUES - (8, 5, 6, 1, 1), - (10, 5, 10, 1, 1), - (11, 6, 11, 1, -1), - (12, 10, 11, 1, -1) + (8, 7, 11, 1, 1), + (10, 7, 8, 1, 1), + (11, 11, 12, 1, -1), + (12, 8, 12, 1, -1) $$, - 'q15: Graph with four vertices 5, 6, 10 and 11 (cyclic)' + 'q15: 8<->7<->11->12->8' ); PREPARE fourVerticesCyclicTest16 AS SELECT * FROM pgr_makeConnected('q15'); RETURN QUERY -SELECT is_empty('fourVerticesCyclicTest16', '14: Graph is already Connected -> Empty row is returned'); +SELECT is_empty('fourVerticesCyclicTest16', '14: 8<->7<->11->12->8 => Empty'); -- 4 vertex tests ===> Not Connected PREPARE q17 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id IN (1,6); RETURN QUERY -SELECT set_eq('q17', $$VALUES (1, 1, 2, 1, 1), (6, 7, 8, 1, 1)$$, 'q17: Graph with four vertices 1, 2, 7 and 8'); +SELECT set_eq('q17', $$VALUES (1, 5, 6, 1, 1), (6, 1, 3, 1, 1)$$, 'q17: u<->v w<->z'); PREPARE fourVerticesTest18 AS -SELECT * +SELECT count(*) FROM pgr_makeConnected('q17'); RETURN QUERY -SELECT set_eq('fourVerticesTest18', $$VALUES (1, 2, 7) $$, '18:Two Connected Components. One row is returned'); +SELECT set_eq('fourVerticesTest18', $$SELECT 1::BIGINT$$, '18: u<->v w<->z => One row'); PREPARE q19 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id IN (17,18); RETURN QUERY -SELECT set_eq('q19', $$VALUES (17, 14, 15, 1, 1), (18, 16, 17, 1, 1)$$, 'q19: Graph with four vertices 14, 15, 16 and 17'); +SELECT set_eq('q19', $$VALUES (17, 2, 4, 1, 1), (18, 13, 14, 1, 1)$$, 'q19: u<->v w<->z => One row'); PREPARE fourVerticesTest20 AS -SELECT * +SELECT count(*) FROM pgr_makeConnected('q19'); RETURN QUERY -SELECT set_eq('fourVerticesTest20', $$VALUES (1, 15, 16) $$,'20:Two Connected Components. One row is returned'); +SELECT set_eq('fourVerticesTest20', $$SELECT 1::BIGINT$$, '18: u<->v w<->z => One row'); END; $BODY$ diff --git a/pgtap/components/makeConnected/inner_query.pg b/pgtap/components/makeConnected/inner_query.pg index dad5cd97d89..299a3e6cf9e 100644 --- a/pgtap/components/makeConnected/inner_query.pg +++ b/pgtap/components/makeConnected/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(54) END; CREATE OR REPLACE FUNCTION inner_query() diff --git a/pgtap/components/makeConnected/no_crash_test.pg b/pgtap/components/makeConnected/no_crash_test.pg index 00604e8eb6c..725f647da7e 100644 --- a/pgtap/components/makeConnected/no_crash_test.pg +++ b/pgtap/components/makeConnected/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(5) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; CREATE OR REPLACE FUNCTION test_function() @@ -42,7 +42,7 @@ BEGIN RETURN QUERY SELECT isnt_empty('edges', 'Should not be empty true to tests be meaningful'); - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$']::TEXT[]; + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$']::TEXT[]; subs = ARRAY[ 'NULL' ]::TEXT[]; diff --git a/pgtap/components/strongComponenets/inner_query.pg b/pgtap/components/strongComponenets/inner_query.pg index 57f824a5528..61f50b9611d 100644 --- a/pgtap/components/strongComponenets/inner_query.pg +++ b/pgtap/components/strongComponenets/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_strongComponents(', ')'); diff --git a/pgtap/components/strongComponenets/no_crash_test.pg b/pgtap/components/strongComponenets/no_crash_test.pg index 57ccc47e79a..f14f4da6ff5 100644 --- a/pgtap/components/strongComponenets/no_crash_test.pg +++ b/pgtap/components/strongComponenets/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; SELECT isnt_empty('edges', 'Should not be empty true to tests be meaningful'); @@ -34,7 +34,7 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$']::TEXT[]; + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$']::TEXT[]; subs = ARRAY[ 'NULL' ]::TEXT[]; diff --git a/pgtap/components/strongComponenets/types_check.pg b/pgtap/components/strongComponenets/types_check.pg index 45461186bf4..3b5a7f79ddb 100644 --- a/pgtap/components/strongComponenets/types_check.pg +++ b/pgtap/components/strongComponenets/types_check.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); SELECT has_function('pgr_strongcomponents'); diff --git a/pgtap/contraction/combined/compare_dijsktra.pg b/pgtap/contraction/combined/compare_dijsktra.pg index 4c1ece0eeb8..bc1550f5508 100644 --- a/pgtap/contraction/combined/compare_dijsktra.pg +++ b/pgtap/contraction/combined/compare_dijsktra.pg @@ -22,98 +22,98 @@ BEGIN; SELECT plan(334); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; --step 1: Initial tables -SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table$$); -SELECT isnt_empty($$SELECT id FROM edge_table_vertices_pgr$$); +SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edges$$); +SELECT isnt_empty($$SELECT id FROM vertices$$); -- add extra columns to the edges and vertices table -ALTER TABLE edge_table +ALTER TABLE edges ADD is_contracted BOOLEAN DEFAULT false, ADD contracted_vertices integer[]; -ALTER TABLE edge_table_vertices_pgr +ALTER TABLE vertices ADD is_contracted BOOLEAN DEFAULT false, ADD contracted_vertices integer[]; -SELECT has_column('edge_table', 'is_contracted'); -SELECT has_column('edge_table_vertices_pgr', 'is_contracted'); -SELECT has_column('edge_table', 'contracted_vertices'); -SELECT has_column('edge_table_vertices_pgr', 'contracted_vertices'); +SELECT has_column('edges', 'is_contracted'); +SELECT has_column('vertices', 'is_contracted'); +SELECT has_column('edges', 'contracted_vertices'); +SELECT has_column('vertices', 'contracted_vertices'); SELECT * INTO contraction_info FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', ARRAY[1,2]::integer[], 1, ARRAY[]::BIGINT[], false); PREPARE c_info AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('v', 5, ARRAY[7, 8], -1, -1, '-1.000'), - ('v', 15, ARRAY[14], -1, -1, '-1.000'), - ('v', 17, ARRAY[16], -1, -1, '-1.000'), - ('e', -3, ARRAY[10, 13], 5, 11, '2.244'), - ('e', -4, ARRAY[12], 9, 11, '2.394'), - ('e', -1, ARRAY[1, 2], 3, 5, '2.020'), - ('e', -2, ARRAY[4], 3, 9, '2.265') + ('v', 7, ARRAY[1, 3], -1, -1, '-1.000'), + ('v', 4, ARRAY[2], -1, -1, '-1.000'), + ('v', 14, ARRAY[13], -1, -1, '-1.000'), + ('e', -3, ARRAY[8, 9], 7, 12, '2.244'), + ('e', -4, ARRAY[17], 16, 12, '2.394'), + ('e', -1, ARRAY[5, 6], 10, 7, '2.020'), + ('e', -2, ARRAY[15], 10, 16, '2.265') ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq($$SELECT type, id, contracted_vertices, source, target, round(cost::numeric,3)::TEXT FROM contraction_info$$, 'c_info'); -- add the new edges -INSERT INTO edge_table(source, target, cost, reverse_cost, contracted_vertices, is_contracted) +INSERT INTO edges(source, target, cost, reverse_cost, contracted_vertices, is_contracted) SELECT source, target, cost, -1, contracted_vertices, true FROM contraction_info WHERE type = 'e'; -- Indicate vertices that were contracted -UPDATE edge_table_vertices_pgr +UPDATE vertices SET is_contracted = true WHERE id IN (SELECT unnest(contracted_vertices) FROM contraction_info); -- add the contracted vertices on the vertices table -UPDATE edge_table_vertices_pgr +UPDATE vertices SET contracted_vertices = contraction_info.contracted_vertices FROM contraction_info -WHERE type = 'v' AND edge_table_vertices_pgr.id = contraction_info.id; +WHERE type = 'v' AND vertices.id = contraction_info.id; SELECT id - FROM edge_table + FROM edges WHERE is_contracted; SELECT set_eq($$SELECT id - FROM edge_table + FROM edges WHERE NOT is_contracted$$, $$SELECT unnest(ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])$$ ); -SELECT todo('Something is wrong with this test',1); -SELECT set_eq($$SELECT id - FROM edge_table +SELECT set_hasnt($$SELECT id + FROM edges WHERE is_contracted$$, - $$SELECT unnest(ARRAY[19,20, 21, 22])$$); + $$SELECT unnest(ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])$$ +); -- the contracted graph PREPARE c_graph AS -SELECT source, target, round(cost::numeric,3)::TEXT AS cost, round(reverse_cost::numeric,3)::TEXT AS reverse_cost FROM edge_table +SELECT source, target, round(cost::numeric,3)::TEXT AS cost, round(reverse_cost::numeric,3)::TEXT AS reverse_cost FROM edges WHERE - EXISTS (SELECT id FROM edge_table_vertices_pgr AS v WHERE NOT is_contracted AND v.id = edge_table.source) + EXISTS (SELECT id FROM vertices AS v WHERE NOT is_contracted AND v.id = edges.source) AND - EXISTS (SELECT id FROM edge_table_vertices_pgr AS v WHERE NOT is_contracted AND v.id = edge_table.target); + EXISTS (SELECT id FROM vertices AS v WHERE NOT is_contracted AND v.id = edges.target); PREPARE c_expected_graph AS SELECT source, target, cost, reverse_cost FROM (VALUES - (3, 6, '1.025', '-0.975'), - (5, 6, '1.064', '1.064'), - (6, 9, '1.081', '1.081'), - (6, 11, '1.121', '-0.879'), - (5, 11, '2.244', '-1.000'), - (3, 9, '2.265', '-1.000'), - (9, 11, '2.394', '-1.000'), - (3, 5, '2.020', '-1.000')) + (10, 11, '1.025', '-0.975'), + (7, 11, '1.064', '1.064'), + (11, 16, '1.081', '1.081'), + (11, 12, '1.121', '-0.879'), + (7, 12, '2.244', '-1.000'), + (10, 16, '2.265', '-1.000'), + (16, 12, '2.394', '-1.000'), + (10, 7, '2.020', '-1.000')) AS t(source, target, cost, reverse_cost); SELECT set_eq('c_graph', 'c_expected_graph'); @@ -129,22 +129,22 @@ BEGIN WITH contracted_section AS ( SELECT unnest(contracted_vertices) AS id - FROM edge_table_vertices_pgr + FROM vertices WHERE ARRAY[%1$s, %2$s] && contracted_vertices UNION SELECT unnest(contracted_vertices) AS id - FROM edge_table + FROM edges WHERE ARRAY[%1$s, %2$s] && contracted_vertices ), vertices AS ( - SELECT id FROM edge_table_vertices_pgr + SELECT id FROM vertices WHERE NOT is_contracted OR id IN (SELECT id FROM contracted_section) ) - SELECT id, source, target, cost, reverse_cost FROM edge_table + SELECT id, source, target, cost, reverse_cost FROM edges WHERE - EXISTS (SELECT id FROM vertices WHERE vertices.id = edge_table.source) + EXISTS (SELECT id FROM vertices WHERE vertices.id = edges.source) AND - EXISTS (SELECT id FROM vertices WHERE vertices.id = edge_table.target) + EXISTS (SELECT id FROM vertices WHERE vertices.id = edges.target) $query$, $1::BIGINT, $2::BIGINT); -- set client_min_messages TO notice; -- raise notice '%', graph_q; @@ -154,11 +154,11 @@ BEGIN SELECT node FROM dijkstra_r UNION SELECT unnest(contracted_vertices) - FROM dijkstra_r JOIN edge_table ON (edge = id) WHERE is_contracted = true; + FROM dijkstra_r JOIN edges ON (edge = id) WHERE is_contracted = true; CREATE TEMP TABLE dijkstra_contracted AS SELECT * FROM pgr_dijkstra($$SELECT id, source, target, cost, reverse_cost - FROM edge_table + FROM edges WHERE contracted_vertices IS NULL AND source IN (SELECT * FROM nodes_on_graph) @@ -166,7 +166,7 @@ BEGIN CREATE TEMP TABLE dijkstra_normal AS SELECT * FROM pgr_dijkstra($$SELECT id, source, target, cost, reverse_cost - FROM edge_table WHERE id < 19$$, $1::BIGINT, $2::BIGINT, false); + FROM edges WHERE id < 19$$, $1::BIGINT, $2::BIGINT, false); RETURN QUERY SELECT set_eq( $$SELECT * FROM dijkstra_contracted$$, diff --git a/pgtap/contraction/deadend/directed/big_ids.pg b/pgtap/contraction/deadend/directed/big_ids.pg index bd0c930c19e..1709f504443 100644 --- a/pgtap/contraction/deadend/directed/big_ids.pg +++ b/pgtap/contraction/deadend/directed/big_ids.pg @@ -19,94 +19,93 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(6); -UPDATE edge_table +UPDATE edges SET id = id + POWER(10, 8), source = source + POWER(10, 8), target = target + POWER(10, 8); --- input: 1 <-> 2, forbidden = 20 +-- input: 5 <-> 6, forbidden = 20 -- output: 2{1} --Checking dead end contraction with invalid forbidden vertices PREPARE q1 AS SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id = 100000001$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges + WHERE id = 100000005$$, ARRAY[1]::integer[], 1, ARRAY[20]::BIGINT[], true); SELECT set_eq('q1', $$SELECT 'v'::CHAR AS type, - 100000002::BIGINT AS id, - ARRAY[100000001]::BIGINT[] AS contracted_vertices, + 100000011::BIGINT AS id, + ARRAY[100000010]::BIGINT[] AS contracted_vertices, -1::BIGINT AS source, -1::BIGINT AS target, -1::FLOAT AS cost$$); -- Checking dead end contraction with no dead end node --- input: 3->2, 2<->5, 5<->6, 3->6 --q1 +-- input: 10->6 6<->7, 7<->11, 10->11 --q1 -- output: PREPARE q2 AS SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table + $$SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (100000002, 100000004, 100000005, 100000008)$$, ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); SELECT is_empty('q2'); --- input: 1 <-> 2 --- outputt: 2{1} +-- input: 5 <-> 6 +-- outputt: 6{5} --Checking dead end contraction for single dead end node PREPARE q3 AS SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table + $$SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 100000001$$, ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); SELECT set_eq('q3', $$SELECT 'v'::CHAR AS type, - 100000002::BIGINT AS id, - ARRAY[100000001]::BIGINT[] AS contracted_vertices, + 100000006::BIGINT AS id, + ARRAY[100000005]::BIGINT[] AS contracted_vertices, -1::BIGINT AS source, -1::BIGINT AS target, -1::FLOAT AS cost$$); -- Checking dead end contraction for two dead end nodes --- input: 2 <- 3 <- 4 --- output: 4{2, 3} +-- input: 6 <- 10 <- 15 +-- output: 15{6, 10} PREPARE q4 AS SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table + $$SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (100000002, 100000003)$$, ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); SELECT set_eq('q4', $$SELECT 'v'::CHAR AS type, - 100000004::BIGINT AS id, - ARRAY[100000002,100000003]::BIGINT[] AS contracted_vertices, + 100000006::BIGINT AS id, + ARRAY[100000010,100000015]::BIGINT[] AS contracted_vertices, -1::BIGINT AS source, -1::BIGINT AS target, -1::FLOAT AS cost$$); --Checking dead end contraction for multiple dead end nodes --- input: 1 <-> 2 <- 3 <- 4 --- step: 2{1} <- 3 <- 4 --- output: 4{1, 2, 3} +-- input: 5 <-> 6 <- 10 <- 15 +-- output: 6{5, 10, 15} PREPARE q5 AS SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table + $$SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (100000001, 100000002, 100000003)$$, ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); PREPARE sol5 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('v'::CHAR, 100000004::BIGINT, ARRAY[100000001, 100000002, 100000003]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT) + ('v'::CHAR, 100000006::BIGINT, ARRAY[100000005, 100000010, 100000015]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('q5', 'sol5'); @@ -120,17 +119,17 @@ SELECT set_eq('q5', 'sol5'); -- Checking dead end contraction for sample data PREPARE q6 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); PREPARE sol6 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('v'::CHAR, 100000002::BIGINT, ARRAY[100000001]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), - ('v', 100000005, ARRAY[100000007,100000008], -1, -1, -1), - ('v', 100000010, ARRAY[100000013], -1, -1, -1), - ('v', 100000015, ARRAY[100000014], -1, -1, -1), - ('v', 100000017, ARRAY[100000016], -1, -1, -1) + ('v'::CHAR, 100000004::BIGINT, ARRAY[100000002]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), + ('v', 100000007, ARRAY[100000001,100000003], -1, -1, -1), + ('v', 100000006, ARRAY[100000005], -1, -1, -1), + ('v', 100000008, ARRAY[100000009], -1, -1, -1), + ('v', 100000014, ARRAY[100000013], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('q6', 'sol6'); diff --git a/pgtap/contraction/deadend/directed/cases.pg b/pgtap/contraction/deadend/directed/cases.pg index 1dcb9278421..c3a051e064a 100644 --- a/pgtap/contraction/deadend/directed/cases.pg +++ b/pgtap/contraction/deadend/directed/cases.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(6); CREATE TABLE test_deadend ( diff --git a/pgtap/contraction/deadend/directed/compare_dijkstra.pg b/pgtap/contraction/deadend/directed/compare_dijkstra.pg index e4b633c9b18..4ab2ebcd5e1 100644 --- a/pgtap/contraction/deadend/directed/compare_dijkstra.pg +++ b/pgtap/contraction/deadend/directed/compare_dijkstra.pg @@ -21,65 +21,65 @@ BEGIN; SELECT plan(333); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; --step 1: Initial tables -SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table$$); -SELECT isnt_empty($$SELECT id FROM edge_table_vertices_pgr$$); +SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edges$$); +SELECT isnt_empty($$SELECT id FROM vertices$$); -- add extra columns to the edges and vertices table -ALTER TABLE edge_table +ALTER TABLE edges ADD is_contracted BOOLEAN DEFAULT false, ADD contracted_vertices integer[]; -ALTER TABLE edge_table_vertices_pgr +ALTER TABLE vertices ADD is_contracted BOOLEAN DEFAULT false, ADD contracted_vertices integer[]; -SELECT has_column('edge_table', 'is_contracted'); -SELECT has_column('edge_table_vertices_pgr', 'is_contracted'); -SELECT has_column('edge_table', 'contracted_vertices'); -SELECT has_column('edge_table_vertices_pgr', 'contracted_vertices'); +SELECT has_column('edges', 'is_contracted'); +SELECT has_column('vertices', 'is_contracted'); +SELECT has_column('edges', 'contracted_vertices'); +SELECT has_column('vertices', 'contracted_vertices'); SELECT * INTO contraction_info FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); PREPARE c_info AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('v'::CHAR, 2::BIGINT, ARRAY[1]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), - ('v', 5, ARRAY[7,8], -1, -1, -1), - ('v', 10, ARRAY[13], -1, -1, -1), - ('v', 15, ARRAY[14], -1, -1, -1), - ('v', 17, ARRAY[16], -1, -1, -1) + ('v'::CHAR, 6::BIGINT, ARRAY[5]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), + ('v', 7, ARRAY[1,3], -1, -1, -1), + ('v', 8, ARRAY[9], -1, -1, -1), + ('v', 4, ARRAY[2], -1, -1, -1), + ('v', 14, ARRAY[13], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq($$SELECT * FROM contraction_info$$, 'c_info'); -UPDATE edge_table_vertices_pgr +UPDATE vertices SET contracted_vertices = result.contracted_vertices FROM contraction_info AS result -WHERE result.type = 'v' AND result.id = edge_table_vertices_pgr.id; +WHERE result.type = 'v' AND result.id = vertices.id; -UPDATE edge_table_vertices_pgr +UPDATE vertices SET is_contracted = true FROM (SELECT unnest(contracted_vertices) AS id FROM contraction_info WHERE type = 'v') AS result -WHERE result.id = edge_table_vertices_pgr.id; +WHERE result.id = vertices.id; SELECT set_eq($$SELECT id - FROM edge_table_vertices_pgr + FROM vertices WHERE NOT is_contracted$$, - $$SELECT unnest(ARRAY[2,3,4,5,6,9,10,11,12,15,17])$$ + $$SELECT unnest(ARRAY[4,6,7,8,10,11,12,14,15,16,17])$$ ); SELECT set_eq($$SELECT id - FROM edge_table_vertices_pgr + FROM vertices WHERE is_contracted$$, - $$SELECT unnest(ARRAY[1,7,8,13,14,16])$$ + $$SELECT unnest(ARRAY[1,2,3,5,9,13])$$ ); @@ -94,23 +94,23 @@ BEGIN WITH contracted_section AS ( SELECT unnest(contracted_vertices) AS id - FROM edge_table_vertices_pgr + FROM vertices WHERE ARRAY[%1$s, %2$s] && contracted_vertices ), vertices AS ( - SELECT id FROM edge_table_vertices_pgr + SELECT id FROM vertices WHERE NOT is_contracted OR id IN (SELECT id FROM contracted_section) ) - SELECT id, source, target, cost, reverse_cost FROM edge_table + SELECT id, source, target, cost, reverse_cost FROM edges WHERE - EXISTS (SELECT id FROM vertices WHERE vertices.id = edge_table.source) + EXISTS (SELECT id FROM vertices WHERE vertices.id = edges.source) AND - EXISTS (SELECT id FROM vertices WHERE vertices.id = edge_table.target) + EXISTS (SELECT id FROM vertices WHERE vertices.id = edges.target) $query$, $1::BIGINT, $2::BIGINT), $1::BIGINT, $2::BIGINT); CREATE TEMP TABLE dijkstra_normal AS - SELECT * FROM pgr_dijkstra($$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, $1::BIGINT, $2::BIGINT); + SELECT * FROM pgr_dijkstra($$SELECT id, source, target, cost, reverse_cost FROM edges$$, $1::BIGINT, $2::BIGINT); RETURN QUERY SELECT set_eq( diff --git a/pgtap/contraction/deadend/directed/dev_cases.pg b/pgtap/contraction/deadend/directed/dev_cases.pg index a579455e754..502008079b4 100644 --- a/pgtap/contraction/deadend/directed/dev_cases.pg +++ b/pgtap/contraction/deadend/directed/dev_cases.pg @@ -19,26 +19,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); SELECT throws_ok( $$SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1', ARRAY[-1]::integer[], 1, ARRAY[]::BIGINT[], true)$$, 'XX000', 'Invalid contraction type found'); -- GRAPH: 1 <=> 2 PREPARE q1 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); SELECT set_eq('q1', $$SELECT 'v'::CHAR AS type, - 2::BIGINT AS id, - ARRAY[1]::BIGINT[] AS contracted_vertices, + 6::BIGINT AS id, + ARRAY[5]::BIGINT[] AS contracted_vertices, -1::BIGINT AS source, -1::BIGINT AS target, -1::FLOAT AS cost$$); @@ -49,14 +49,14 @@ SELECT set_eq('q1', PREPARE q2 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id < 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id < 3', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); SELECT set_eq('q2', $$SELECT 'v'::CHAR AS type, - 3::BIGINT AS id, - ARRAY[1, 2]::BIGINT[] AS contracted_vertices, + 10::BIGINT AS id, + ARRAY[5, 6]::BIGINT[] AS contracted_vertices, -1::BIGINT AS source, -1::BIGINT AS target, -1::FLOAT AS cost$$); @@ -72,17 +72,17 @@ SELECT set_eq('q2', PREPARE q3 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); PREPARE sol3 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('v'::CHAR, 2::BIGINT, ARRAY[1]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), - ('v', 5, ARRAY[7,8], -1, -1, -1), - ('v', 10, ARRAY[13], -1, -1, -1), - ('v', 15, ARRAY[14], -1, -1, -1), - ('v', 17, ARRAY[16], -1, -1, -1) + ('v'::CHAR, 6::BIGINT, ARRAY[5]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), + ('v', 7, ARRAY[1,3], -1, -1, -1), + ('v', 4, ARRAY[2], -1, -1, -1), + ('v', 8, ARRAY[9], -1, -1, -1), + ('v', 14, ARRAY[13], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('q3', 'sol3'); @@ -97,7 +97,7 @@ SELECT set_eq('q3', 'sol3'); PREPARE q4 AS SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table + $$SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (2, 4, 5, 8)$$, ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); diff --git a/pgtap/contraction/deadend/directed/id_size.pg b/pgtap/contraction/deadend/directed/id_size.pg new file mode 100644 index 00000000000..93f107590c1 --- /dev/null +++ b/pgtap/contraction/deadend/directed/id_size.pg @@ -0,0 +1,30 @@ +/*PGR-GNU***************************************************************** + +Copyright (c) 2023 pgRouting developers +Mail: project@pgrouting.org + +------ +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + ********************************************************************PGR-GNU*/ +BEGIN; + +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); +SELECT plan(18); + +SELECT test_ids_size(2, true); +SELECT test_ids_size(8, true); +SELECT test_ids_size(12, true); + + +SELECT finish(); +ROLLBACK; diff --git a/pgtap/contraction/deadend/directed/inner_query.pg b/pgtap/contraction/deadend/directed/inner_query.pg index 592205a2dfe..65aa9f3df87 100644 --- a/pgtap/contraction/deadend/directed/inner_query.pg +++ b/pgtap/contraction/deadend/directed/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_contraction(', ', ARRAY[1]::BIGINT[], 1, ARRAY[3]::BIGINT[], true)'); diff --git a/pgtap/contraction/deadend/directed/more_cases.pg b/pgtap/contraction/deadend/directed/more_cases.pg index e744025a925..9c055a1158b 100644 --- a/pgtap/contraction/deadend/directed/more_cases.pg +++ b/pgtap/contraction/deadend/directed/more_cases.pg @@ -19,646 +19,646 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(39); SET client_min_messages TO WARNING; -- TESTING ONE CYCLE OF DEAD END CONTRACTION FOR A DIRECTED GRAPH --- GRAPH: 1 <=> 2 -PREPARE graph_e_1 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 ORDER BY id; +-- GRAPH: 5 <=> 6 +PREPARE graph_e_5 AS +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 5 ORDER BY id; --- GRAPH: 4 -> 3 -> 2 -PREPARE graph_e_2_3 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (2, 3) ORDER BY id; +-- GRAPH: 15 -> 10 -> 6 +PREPARE graph_e_6_10 AS +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (2, 3) ORDER BY id; --- GRAPH: 6 -> 11 <- 10 -PREPARE graph_e_11_12 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (11, 12) ORDER BY id; +-- GRAPH: 11 -> 12 <- 8 +PREPARE graph_e_12_17 AS +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (11, 12) ORDER BY id; --- GRAPH: 3 -> 2 10 -> 11 -PREPARE graph_e_2_12 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (2, 12) ORDER BY id; +-- GRAPH: 10 -> 6 8 -> 12 +PREPARE graph_e_6_17 AS +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (2, 12) ORDER BY id; --- GRAPH: 3 -> 6 -> 11 -> 12 -PREPARE graph_e_5_11_13 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (5, 11, 13) ORDER BY id; +-- GRAPH: 10 -> 11 -> 12 -> 17 +PREPARE graph_e_7_12_9 AS +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (5, 11, 13) ORDER BY id; --- GRAPH: 4-> 3 -> 2 10 -> 11 -PREPARE graph_e_2_3_12 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (2, 3, 12) ORDER BY id; +-- GRAPH: 15-> 10 -> 6 8 -> 12 +PREPARE graph_e_6_10_17 AS +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (2, 3, 12) ORDER BY id; --- GRAPH: 1 <=> 2 4 -> 3 7 <=> 8 -PREPARE graph_e_1_3_6 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (1, 3, 6) ORDER BY id; +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 +PREPARE graph_e_5_10_11 AS +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (1, 3, 6) ORDER BY id; --- GRAPH: 4 -> 3 -> 2 3 -> 6 -> 11 -PREPARE graph_e_2_3_5_11 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (2, 3, 5, 11) ORDER BY id; +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +PREPARE graph_e_6_10_7_12 AS +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (2, 3, 5, 11) ORDER BY id; -- SINGLE EDGE --- GRAPH: 1 <=> 2 +-- GRAPH: 5 <=> 6 -- no forbidden vertices -PREPARE v2e1q10 AS +PREPARE v6e5q8 AS SELECT * FROM pgr_contraction( - 'graph_e_1', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); + 'graph_e_5', + ARRAY[1]::integer[], 5, ARRAY[]::integer[], true); -PREPARE v2e1q11 AS +PREPARE v6e5q12 AS SELECT * -FROM (VALUES ('v', 2, ARRAY[1]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM (VALUES ('v', 11, ARRAY[10]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; -SELECT set_eq('v2e1q10', 'v2e1q11', 'graph_e_1 QUERY 1: Directed graph with single edge and no forbidden vertices'); +SELECT set_eq('v6e5q8', 'v6e5q12', 'graph_e_5 QUERY 5: Directed graph with single edge and no forbidden vertices'); --- GRAPH: 1 <=> 2 --- 1 is forbidden vertex +-- GRAPH: 5 <=> 6 +-- 5 is forbidden vertex -PREPARE v2e1q20 AS +PREPARE v6e5q60 AS SELECT * FROM pgr_contraction( - 'graph_e_1', - ARRAY[1]::integer[], 1, ARRAY[1]::INTEGER[], true); + 'graph_e_5', + ARRAY[1]::integer[], 5, ARRAY[5]::INTEGER[], true); -PREPARE v2e1q21 AS +PREPARE v6e5q65 AS SELECT * -FROM ( VALUES ('v', 1, ARRAY[2]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM ( VALUES ('v', 11, ARRAY[10]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; -SELECT set_eq('v2e1q20', 'v2e1q21', 'graph_e_1 QUERY 2: Directed graph with single edge and 1 as forbidden vertex'); +SELECT set_eq('v6e5q60', 'v6e5q65', 'graph_e_5 QUERY 6: Directed graph with single edge and 5 as forbidden vertex'); -- TWO QUERY --- GRAPH: 4 -> 3 -> 2 +-- GRAPH: 15 -> 10 -> 6 -- no forbidden vertices -PREPARE v3e2q10 AS +PREPARE v10e6q8 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); + 'graph_e_6_10', + ARRAY[1]::integer[], 5, ARRAY[]::integer[], true); -PREPARE v3e2q11 AS +PREPARE v10e6q12 AS SELECT * -FROM ( VALUES ('v', 4, ARRAY[2, 3]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM ( VALUES ('v', 15, ARRAY[6, 10]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; -SELECT set_eq('v3e2q10', 'v3e2q11', 'graph_e_2_3 QUERY 1: Directed graph two edges and no forbidden vertices'); +SELECT set_eq('v10e6q8', 'v10e6q12', 'graph_e_6_10 QUERY 5: Directed graph two edges and no forbidden vertices'); --- GRAPH: 4 -> 3 -> 2 --- 3 is forbidden -PREPARE v3e2q20 AS +-- GRAPH: 15 -> 10 -> 6 +-- 10 is forbidden +PREPARE v10e6q60 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3', - ARRAY[1]::INTEGER[], 1, ARRAY[3]::integer[], true); + 'graph_e_6_10', + ARRAY[1]::INTEGER[], 5, ARRAY[10]::integer[], true); -PREPARE v3e2q21 AS +PREPARE v10e6q65 AS SELECT type, id, contracted_vertices, source, target, cost -FROM ( VALUES ('v', 3, ARRAY[2,4]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM ( VALUES ('v', 10, ARRAY[6,15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; -SELECT set_eq('v3e2q20', 'v3e2q21', 'graph_e_2_3 QUERY 2: Directed graph with two edges and vertex 3 as forbidden vertex'); +SELECT set_eq('v10e6q60', 'v10e6q65', 'graph_e_6_10 QUERY 6: Directed graph with two edges and vertex 10 as forbidden vertex'); --- GRAPH: 4 -> 3 -> 2 --- 2 is forbidden -PREPARE v3e2q30 AS +-- GRAPH: 15 -> 10 -> 6 +-- 6 is forbidden +PREPARE v10e6q100 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3', - ARRAY[1]::INTEGER[], 1, ARRAY[2]::integer[], true); + 'graph_e_6_10', + ARRAY[1]::INTEGER[], 5, ARRAY[6]::integer[], true); -PREPARE v3e2q31 AS +PREPARE v10e6q105 AS SELECT * -FROM ( VALUES ('v', 2, ARRAY[3,4]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM ( VALUES ('v', 6, ARRAY[10,15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; -SELECT set_eq('v3e2q30', 'v3e2q31', 'graph_e_2_3 QUERY 3: Directed graph with two edges and vertex 2 as forbidden vertex'); +SELECT set_eq('v10e6q100', 'v10e6q105', 'graph_e_6_10 QUERY 10: Directed graph with two edges and vertex 6 as forbidden vertex'); --- GRAPH: 6 -> 11 <- 10 +-- GRAPH: 11 -> 12 <- 8 -- no forbidden vertices -PREPARE v3e2q40 AS +PREPARE v10e6q150 AS SELECT * FROM pgr_contraction( - 'graph_e_11_12', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); + 'graph_e_12_17', + ARRAY[1]::integer[], 5, ARRAY[]::integer[], true); -PREPARE v3e2q41 AS +PREPARE v10e6q155 AS SELECT * -FROM (VALUES ('v', 10, ARRAY[6,11]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM (VALUES ('v', 8, ARRAY[11,12]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; -SELECT set_eq('v3e2q40', 'v3e2q41', 'graph_e_11_12 QUERY 1: Directed graph with two edges and no forbidden vertices'); +SELECT set_eq('v10e6q150', 'v10e6q155', 'graph_e_12_17 QUERY 5: Directed graph with two edges and no forbidden vertices'); --- GRAPH: 6 -> 11 <- 10 --- 11 is forbidden -PREPARE v3e2q50 AS +-- GRAPH: 11 -> 12 <- 8 +-- 12 is forbidden +PREPARE v10e6q70 AS SELECT * FROM pgr_contraction( - 'graph_e_11_12', - ARRAY[1]::INTEGER[], 1, ARRAY[11]::integer[], true); + 'graph_e_12_17', + ARRAY[1]::INTEGER[], 5, ARRAY[12]::integer[], true); -PREPARE v3e2q51 AS +PREPARE v10e6q75 AS SELECT * -FROM (VALUES ('v', 11, ARRAY[6,10]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM (VALUES ('v', 12, ARRAY[8,11]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; -SELECT set_eq('v3e2q50', 'v3e2q51', 'graph_e_11_12 QUERY 2: Directed graph with two edges and no forbidden vertices'); +SELECT set_eq('v10e6q70', 'v10e6q75', 'graph_e_12_17 QUERY 6: Directed graph with two edges and no forbidden vertices'); --- GRAPH: 3 -> 2 10 <=> 11 +-- GRAPH: 10 -> 6 8 <=> 12 -- no forbidden -PREPARE v3e2q60 AS +PREPARE v10e6q110 AS SELECT * FROM pgr_contraction( - 'graph_e_2_12', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); + 'graph_e_6_17', + ARRAY[1]::integer[], 5, ARRAY[]::integer[], true); -PREPARE v3e2q61 AS +PREPARE v10e6q115 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10]::integer[], -1, -1, -1) + ('v', 10, ARRAY[6]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8]::integer[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v3e2q60', 'v3e2q61', 'graph_e_2_12 QUERY 1: Directed graph with two edges and no forbidden vertices'); +SELECT set_eq('v10e6q110', 'v10e6q115', 'graph_e_6_17 QUERY 5: Directed graph with two edges and no forbidden vertices'); --- GRAPH: 3 -> 2 10 <=> 11 --- 2 is forbidden -PREPARE v3e2q70 AS +-- GRAPH: 10 -> 6 8 <=> 12 +-- 6 is forbidden +PREPARE v10e6q10 AS SELECT * FROM pgr_contraction( - 'graph_e_2_12', - ARRAY[1]::INTEGER[], 1, ARRAY[2]::integer[], true); + 'graph_e_6_17', + ARRAY[1]::INTEGER[], 5, ARRAY[6]::integer[], true); -PREPARE v3e2q71 AS +PREPARE v10e6q15 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[3]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10]::BIGINT[], -1, -1, -1) + ('v', 6, ARRAY[10]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v3e2q70', 'v3e2q71', 'graph_e_2_12 QUERY 2: Directed graph with two edges and 2 is forbidden vertex'); +SELECT set_eq('v10e6q10', 'v10e6q15', 'graph_e_6_17 QUERY 6: Directed graph with two edges and 6 is forbidden vertex'); --- GRAPH: 3 -> 2 10 <=> 11 --- 11 is forbidden -PREPARE v3e2q80 AS +-- GRAPH: 10 -> 6 8 <=> 12 +-- 12 is forbidden +PREPARE v10e6q30 AS SELECT * FROM pgr_contraction( - 'graph_e_2_12', - ARRAY[1]::INTEGER[], 1, ARRAY[11]::integer[], true); + 'graph_e_6_17', + ARRAY[1]::INTEGER[], 5, ARRAY[12]::integer[], true); -PREPARE v3e2q81 AS +PREPARE v10e6q35 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[6]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v3e2q80', 'v3e2q81', 'graph_e_2_12 QUERY 3: Directed graph with two edges and 11 is forbidden vertex'); +SELECT set_eq('v10e6q30', 'v10e6q35', 'graph_e_6_17 QUERY 10: Directed graph with two edges and 12 is forbidden vertex'); -- THREE QUERY --- GRAPH: 3 -> 6 -> 11 -> 12 +-- GRAPH: 10 -> 11 -> 12 -> 17 -- no forbidden vertices -PREPARE v4e3q10 AS +PREPARE v15e10q8 AS SELECT * FROM pgr_contraction( - 'graph_e_5_11_13', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); + 'graph_e_7_12_9', + ARRAY[1]::integer[], 5, ARRAY[]::integer[], true); -PREPARE v4e3q11 AS +PREPARE v15e10q12 AS SELECT * FROM (VALUES - ('v', 12, ARRAY[3, 6, 11]::BIGINT[], -1, -1, -1) + ('v', 17, ARRAY[10, 11, 12]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e3q10', 'v4e3q11', 'graph_e_5_11_13 QUERY 1: Directed graph with three edges and no forbidden vertices'); +SELECT set_eq('v15e10q8', 'v15e10q12', 'graph_e_7_12_9 QUERY 5: Directed graph with three edges and no forbidden vertices'); --- GRAPH: 3 -> 6 -> 11 -> 12 --- 3 is forbidden -PREPARE v4e3q20 AS +-- GRAPH: 10 -> 11 -> 12 -> 17 +-- 10 is forbidden +PREPARE v15e10q60 AS SELECT * FROM pgr_contraction( - 'graph_e_5_11_13', - ARRAY[1]::INTEGER[], 1, ARRAY[3]::integer[], true); + 'graph_e_7_12_9', + ARRAY[1]::INTEGER[], 5, ARRAY[10]::integer[], true); -PREPARE v4e3q21 AS +PREPARE v15e10q65 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[6, 11, 12]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[11, 12, 17]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e3q20', 'v4e3q21', 'graph_e_5_11_13 QUERY 2: Directed graph with three edges and 3 is forbidden vertex'); +SELECT set_eq('v15e10q60', 'v15e10q65', 'graph_e_7_12_9 QUERY 6: Directed graph with three edges and 10 is forbidden vertex'); --- GRAPH: 3 -> 6 -> 11 -> 12 --- 6 is forbidden -PREPARE v4e3q30 AS +-- GRAPH: 10 -> 11 -> 12 -> 17 +-- 11 is forbidden +PREPARE v15e10q100 AS SELECT * FROM pgr_contraction( - 'graph_e_5_11_13', - ARRAY[1]::INTEGER[], 1, ARRAY[6]::integer[], true); + 'graph_e_7_12_9', + ARRAY[1]::INTEGER[], 5, ARRAY[11]::integer[], true); -PREPARE v4e3q31 AS +PREPARE v15e10q105 AS SELECT * FROM (VALUES - ('v', 6, ARRAY[3, 11, 12]::BIGINT[], -1, -1, -1) + ('v', 11, ARRAY[10, 12, 17]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e3q30', 'v4e3q31', 'graph_e_5_11_13 QUERY 3: Directed graph with three edges and 6 is forbidden vertex'); +SELECT set_eq('v15e10q100', 'v15e10q105', 'graph_e_7_12_9 QUERY 10: Directed graph with three edges and 11 is forbidden vertex'); --- GRAPH: 3 -> 6 -> 11 -> 12 --- 11 is forbidden -PREPARE v4e3q40 AS +-- GRAPH: 10 -> 11 -> 12 -> 17 +-- 12 is forbidden +PREPARE v15e10q150 AS SELECT * FROM pgr_contraction( - 'graph_e_5_11_13', - ARRAY[1]::INTEGER[], 1, ARRAY[11]::integer[], true); + 'graph_e_7_12_9', + ARRAY[1]::INTEGER[], 5, ARRAY[12]::integer[], true); -PREPARE v4e3q41 AS +PREPARE v15e10q155 AS SELECT * FROM (VALUES - ('v', 11, ARRAY[3,6,12]::BIGINT[], -1, -1, -1) + ('v', 12, ARRAY[10,11,17]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e3q40', 'v4e3q41', 'graph_e_5_11_13 QUERY 4: Directed graph with three edges and 11 is forbidden vertex'); +SELECT set_eq('v15e10q150', 'v15e10q155', 'graph_e_7_12_9 QUERY 15: Directed graph with three edges and 12 is forbidden vertex'); --- GRAPH: 3 -> 6 -> 11 -> 12 --- forbidden: 3, 6, 12 -PREPARE v4e3q50 AS +-- GRAPH: 10 -> 11 -> 12 -> 17 +-- forbidden: 10, 11, 17 +PREPARE v15e10q70 AS SELECT * FROM pgr_contraction( - 'graph_e_5_11_13', - ARRAY[1]::INTEGER[], 1, ARRAY[3,6,12]::integer[], true); + 'graph_e_7_12_9', + ARRAY[1]::INTEGER[], 5, ARRAY[10,11,17]::integer[], true); -SELECT is_empty('v4e3q50', 'graph_e_5_11_13 QUERY 5: Directed graph with three edges and 12 is forbidden vertex'); +SELECT is_empty('v15e10q70', 'graph_e_7_12_9 QUERY 7: Directed graph with three edges and 17 is forbidden vertex'); --- GRAPH: 4-> 3 -> 2 10 -> 11 +-- GRAPH: 15-> 10 -> 6 8 -> 12 -- no forbidden vertices -PREPARE v5e3q10 AS +PREPARE v7e10q8 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_12', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); + 'graph_e_6_10_17', + ARRAY[1]::integer[], 5, ARRAY[]::integer[], true); -PREPARE v5e3q11 AS +PREPARE v7e10q12 AS SELECT * FROM (VALUES - ('v', 4, ARRAY[2, 3]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10], -1, -1, -1) + ('v', 15, ARRAY[6, 10]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v5e3q10', 'v5e3q11', 'graph_e_2_3_12 QUERY 1: Directed graph with three edges and no forbidden vertices'); +SELECT set_eq('v7e10q8', 'v7e10q12', 'graph_e_6_10_17 QUERY 5: Directed graph with three edges and no forbidden vertices'); --- GRAPH: 4-> 3 -> 2 10 -> 11 --- 11 is forbidden -PREPARE v5e3q20 AS +-- GRAPH: 15-> 10 -> 6 8 -> 12 +-- 12 is forbidden +PREPARE v7e10q60 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_12', - ARRAY[1]::INTEGER[], 1, ARRAY[11]::integer[], true); + 'graph_e_6_10_17', + ARRAY[1]::INTEGER[], 5, ARRAY[12]::integer[], true); -PREPARE v5e3q21 AS +PREPARE v7e10q65 AS SELECT * FROM (VALUES - ('v', 4, ARRAY[2, 3]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10], -1, -1, -1) + ('v', 15, ARRAY[6, 10]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v5e3q20', 'v5e3q21', 'graph_e_2_3_12 QUERY 2: Directed graph with three edges and 11 is forbidden vertex'); +SELECT set_eq('v7e10q60', 'v7e10q65', 'graph_e_6_10_17 QUERY 6: Directed graph with three edges and 12 is forbidden vertex'); --- GRAPH: 4-> 3 -> 2 10 -> 11 --- 2 is forbidden -PREPARE v5e3q30 AS +-- GRAPH: 15-> 10 -> 6 8 -> 12 +-- 6 is forbidden +PREPARE v7e10q100 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_12', - ARRAY[1]::INTEGER[], 1, ARRAY[2]::integer[], true); + 'graph_e_6_10_17', + ARRAY[1]::INTEGER[], 5, ARRAY[6]::integer[], true); -PREPARE v5e3q31 AS +PREPARE v7e10q105 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[3,4]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10], -1, -1, -1) + ('v', 6, ARRAY[10,15]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v5e3q30', 'v5e3q31', 'graph_e_2_3_12 QUERY 3: Directed graph with three edges and 2 is forbidden vertex'); +SELECT set_eq('v7e10q100', 'v7e10q105', 'graph_e_6_10_17 QUERY 10: Directed graph with three edges and 6 is forbidden vertex'); --- GRAPH: 4-> 3 -> 2 10 -> 11 --- 3 is forbidden -PREPARE v5e3q40 AS +-- GRAPH: 15-> 10 -> 6 8 -> 12 +-- 10 is forbidden +PREPARE v7e10q150 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_12', - ARRAY[1]::INTEGER[], 1, ARRAY[3]::integer[], true); + 'graph_e_6_10_17', + ARRAY[1]::INTEGER[], 5, ARRAY[10]::integer[], true); -PREPARE v5e3q41 AS +PREPARE v7e10q155 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2,4]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10], -1, -1, -1) + ('v', 10, ARRAY[6,15]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost); -SELECT set_eq('v5e3q40', 'v5e3q41', 'graph_e_2_3_12 QUERY 4: Directed graph with three edges and 3 is forbidden vertex'); +SELECT set_eq('v7e10q150', 'v7e10q155', 'graph_e_6_10_17 QUERY 15: Directed graph with three edges and 10 is forbidden vertex'); --- GRAPH: 4-> 3 -> 2 10 -> 11 --- 2 and 11 are forbidden -PREPARE v5e3q50 AS +-- GRAPH: 15-> 10 -> 6 8 -> 12 +-- 6 and 12 are forbidden +PREPARE v7e10q70 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_12', - ARRAY[1]::INTEGER[], 1, ARRAY[2, 11]::integer[], true); + 'graph_e_6_10_17', + ARRAY[1]::INTEGER[], 5, ARRAY[6, 12]::integer[], true); -PREPARE v5e3q51 AS +PREPARE v7e10q75 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[3,4]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10], -1, -1, -1) + ('v', 6, ARRAY[10,15]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost); -SELECT set_eq('v5e3q50', 'v5e3q51', 'graph_e_2_3_12 QUERY 5: Directed graph with three edges and 2 and 11 are forbidden vertices'); +SELECT set_eq('v7e10q70', 'v7e10q75', 'graph_e_6_10_17 QUERY 7: Directed graph with three edges and 6 and 12 are forbidden vertices'); --- GRAPH: 4-> 3 -> 2 10 -> 11 --- 3 and 11 are forbidden -PREPARE v5e3q60 AS +-- GRAPH: 15-> 10 -> 6 8 -> 12 +-- 10 and 12 are forbidden +PREPARE v7e10q110 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_12', - ARRAY[1]::INTEGER[], 1, ARRAY[3, 11]::integer[], true); + 'graph_e_6_10_17', + ARRAY[1]::INTEGER[], 5, ARRAY[10, 12]::integer[], true); -PREPARE v5e3q61 AS +PREPARE v7e10q115 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2,4]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10], -1, -1, -1) + ('v', 10, ARRAY[6,15]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v5e3q60', 'v5e3q61', 'graph_e_2_3_12 QUERY 6: Directed graph with three edges and 3 and 11 are forbidden vertices'); +SELECT set_eq('v7e10q110', 'v7e10q115', 'graph_e_6_10_17 QUERY 11: Directed graph with three edges and 10 and 12 are forbidden vertices'); --- GRAPH: 1 <=> 2 4 -> 3 7 <=> 8 +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 -- no forbidden vertices -PREPARE v6e3q10 AS +PREPARE v11e10q8 AS SELECT * FROM pgr_contraction( - 'graph_e_1_3_6', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); + 'graph_e_5_10_11', + ARRAY[1]::integer[], 5, ARRAY[]::integer[], true); -PREPARE v6e3q11 AS +PREPARE v11e10q12 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[1]::BIGINT[], -1, -1, -1), - ('v', 4, ARRAY[3]::integer[], -1, -1, -1), - ('v', 8, ARRAY[7]::integer[], -1, -1, -1) + ('v', 6, ARRAY[5]::BIGINT[], -1, -1, -1), + ('v', 15, ARRAY[10]::integer[], -1, -1, -1), + ('v', 3, ARRAY[1]::integer[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v6e3q10', 'v6e3q11', 'graph_e_1_3_6 QUERY 1: Directed graph with three edges and no forbidden vertices'); +SELECT set_eq('v11e10q8', 'v11e10q12', 'graph_e_5_10_11 QUERY 5: Directed graph with three edges and no forbidden vertices'); --- GRAPH: 1 <=> 2 4 -> 3 7 <=> 8 --- 1 is forbidden -PREPARE v6e3q20 AS +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 +-- 5 is forbidden +PREPARE v11e10q60 AS SELECT * FROM pgr_contraction( - 'graph_e_1_3_6', - ARRAY[1]::INTEGER[], 1, ARRAY[1]::integer[], true); + 'graph_e_5_10_11', + ARRAY[1]::INTEGER[], 5, ARRAY[5]::integer[], true); -PREPARE v6e3q21 AS +PREPARE v11e10q65 AS SELECT * FROM (VALUES - ('v', 1, ARRAY[2]::BIGINT[], -1, -1, -1), - ('v', 4, ARRAY[3]::integer[], -1, -1, -1), - ('v', 8, ARRAY[7]::integer[], -1, -1, -1) + ('v', 5, ARRAY[6]::BIGINT[], -1, -1, -1), + ('v', 15, ARRAY[10]::integer[], -1, -1, -1), + ('v', 3, ARRAY[1]::integer[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v6e3q20', 'v6e3q21', 'graph_e_1_3_6 QUERY 2: Directed graph with three edges and 1 is forbidden vertex'); +SELECT set_eq('v11e10q60', 'v11e10q65', 'graph_e_5_10_11 QUERY 6: Directed graph with three edges and 5 is forbidden vertex'); --- GRAPH: 1 <=> 2 4 -> 3 7 <=> 8 --- 3 is forbidden -PREPARE v6e3q30 AS +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 +-- 10 is forbidden +PREPARE v11e10q100 AS SELECT * FROM pgr_contraction( - 'graph_e_1_3_6', - ARRAY[1]::INTEGER[], 1, ARRAY[3]::integer[], true); + 'graph_e_5_10_11', + ARRAY[1]::INTEGER[], 5, ARRAY[10]::integer[], true); -PREPARE v6e3q31 AS +PREPARE v11e10q105 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[1]::BIGINT[], -1, -1, -1), - ('v', 3, ARRAY[4]::BIGINT[], -1, -1, -1), - ('v', 8, ARRAY[7]::BIGINT[], -1, -1, -1) + ('v', 6, ARRAY[5]::BIGINT[], -1, -1, -1), + ('v', 10, ARRAY[15]::BIGINT[], -1, -1, -1), + ('v', 3, ARRAY[1]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v6e3q30', 'v6e3q31', 'graph_e_1_3_6 QUERY 3: Directed graph with three edges and 3 is forbidden vertex'); +SELECT set_eq('v11e10q100', 'v11e10q105', 'graph_e_5_10_11 QUERY 10: Directed graph with three edges and 10 is forbidden vertex'); --- GRAPH: 1 <=> 2 4 -> 3 7 <=> 8 --- 7 is forbidden -PREPARE v6e3q40 AS +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 +-- 1 is forbidden +PREPARE v11e10q150 AS SELECT * FROM pgr_contraction( - 'graph_e_1_3_6', - ARRAY[1]::INTEGER[], 1, ARRAY[7]::integer[], true); + 'graph_e_5_10_11', + ARRAY[1]::INTEGER[], 5, ARRAY[1]::integer[], true); -PREPARE v6e3q41 AS +PREPARE v11e10q155 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[1]::BIGINT[], -1, -1, -1), - ('v', 4, ARRAY[3]::integer[], -1, -1, -1), - ('v', 7, ARRAY[8]::integer[], -1, -1, -1) + ('v', 6, ARRAY[5]::BIGINT[], -1, -1, -1), + ('v', 15, ARRAY[10]::integer[], -1, -1, -1), + ('v', 1, ARRAY[3]::integer[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v6e3q40', 'v6e3q41', 'graph_e_1_3_6 QUERY 4: Directed graph with three edges and 7 is forbidden vertex'); +SELECT set_eq('v11e10q150', 'v11e10q155', 'graph_e_5_10_11 QUERY 15: Directed graph with three edges and 1 is forbidden vertex'); --- GRAPH: 1 <=> 2 4 -> 3 7 <=> 8 --- 1 and 3 are forbidden -PREPARE v6e3q50 AS +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 +-- 5 and 10 are forbidden +PREPARE v11e10q70 AS SELECT * FROM pgr_contraction( - 'graph_e_1_3_6', - ARRAY[1]::INTEGER[], 1, ARRAY[1, 3]::integer[], true); + 'graph_e_5_10_11', + ARRAY[1]::INTEGER[], 5, ARRAY[5, 10]::integer[], true); -PREPARE v6e3q51 AS +PREPARE v11e10q75 AS SELECT * FROM (VALUES - ('v', 1, ARRAY[2]::BIGINT[], -1, -1, -1), - ('v', 3, ARRAY[4]::BIGINT[], -1, -1, -1), - ('v', 8, ARRAY[7]::BIGINT[], -1, -1, -1) + ('v', 5, ARRAY[6]::BIGINT[], -1, -1, -1), + ('v', 10, ARRAY[15]::BIGINT[], -1, -1, -1), + ('v', 3, ARRAY[1]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v6e3q50', 'v6e3q51', 'graph_e_1_3_6 QUERY 5: Directed graph with three edges and 1 and 3 are forbidden vertices'); +SELECT set_eq('v11e10q70', 'v11e10q75', 'graph_e_5_10_11 QUERY 7: Directed graph with three edges and 5 and 10 are forbidden vertices'); --- GRAPH: 1 <=> 2 4 -> 3 7 <=> 8 --- 3 and 7 are forbidden -PREPARE v6e3q60 AS +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 +-- 10 and 1 are forbidden +PREPARE v11e10q110 AS SELECT * FROM pgr_contraction( - 'graph_e_1_3_6', - ARRAY[1]::INTEGER[], 1, ARRAY[3, 7]::integer[], true); + 'graph_e_5_10_11', + ARRAY[1]::INTEGER[], 5, ARRAY[10, 1]::integer[], true); -PREPARE v6e3q61 AS +PREPARE v11e10q115 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[1]::BIGINT[], -1, -1, -1), - ('v', 3, ARRAY[4]::BIGINT[], -1, -1, -1), - ('v', 7, ARRAY[8]::BIGINT[], -1, -1, -1) + ('v', 6, ARRAY[5]::BIGINT[], -1, -1, -1), + ('v', 10, ARRAY[15]::BIGINT[], -1, -1, -1), + ('v', 1, ARRAY[3]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v6e3q60', 'v6e3q61', 'graph_e_1_3_6 QUERY 6: Directed graph with three edges and 3 and 7 are forbidden vertices'); +SELECT set_eq('v11e10q110', 'v11e10q115', 'graph_e_5_10_11 QUERY 11: Directed graph with three edges and 10 and 1 are forbidden vertices'); --- GRAPH: 1 <=> 2 4 -> 3 7 <=> 8 --- 1 and 7 are forbidden -PREPARE v6e3q70 AS +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 +-- 5 and 1 are forbidden +PREPARE v11e10q10 AS SELECT * FROM pgr_contraction( - 'graph_e_1_3_6', - ARRAY[1]::INTEGER[], 1, ARRAY[1, 7]::integer[], true); + 'graph_e_5_10_11', + ARRAY[1]::INTEGER[], 5, ARRAY[5, 1]::integer[], true); -PREPARE v6e3q71 AS +PREPARE v11e10q15 AS SELECT * FROM (VALUES - ('v', 1, ARRAY[2]::BIGINT[], -1, -1, -1), - ('v', 4, ARRAY[3]::BIGINT[], -1, -1, -1), - ('v', 7, ARRAY[8]::BIGINT[], -1, -1, -1) + ('v', 5, ARRAY[6]::BIGINT[], -1, -1, -1), + ('v', 15, ARRAY[10]::BIGINT[], -1, -1, -1), + ('v', 1, ARRAY[3]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v6e3q70', 'v6e3q71', 'graph_e_1_3_6 QUERY 7: Directed graph with three edges and 1 and 7 are forbidden vertices'); +SELECT set_eq('v11e10q10', 'v11e10q15', 'graph_e_5_10_11 QUERY 1: Directed graph with three edges and 5 and 1 are forbidden vertices'); -- FOUR EDGES --- GRAPH: 4 -> 3 -> 2 3 -> 6 -> 11 +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 -- no forbidden vertices -PREPARE v4e4q10 AS +PREPARE v15e15q8 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_5_11', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); + 'graph_e_6_10_7_12', + ARRAY[1]::integer[], 5, ARRAY[]::integer[], true); -PREPARE v4e4q11 AS +PREPARE v15e15q12 AS SELECT * FROM (VALUES - ('v', 11, ARRAY[2, 3, 4, 6]::BIGINT[], -1, -1, -1) + ('v', 12, ARRAY[6, 10, 11, 15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e4q10', 'v4e4q11', 'graph_e_2_3_5_11 QUERY 1: Directed graph with four edges and no forbidden vertices'); +SELECT set_eq('v15e15q8', 'v15e15q12', 'graph_e_6_10_7_12 QUERY 5: Directed graph with four edges and no forbidden vertices'); --- GRAPH: 4 -> 3 -> 2 3 -> 6 -> 11 --- 2 is forbidden -PREPARE v4e4q20 AS +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 6 is forbidden +PREPARE v15e15q60 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[2]::integer[], true); + 'graph_e_6_10_7_12', + ARRAY[1]::INTEGER[], 5, ARRAY[6]::integer[], true); -PREPARE v4e4q21 AS +PREPARE v15e15q65 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[3, 4, 6, 11]::BIGINT[], -1, -1, -1) + ('v', 6, ARRAY[10, 11, 12, 15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e4q20', 'v4e4q21', 'graph_e_2_3_5_11 QUERY 2: Directed graph with four edges and 2 is forbidden vertex'); +SELECT set_eq('v15e15q60', 'v15e15q65', 'graph_e_6_10_7_12 QUERY 6: Directed graph with four edges and 6 is forbidden vertex'); --- GRAPH: 4 -> 3 -> 2 3 -> 6 -> 11 --- 3 is forbidden -PREPARE v4e4q30 AS +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 10 is forbidden +PREPARE v15e15q100 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[3]::integer[], true); + 'graph_e_6_10_7_12', + ARRAY[1]::INTEGER[], 5, ARRAY[10]::integer[], true); -PREPARE v4e4q31 AS +PREPARE v15e15q105 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2, 4, 6, 11]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[6, 11, 12, 15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e4q30', 'v4e4q31', 'FOUR QUERY 3: Directed graph with four edges and 3 is forbidden vertex'); +SELECT set_eq('v15e15q100', 'v15e15q105', 'FOUR QUERY 10: Directed graph with four edges and 10 is forbidden vertex'); --- GRAPH: 4 -> 3 -> 2 3 -> 6 -> 11 --- 6 is forbidden -PREPARE v4e4q40 AS +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 11 is forbidden +PREPARE v15e15q150 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[6]::integer[], true); + 'graph_e_6_10_7_12', + ARRAY[1]::INTEGER[], 5, ARRAY[11]::integer[], true); -PREPARE v4e4q41 AS +PREPARE v15e15q155 AS SELECT * FROM (VALUES - ('v', 6, ARRAY[2,3,4,11]::BIGINT[], -1, -1, -1) + ('v', 11, ARRAY[6,10,12,15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e4q40', 'v4e4q41', 'graph_e_2_3_5_11 QUERY 4: Directed graph with four edges and 6 is forbidden vertex'); +SELECT set_eq('v15e15q150', 'v15e15q155', 'graph_e_6_10_7_12 QUERY 15: Directed graph with four edges and 11 is forbidden vertex'); --- GRAPH: 4 -> 3 -> 2 3 -> 6 -> 11 --- 11 is forbidden -PREPARE v4e4q50 AS +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 12 is forbidden +PREPARE v15e15q70 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[11]::integer[], true); + 'graph_e_6_10_7_12', + ARRAY[1]::INTEGER[], 5, ARRAY[12]::integer[], true); -PREPARE v4e4q51 AS +PREPARE v15e15q75 AS SELECT * FROM (VALUES - ('v', 11, ARRAY[2,3,4,6]::BIGINT[], -1, -1, -1) + ('v', 12, ARRAY[6,10,11,15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e4q50', 'v4e4q51', 'graph_e_2_3_5_11 QUERY 5: Directed graph with four edges and 11 is forbidden vertex'); +SELECT set_eq('v15e15q70', 'v15e15q75', 'graph_e_6_10_7_12 QUERY 7: Directed graph with four edges and 12 is forbidden vertex'); --- GRAPH: 4 -> 3 -> 2 3 -> 6 -> 11 --- 2,3 are forbidden -PREPARE v4e4q60 AS +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 6,10 are forbidden +PREPARE v15e15q110 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[2, 3]::integer[], true); + 'graph_e_6_10_7_12', + ARRAY[1]::INTEGER[], 5, ARRAY[6, 10]::integer[], true); -PREPARE v4e4q61 AS +PREPARE v15e15q115 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[4, 6, 11]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[11, 12, 15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e4q60', 'v4e4q61', 'graph_e_2_3_5_11 QUERY 6: Directed graph with four edges and 2 and 3 is forbidden vertex'); +SELECT set_eq('v15e15q110', 'v15e15q115', 'graph_e_6_10_7_12 QUERY 11: Directed graph with four edges and 6 and 10 is forbidden vertex'); --- GRAPH: 4 -> 3 -> 2 3 -> 6 -> 11 --- 2,6 are forbidden -PREPARE v4e4q70 AS +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 6,11 are forbidden +PREPARE v15e15q10 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[2, 6]::integer[], true); + 'graph_e_6_10_7_12', + ARRAY[1]::INTEGER[], 5, ARRAY[6, 11]::integer[], true); -PREPARE v4e4q71 AS +PREPARE v15e15q15 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[4]::BIGINT[], -1, -1, -1), - ('v', 6, ARRAY[11]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[15]::BIGINT[], -1, -1, -1), + ('v', 11, ARRAY[12]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e4q70', 'v4e4q71', 'graph_e_2_3_5_11 QUERY 7: Directed graph with four edges and 2 and 6 forbidden vertex'); +SELECT set_eq('v15e15q10', 'v15e15q15', 'graph_e_6_10_7_12 QUERY 1: Directed graph with four edges and 6 and 11 forbidden vertex'); --- GRAPH: 4 -> 3 -> 2 3 -> 6 -> 11 --- 2,11 are forbidden -PREPARE v4e4q80 AS +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 6,12 are forbidden +PREPARE v15e15q30 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[2, 11]::integer[], true); + 'graph_e_6_10_7_12', + ARRAY[1]::INTEGER[], 5, ARRAY[6, 12]::integer[], true); -PREPARE v4e4q81 AS +PREPARE v15e15q35 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[4]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e4q80', 'v4e4q81', 'graph_e_2_3_5_11 QUERY 8: Directed graph with four edges and 2 and 11 forbidden vertex'); +SELECT set_eq('v15e15q30', 'v15e15q35', 'graph_e_6_10_7_12 QUERY 3: Directed graph with four edges and 6 and 12 forbidden vertex'); --- GRAPH: 4 -> 3 -> 2 3 -> 6 -> 11 --- 3,6 are forbidden -PREPARE v4e4q90 AS +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 10,11 are forbidden +PREPARE v15e15q160 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[3, 6]::integer[], true); + 'graph_e_6_10_7_12', + ARRAY[1]::INTEGER[], 5, ARRAY[10, 11]::integer[], true); -PREPARE v4e4q91 AS +PREPARE v15e15q165 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2,4]::BIGINT[], -1, -1, -1), - ('v', 6, ARRAY[11]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[6,15]::BIGINT[], -1, -1, -1), + ('v', 11, ARRAY[12]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e4q90', 'v4e4q91', 'graph_e_2_3_5_11 QUERY 9: Directed graph with four edges and 3 and 6 forbidden vertex'); +SELECT set_eq('v15e15q160', 'v15e15q165', 'graph_e_6_10_7_12 QUERY 16: Directed graph with four edges and 10 and 11 forbidden vertex'); --- GRAPH: 4 -> 3 -> 2 3 -> 6 -> 11 --- 3,11 are forbidden -PREPARE v4e4q100 AS +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 10,12 are forbidden +PREPARE v15e15q80 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[3, 11]::integer[], true); + 'graph_e_6_10_7_12', + ARRAY[1]::INTEGER[], 5, ARRAY[10, 12]::integer[], true); -PREPARE v4e4q101 AS +PREPARE v15e15q85 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2,4]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[6,15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e4q100', 'v4e4q101', 'graph_e_2_3_5_11 QUERY 10: Directed graph with four edges and 3 and 11 forbidden vertex'); +SELECT set_eq('v15e15q80', 'v15e15q85', 'graph_e_6_10_7_12 QUERY 8: Directed graph with four edges and 10 and 12 forbidden vertex'); --- GRAPH: 4 -> 3 -> 2 3 -> 6 -> 11 --- 6,11 are forbidden -PREPARE v4e4q110 AS +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 11,12 are forbidden +PREPARE v15e15q58 AS SELECT * FROM pgr_contraction( - 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[6, 11]::integer[], true); + 'graph_e_6_10_7_12', + ARRAY[1]::INTEGER[], 5, ARRAY[11, 12]::integer[], true); -PREPARE v4e4q111 AS +PREPARE v15e15q125 AS SELECT * FROM (VALUES - ('v', 6, ARRAY[2,3,4]::BIGINT[], -1, -1, -1) + ('v', 11, ARRAY[6,10,15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); -SELECT set_eq('v4e4q110', 'v4e4q111', 'graph_e_2_3_5_11 QUERY 11: Directed graph with four edges and 6 and 11 forbidden vertex'); +SELECT set_eq('v15e15q58', 'v15e15q125', 'graph_e_6_10_7_12 QUERY 12: Directed graph with four edges and 11 and 12 forbidden vertex'); SELECT finish(); ROLLBACK; diff --git a/pgtap/contraction/deadend/directed/small_ids.pg b/pgtap/contraction/deadend/directed/small_ids.pg deleted file mode 100644 index 1d1b2284f21..00000000000 --- a/pgtap/contraction/deadend/directed/small_ids.pg +++ /dev/null @@ -1,128 +0,0 @@ - -/*PGR-GNU***************************************************************** - -Copyright (c) 2018 pgRouting developers -Mail: project@pgrouting.org - ------- -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - ********************************************************************PGR-GNU*/ -BEGIN; - -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(6); - --- input: 1 <-> 2, forbidden = 20 --- output: 2{1} ---Checking dead end contraction with invalid forbidden vertices -PREPARE q1 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', - ARRAY[1]::integer[], 1, ARRAY[20]::BIGINT[], true); - -SELECT set_eq('q1', - $$SELECT - 'v'::CHAR AS type, - 2::BIGINT AS id, - ARRAY[1]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - --- Checking dead end contraction with no dead end node --- input: 3->2, 2<->5, 5<->6, 3->6 --q1 --- output: -PREPARE q2 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 OR id = 4 OR id = 5 OR id = 8', - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); - -SELECT is_empty('q2'); - --- input: 1 <-> 2 --- outputt: 2{1} ---Checking dead end contraction for single dead end node -PREPARE q3 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); - -SELECT set_eq('q3', - $$SELECT - 'v'::CHAR AS type, - 2::BIGINT AS id, - ARRAY[1]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - --- Checking dead end contraction for two dead end nodes --- input: 2 <- 3 <- 4 --- output: 4{2, 3} -PREPARE q4 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 or id = 3', - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); - -SELECT set_eq('q4', - $$SELECT - 'v'::CHAR AS type, - 4::BIGINT AS id, - ARRAY[2,3]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - ---Checking dead end contraction for multiple dead end nodes --- input: 1 <-> 2 <- 3 <- 4 --- step: 2{1} <- 3 <- 4 --- output: 4{1, 2, 3} -PREPARE q5 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 OR id = 2 or id = 3', - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); - -PREPARE sol5 AS -SELECT type, id, contracted_vertices, source, target, cost -FROM (VALUES - ('v'::CHAR, 4::BIGINT, ARRAY[1, 2, 3]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT) -) AS t(type, id, contracted_vertices, source, target, cost ); - -SELECT set_eq('q5', 'sol5'); - --- all table --- 15{14} --- 16{17} --- 10{13} --- 5{7,8} --- 2{1} --- Checking dead end contraction for sample data -PREPARE q6 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); - -PREPARE sol6 AS -SELECT type, id, contracted_vertices, source, target, cost -FROM (VALUES - ('v'::CHAR, 2::BIGINT, ARRAY[1]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), - ('v', 5, ARRAY[7,8], -1, -1, -1), - ('v', 10, ARRAY[13], -1, -1, -1), - ('v', 15, ARRAY[14], -1, -1, -1), - ('v', 17, ARRAY[16], -1, -1, -1) -) AS t(type, id, contracted_vertices, source, target, cost ); - -SELECT set_eq('q6', 'sol6'); - -SELECT finish(); -ROLLBACK; diff --git a/pgtap/contraction/deadend/directed/super_big_ids.pg b/pgtap/contraction/deadend/directed/super_big_ids.pg deleted file mode 100644 index 0e4b3d150e9..00000000000 --- a/pgtap/contraction/deadend/directed/super_big_ids.pg +++ /dev/null @@ -1,139 +0,0 @@ - -/*PGR-GNU***************************************************************** - -Copyright (c) 2018 pgRouting developers -Mail: project@pgrouting.org - ------- -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - ********************************************************************PGR-GNU*/ -BEGIN; - -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(6); - -UPDATE edge_table -SET id = id + POWER(10, 12), - source = source + POWER(10, 12), - target = target + POWER(10, 12); - - --- input: 1 <-> 2, forbidden = 20 --- output: 2{1} ---Checking dead end contraction with invalid forbidden vertices -PREPARE q1 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id = 1000000000001$$, - ARRAY[1]::integer[], 1, ARRAY[20]::BIGINT[], true); - -SELECT set_eq('q1', - $$SELECT - 'v'::CHAR AS type, - 1000000000002::BIGINT AS id, - ARRAY[1000000000001]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - --- Checking dead end contraction with no dead end node --- input: 3->2, 2<->5, 5<->6, 3->6 --q1 --- output: -PREPARE q2 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id IN (1000000000002, 1000000000004, 1000000000005, 1000000000008)$$, - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); - -SELECT is_empty('q2'); - --- input: 1 <-> 2 --- outputt: 2{1} ---Checking dead end contraction for single dead end node -PREPARE q3 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id = 1000000000001$$, - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); - -SELECT set_eq('q3', - $$SELECT - 'v'::CHAR AS type, - 1000000000002::BIGINT AS id, - ARRAY[1000000000001]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - --- Checking dead end contraction for two dead end nodes --- input: 2 <- 3 <- 4 --- output: 4{2, 3} -PREPARE q4 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id IN (1000000000002, 1000000000003)$$, - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); - -SELECT set_eq('q4', - $$SELECT - 'v'::CHAR AS type, - 1000000000004::BIGINT AS id, - ARRAY[1000000000002,1000000000003]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - ---Checking dead end contraction for multiple dead end nodes --- input: 1 <-> 2 <- 3 <- 4 --- step: 2{1} <- 3 <- 4 --- output: 4{1, 2, 3} -PREPARE q5 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id IN (1000000000001, 1000000000002, 1000000000003)$$, - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); - -PREPARE sol5 AS -SELECT type, id, contracted_vertices, source, target, cost -FROM (VALUES - ('v'::CHAR, 1000000000004::BIGINT, ARRAY[1000000000001, 1000000000002, 1000000000003]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT) -) AS t(type, id, contracted_vertices, source, target, cost ); - -SELECT set_eq('q5', 'sol5'); - --- all table --- 15{14} --- 16{17} --- 10{13} --- 5{7,8} --- 2{1} --- Checking dead end contraction for sample data -PREPARE q6 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); - -PREPARE sol6 AS -SELECT type, id, contracted_vertices, source, target, cost -FROM (VALUES - ('v'::CHAR, 1000000000002::BIGINT, ARRAY[1000000000001]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), - ('v', 1000000000005, ARRAY[1000000000007,1000000000008], -1, -1, -1), - ('v', 1000000000010, ARRAY[1000000000013], -1, -1, -1), - ('v', 1000000000015, ARRAY[1000000000014], -1, -1, -1), - ('v', 1000000000017, ARRAY[1000000000016], -1, -1, -1) -) AS t(type, id, contracted_vertices, source, target, cost ); - -SELECT set_eq('q6', 'sol6'); - -SELECT finish(); -ROLLBACK; diff --git a/pgtap/contraction/deadend/undirected/big_ids.pg b/pgtap/contraction/deadend/undirected/big_ids.pg deleted file mode 100644 index d29b052578d..00000000000 --- a/pgtap/contraction/deadend/undirected/big_ids.pg +++ /dev/null @@ -1,138 +0,0 @@ - -/*PGR-GNU***************************************************************** - -Copyright (c) 2018 pgRouting developers -Mail: project@pgrouting.org - ------- -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - ********************************************************************PGR-GNU*/ -BEGIN; - -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(6); - -UPDATE edge_table -SET id = id + POWER(10, 8), - source = source + POWER(10, 8), - target = target + POWER(10, 8); - - --- input: 1 - 2, forbidden = 20 --- output: 2{1} ---Checking dead end contraction with invalid forbidden vertices -PREPARE q1 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id = 100000001$$, - ARRAY[1]::integer[], 1, ARRAY[20]::BIGINT[], false); - -SELECT set_eq('q1', - $$SELECT - 'v'::CHAR AS type, - 100000002::BIGINT AS id, - ARRAY[100000001]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - --- Checking dead end contraction with no dead end node --- input: 3 - 2 - 5 - 6 - 3 --q1 --- output: -PREPARE q2 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id IN (100000002, 100000004, 100000005, 100000008)$$, - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -SELECT is_empty('q2'); - --- input: 1 - 2 --- outputt: 2{1} ---Checking dead end contraction for single dead end node -PREPARE q3 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id = 100000001$$, - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -SELECT set_eq('q3', - $$SELECT - 'v'::CHAR AS type, - 100000002::BIGINT AS id, - ARRAY[100000001]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - --- Checking dead end contraction for two dead end nodes --- input: 2 - 3 - 4 --- output: 4{2, 3} -PREPARE q4 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id IN (100000002, 100000003)$$, - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -SELECT set_eq('q4', - $$SELECT - 'v'::CHAR AS type, - 100000004::BIGINT AS id, - ARRAY[100000002,100000003]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - ---Checking dead end contraction for multiple dead end nodes --- input: 1 - 2 - 3 - 4 --- output: 4{1, 2, 3} -PREPARE q5 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id IN (100000001, 100000002, 100000003)$$, - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -PREPARE sol5 AS -SELECT type, id, contracted_vertices, source, target, cost -FROM (VALUES - ('v'::CHAR, 100000004::BIGINT, ARRAY[100000001, 100000002, 100000003]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT) -) AS t(type, id, contracted_vertices, source, target, cost ); - -SELECT set_eq('q5', 'sol5'); - --- all table --- 15{14} --- 16{17} --- 10{13} --- 5{7,8} --- 2{1} --- Checking dead end contraction for sample data -PREPARE q6 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -PREPARE sol6 AS -SELECT type, id, contracted_vertices, source, target, cost -FROM (VALUES - ('v'::CHAR, 100000002::BIGINT, ARRAY[100000001]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), - ('v', 100000005, ARRAY[100000007,100000008], -1, -1, -1), - ('v', 100000010, ARRAY[100000013], -1, -1, -1), - ('v', 100000015, ARRAY[100000014], -1, -1, -1), - ('v', 100000017, ARRAY[100000016], -1, -1, -1) -) AS t(type, id, contracted_vertices, source, target, cost ); - -SELECT set_eq('q6', 'sol6'); - -SELECT finish(); -ROLLBACK; diff --git a/pgtap/contraction/deadend/undirected/cases.pg b/pgtap/contraction/deadend/undirected/cases.pg index 896b9d1d8b5..336a80e0cef 100644 --- a/pgtap/contraction/deadend/undirected/cases.pg +++ b/pgtap/contraction/deadend/undirected/cases.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(6); CREATE TABLE test_deadend ( diff --git a/pgtap/contraction/deadend/undirected/compare_dijkstra.pg b/pgtap/contraction/deadend/undirected/compare_dijkstra.pg index 1032ad12dbb..65ffd2e7fef 100644 --- a/pgtap/contraction/deadend/undirected/compare_dijkstra.pg +++ b/pgtap/contraction/deadend/undirected/compare_dijkstra.pg @@ -21,65 +21,65 @@ BEGIN; SELECT plan(333); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; --step 1: Initial tables -SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table$$); -SELECT isnt_empty($$SELECT id FROM edge_table_vertices_pgr$$); +SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edges$$); +SELECT isnt_empty($$SELECT id FROM vertices$$); -- add extra columns to the edges and vertices table -ALTER TABLE edge_table +ALTER TABLE edges ADD is_contracted BOOLEAN DEFAULT false, ADD contracted_vertices integer[]; -ALTER TABLE edge_table_vertices_pgr +ALTER TABLE vertices ADD is_contracted BOOLEAN DEFAULT false, ADD contracted_vertices integer[]; -SELECT has_column('edge_table', 'is_contracted'); -SELECT has_column('edge_table_vertices_pgr', 'is_contracted'); -SELECT has_column('edge_table', 'contracted_vertices'); -SELECT has_column('edge_table_vertices_pgr', 'contracted_vertices'); +SELECT has_column('edges', 'is_contracted'); +SELECT has_column('vertices', 'is_contracted'); +SELECT has_column('edges', 'contracted_vertices'); +SELECT has_column('vertices', 'contracted_vertices'); SELECT * INTO contraction_info FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true); PREPARE c_info AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('v'::CHAR, 2::BIGINT, ARRAY[1]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), - ('v', 5, ARRAY[7,8], -1, -1, -1), - ('v', 10, ARRAY[13], -1, -1, -1), - ('v', 15, ARRAY[14], -1, -1, -1), - ('v', 17, ARRAY[16], -1, -1, -1) + ('v'::CHAR, 6::BIGINT, ARRAY[5]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), + ('v', 7, ARRAY[1,3], -1, -1, -1), + ('v', 8, ARRAY[9], -1, -1, -1), + ('v', 4, ARRAY[2], -1, -1, -1), + ('v', 14, ARRAY[13], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq($$SELECT * FROM contraction_info$$, 'c_info'); -UPDATE edge_table_vertices_pgr +UPDATE vertices SET contracted_vertices = result.contracted_vertices FROM contraction_info AS result -WHERE result.type = 'v' AND result.id = edge_table_vertices_pgr.id; +WHERE result.type = 'v' AND result.id = vertices.id; -UPDATE edge_table_vertices_pgr +UPDATE vertices SET is_contracted = true FROM (SELECT unnest(contracted_vertices) AS id FROM contraction_info WHERE type = 'v') AS result -WHERE result.id = edge_table_vertices_pgr.id; +WHERE result.id = vertices.id; SELECT set_eq($$SELECT id - FROM edge_table_vertices_pgr + FROM vertices WHERE NOT is_contracted$$, - $$SELECT unnest(ARRAY[2,3,4,5,6,9,10,11,12,15,17])$$ + $$SELECT unnest(ARRAY[4,6,7,8,10,11,12,14,15,16,17])$$ ); SELECT set_eq($$SELECT id - FROM edge_table_vertices_pgr + FROM vertices WHERE is_contracted$$, - $$SELECT unnest(ARRAY[1,7,8,13,14,16])$$ + $$SELECT unnest(ARRAY[1,2,3,5,9,13])$$ ); @@ -94,23 +94,23 @@ BEGIN WITH contracted_section AS ( SELECT unnest(contracted_vertices) AS id - FROM edge_table_vertices_pgr + FROM vertices WHERE ARRAY[%1$s, %2$s] && contracted_vertices ), vertices AS ( - SELECT id FROM edge_table_vertices_pgr + SELECT id FROM vertices WHERE NOT is_contracted OR id IN (SELECT id FROM contracted_section) ) - SELECT id, source, target, cost, reverse_cost FROM edge_table + SELECT id, source, target, cost, reverse_cost FROM edges WHERE - EXISTS (SELECT id FROM vertices WHERE vertices.id = edge_table.source) + EXISTS (SELECT id FROM vertices WHERE vertices.id = edges.source) AND - EXISTS (SELECT id FROM vertices WHERE vertices.id = edge_table.target) + EXISTS (SELECT id FROM vertices WHERE vertices.id = edges.target) $query$, $1::BIGINT, $2::BIGINT), $1::BIGINT, $2::BIGINT, directed := false); CREATE TEMP TABLE dijkstra_normal AS - SELECT * FROM pgr_dijkstra($$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, $1::BIGINT, $2::BIGINT, directed := false); + SELECT * FROM pgr_dijkstra($$SELECT id, source, target, cost, reverse_cost FROM edges$$, $1::BIGINT, $2::BIGINT, directed := false); RETURN QUERY SELECT set_eq( diff --git a/pgtap/contraction/deadend/undirected/dev_cases.pg b/pgtap/contraction/deadend/undirected/dev_cases.pg index 3937bf62a2f..719d98da054 100644 --- a/pgtap/contraction/deadend/undirected/dev_cases.pg +++ b/pgtap/contraction/deadend/undirected/dev_cases.pg @@ -19,26 +19,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); SELECT throws_ok( $$SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1', ARRAY[-1]::integer[], 1, ARRAY[]::BIGINT[], false)$$, 'XX000', 'Invalid contraction type found'); -- GRAPH: 1 - 2 PREPARE q1 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); SELECT set_eq('q1', $$SELECT 'v'::CHAR AS type, - 2::BIGINT AS id, - ARRAY[1]::BIGINT[] AS contracted_vertices, + 6::BIGINT AS id, + ARRAY[5]::BIGINT[] AS contracted_vertices, -1::BIGINT AS source, -1::BIGINT AS target, -1::FLOAT AS cost$$); @@ -49,14 +49,14 @@ SELECT set_eq('q1', PREPARE q2 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id < 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id < 3', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); SELECT set_eq('q2', $$SELECT 'v'::CHAR AS type, - 3::BIGINT AS id, - ARRAY[1, 2]::BIGINT[] AS contracted_vertices, + 10::BIGINT AS id, + ARRAY[5, 6]::BIGINT[] AS contracted_vertices, -1::BIGINT AS source, -1::BIGINT AS target, -1::FLOAT AS cost$$); @@ -72,17 +72,17 @@ SELECT set_eq('q2', PREPARE q3 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); PREPARE sol3 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('v'::CHAR, 2::BIGINT, ARRAY[1]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), - ('v', 5, ARRAY[7,8], -1, -1, -1), - ('v', 10, ARRAY[13], -1, -1, -1), - ('v', 15, ARRAY[14], -1, -1, -1), - ('v', 17, ARRAY[16], -1, -1, -1) + ('v'::CHAR, 4::BIGINT, ARRAY[2]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), + ('v', 7, ARRAY[1,3], -1, -1, -1), + ('v', 6, ARRAY[5], -1, -1, -1), + ('v', 8, ARRAY[9], -1, -1, -1), + ('v', 14, ARRAY[13], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('q3', 'sol3'); @@ -97,7 +97,7 @@ SELECT set_eq('q3', 'sol3'); PREPARE q4 AS SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table + $$SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (2, 4, 5, 8)$$, ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); diff --git a/pgtap/contraction/deadend/undirected/id_size.pg b/pgtap/contraction/deadend/undirected/id_size.pg new file mode 100644 index 00000000000..76c0301024e --- /dev/null +++ b/pgtap/contraction/deadend/undirected/id_size.pg @@ -0,0 +1,30 @@ +/*PGR-GNU***************************************************************** + +Copyright (c) 2023 pgRouting developers +Mail: project@pgrouting.org + +------ +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + ********************************************************************PGR-GNU*/ +BEGIN; + +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); +SELECT plan(18); + +SELECT test_ids_size(2, false); +SELECT test_ids_size(8, false); +SELECT test_ids_size(12, false); + + +SELECT finish(); +ROLLBACK; diff --git a/pgtap/contraction/deadend/undirected/inner_query.pg b/pgtap/contraction/deadend/undirected/inner_query.pg index 6a876cedccb..e0a6c5d2043 100644 --- a/pgtap/contraction/deadend/undirected/inner_query.pg +++ b/pgtap/contraction/deadend/undirected/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_contraction(', ', ARRAY[1]::BIGINT[], 1, ARRAY[3]::BIGINT[], false)'); diff --git a/pgtap/contraction/deadend/undirected/more_cases.pg b/pgtap/contraction/deadend/undirected/more_cases.pg index 0455765b157..e5f4f67810c 100644 --- a/pgtap/contraction/deadend/undirected/more_cases.pg +++ b/pgtap/contraction/deadend/undirected/more_cases.pg @@ -19,643 +19,643 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(39); SET client_min_messages TO WARNING; -- TESTING ONE CYCLE OF DEAD END CONTRACTION FOR A DIRECTED GRAPH --- GRAPH: 1 - 2 +-- GRAPH: 5 <=> 6 PREPARE graph_e_1 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1; +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 ORDER BY id; --- GRAPH: 4 - 3 - 2 +-- GRAPH: 15 -> 10 -> 6 PREPARE graph_e_2_3 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (2, 3); +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (2, 3) ORDER BY id; --- GRAPH: 6 - 11 - 10 +-- GRAPH: 11 -> 12 <- 8 PREPARE graph_e_11_12 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (11, 12); +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (11, 12) ORDER BY id; --- GRAPH: 3 - 2 10 - 11 +-- GRAPH: 10 -> 6 8 -> 12 PREPARE graph_e_2_12 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (2, 12); +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (2, 12) ORDER BY id; --- GRAPH: 3 - 6 - 11 - 12 +-- GRAPH: 10 -> 11 -> 12 -> 17 PREPARE graph_e_5_11_13 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (5, 11, 13); +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (5, 11, 13) ORDER BY id; --- GRAPH: 4 - 3 - 2 10 - 11 +-- GRAPH: 15-> 10 -> 6 8 -> 12 PREPARE graph_e_2_3_12 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (2, 3, 12); +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (2, 3, 12) ORDER BY id; --- GRAPH: 1 - 2 4 - 3 7 - 8 +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 PREPARE graph_e_1_3_6 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (1, 3, 6); +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (1, 3, 6) ORDER BY id; --- GRAPH: 4 - 3 - 2 3 - 6 - 11 +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 PREPARE graph_e_2_3_5_11 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (2, 3, 5, 11); +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (2, 3, 5, 11) ORDER BY id; -- SINGLE EDGE --- GRAPH: 1 - 2 +-- GRAPH: 5 <=> 6 -- no forbidden vertices PREPARE v2e1q10 AS SELECT * FROM pgr_contraction( 'graph_e_1', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); + ARRAY[1]::integer[], 5, ARRAY[]::integer[], false); PREPARE v2e1q11 AS SELECT * -FROM (VALUES ('v', 2, ARRAY[1]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM (VALUES ('v', 6, ARRAY[5]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; SELECT set_eq('v2e1q10', 'v2e1q11', 'graph_e_1 QUERY 1: Directed graph with single edge and no forbidden vertices'); --- GRAPH: 1 - 2 --- 1 is forbidden vertex +-- GRAPH: 5 <=> 6 +-- 5 is forbidden vertex PREPARE v2e1q20 AS SELECT * FROM pgr_contraction( 'graph_e_1', - ARRAY[1]::integer[], 1, ARRAY[1]::INTEGER[], false); + ARRAY[1]::integer[], 5, ARRAY[5]::INTEGER[], false); PREPARE v2e1q21 AS SELECT * -FROM ( VALUES ('v', 1, ARRAY[2]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM ( VALUES ('v', 5, ARRAY[6]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; SELECT set_eq('v2e1q20', 'v2e1q21', 'graph_e_1 QUERY 2: Directed graph with single edge and 1 as forbidden vertex'); -- TWO QUERY --- GRAPH: 4 - 3 - 2 +-- GRAPH: 15 -> 10 -> 6 -- no forbidden vertices PREPARE v3e2q10 AS SELECT * FROM pgr_contraction( 'graph_e_2_3', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); + ARRAY[1]::integer[], 5, ARRAY[]::integer[], false); PREPARE v3e2q11 AS SELECT * -FROM ( VALUES ('v', 4, ARRAY[2, 3]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM ( VALUES ('v', 15, ARRAY[6,10]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; SELECT set_eq('v3e2q10', 'v3e2q11', 'graph_e_2_3 QUERY 1: Directed graph two edges and no forbidden vertices'); --- GRAPH: 4 - 3 - 2 --- 3 is forbidden +-- GRAPH: 15 -> 10 -> 6 +-- 10 is forbidden PREPARE v3e2q20 AS SELECT * FROM pgr_contraction( 'graph_e_2_3', - ARRAY[1]::INTEGER[], 1, ARRAY[3]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[10]::integer[], false); PREPARE v3e2q21 AS SELECT type, id, contracted_vertices, source, target, cost -FROM ( VALUES ('v', 3, ARRAY[2,4]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM ( VALUES ('v', 10, ARRAY[6,15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; SELECT set_eq('v3e2q20', 'v3e2q21', 'graph_e_2_3 QUERY 2: Directed graph with two edges and vertex 3 as forbidden vertex'); --- GRAPH: 4 - 3 - 2 --- 2 is forbidden +-- GRAPH: 15 -> 10 -> 6 +-- 6 is forbidden PREPARE v3e2q30 AS SELECT * FROM pgr_contraction( 'graph_e_2_3', - ARRAY[1]::INTEGER[], 1, ARRAY[2]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[6]::integer[], false); PREPARE v3e2q31 AS SELECT * -FROM ( VALUES ('v', 2, ARRAY[3,4]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM ( VALUES ('v', 6, ARRAY[10,15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; SELECT set_eq('v3e2q30', 'v3e2q31', 'graph_e_2_3 QUERY 3: Directed graph with two edges and vertex 2 as forbidden vertex'); --- GRAPH: 6 - 11 - 10 +-- GRAPH: 11 -> 12 <- 8 -- no forbidden vertices PREPARE v3e2q40 AS SELECT * FROM pgr_contraction( 'graph_e_11_12', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); + ARRAY[1]::integer[], 5, ARRAY[]::integer[], false); PREPARE v3e2q41 AS SELECT * -FROM (VALUES ('v', 10, ARRAY[6,11]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM (VALUES ('v', 8, ARRAY[11,12]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; SELECT set_eq('v3e2q40', 'v3e2q41', 'graph_e_11_12 QUERY 1: Directed graph with two edges and no forbidden vertices'); --- GRAPH: 6 - 11 - 10 --- 11 is forbidden +-- GRAPH: 11 -> 12 <- 8 +-- 12 is forbidden PREPARE v3e2q50 AS SELECT * FROM pgr_contraction( 'graph_e_11_12', - ARRAY[1]::INTEGER[], 1, ARRAY[11]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[12]::integer[], false); PREPARE v3e2q51 AS SELECT * -FROM (VALUES ('v', 11, ARRAY[6,10]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; +FROM (VALUES ('v', 12, ARRAY[8,11]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ) ; SELECT set_eq('v3e2q50', 'v3e2q51', 'graph_e_11_12 QUERY 2: Directed graph with two edges and no forbidden vertices'); --- GRAPH: 3 - 2 10 - 11 +-- GRAPH: 10 -> 6 8 <=> 12 -- no forbidden PREPARE v3e2q60 AS SELECT * FROM pgr_contraction( 'graph_e_2_12', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); + ARRAY[1]::integer[], 5, ARRAY[]::integer[], false); PREPARE v3e2q61 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10]::integer[], -1, -1, -1) + ('v', 10, ARRAY[6]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8]::integer[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v3e2q60', 'v3e2q61', 'graph_e_2_12 QUERY 1: Directed graph with two edges and no forbidden vertices'); --- GRAPH: 3 - 2 10 - 11 --- 2 is forbidden +-- GRAPH: 10 -> 6 8 <=> 12 +-- 6 is forbidden PREPARE v3e2q70 AS SELECT * FROM pgr_contraction( 'graph_e_2_12', - ARRAY[1]::INTEGER[], 1, ARRAY[2]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[6]::integer[], false); PREPARE v3e2q71 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[3]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10]::BIGINT[], -1, -1, -1) + ('v', 6, ARRAY[10]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v3e2q70', 'v3e2q71', 'graph_e_2_12 QUERY 2: Directed graph with two edges and 2 is forbidden vertex'); --- GRAPH: 3 - 2 10 - 11 --- 11 is forbidden +-- GRAPH: 10 -> 6 8 <=> 12 +-- 12 is forbidden PREPARE v3e2q80 AS SELECT * FROM pgr_contraction( 'graph_e_2_12', - ARRAY[1]::INTEGER[], 1, ARRAY[11]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[12]::integer[], false); PREPARE v3e2q81 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[6]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v3e2q80', 'v3e2q81', 'graph_e_2_12 QUERY 3: Directed graph with two edges and 11 is forbidden vertex'); -- THREE QUERY --- GRAPH: 3 - 6 - 11 - 12 +-- GRAPH: 10 -> 11 -> 12 -> 17 -- no forbidden vertices PREPARE v4e3q10 AS SELECT * FROM pgr_contraction( 'graph_e_5_11_13', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); + ARRAY[1]::integer[], 5, ARRAY[]::integer[], false); PREPARE v4e3q11 AS SELECT * FROM (VALUES - ('v', 12, ARRAY[3, 6, 11]::BIGINT[], -1, -1, -1) + ('v', 17, ARRAY[10, 11, 12]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e3q10', 'v4e3q11', 'graph_e_5_11_13 QUERY 1: Directed graph with three edges and no forbidden vertices'); --- GRAPH: 3 - 6 - 11 - 12 --- 3 is forbidden +-- GRAPH: 10 -> 11 -> 12 -> 17 +-- 10 is forbidden PREPARE v4e3q20 AS SELECT * FROM pgr_contraction( 'graph_e_5_11_13', - ARRAY[1]::INTEGER[], 1, ARRAY[3]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[10]::integer[], false); PREPARE v4e3q21 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[6, 11, 12]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[11, 12, 17]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e3q20', 'v4e3q21', 'graph_e_5_11_13 QUERY 2: Directed graph with three edges and 3 is forbidden vertex'); --- GRAPH: 3 - 6 - 11 - 12 --- 6 is forbidden +-- GRAPH: 10 -> 11 -> 12 -> 17 +-- 11 is forbidden PREPARE v4e3q30 AS SELECT * FROM pgr_contraction( 'graph_e_5_11_13', - ARRAY[1]::INTEGER[], 1, ARRAY[6]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[11]::integer[], false); PREPARE v4e3q31 AS SELECT * FROM (VALUES - ('v', 6, ARRAY[3, 11, 12]::BIGINT[], -1, -1, -1) + ('v', 11, ARRAY[10, 12, 17]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e3q30', 'v4e3q31', 'graph_e_5_11_13 QUERY 3: Directed graph with three edges and 6 is forbidden vertex'); --- GRAPH: 3 - 6 - 11 - 12 --- 11 is forbidden +-- GRAPH: 10 -> 11 -> 12 -> 17 +-- 12 is forbidden PREPARE v4e3q40 AS SELECT * FROM pgr_contraction( 'graph_e_5_11_13', - ARRAY[1]::INTEGER[], 1, ARRAY[11]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[12]::integer[], false); PREPARE v4e3q41 AS SELECT * FROM (VALUES - ('v', 11, ARRAY[3,6,12]::BIGINT[], -1, -1, -1) + ('v', 12, ARRAY[10,11,17]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e3q40', 'v4e3q41', 'graph_e_5_11_13 QUERY 4: Directed graph with three edges and 11 is forbidden vertex'); --- GRAPH: 3 - 6 - 11 - 12 --- forbidden: 3, 6, 12 +-- GRAPH: 10 -> 11 -> 12 -> 17 +-- forbidden: 10, 11, 17 PREPARE v4e3q50 AS SELECT * FROM pgr_contraction( 'graph_e_5_11_13', - ARRAY[1]::INTEGER[], 1, ARRAY[3,6,12]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[10,11,17]::integer[], false); -SELECT is_empty('v4e3q50', 'graph_e_5_11_13 QUERY 5: Directed graph with three edges and 12 is forbidden vertex'); +SELECT is_empty('v4e3q50', 'graph_e_5_11_13 QUERY 7: Directed graph with three edges and 17 is forbidden vertex'); --- GRAPH: 4 - 3 - 2 10 - 11 +-- GRAPH: 15-> 10 -> 6 8 -> 12 -- no forbidden vertices PREPARE v5e3q10 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_12', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); + ARRAY[1]::integer[], 5, ARRAY[]::integer[], false); PREPARE v5e3q11 AS SELECT * FROM (VALUES - ('v', 4, ARRAY[2, 3]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10], -1, -1, -1) + ('v', 15, ARRAY[6, 10]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v5e3q10', 'v5e3q11', 'graph_e_2_3_12 QUERY 1: Directed graph with three edges and no forbidden vertices'); --- GRAPH: 4 - 3 - 2 10 - 11 --- 11 is forbidden +-- GRAPH: 15-> 10 -> 6 8 -> 12 +-- 12 is forbidden PREPARE v5e3q20 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_12', - ARRAY[1]::INTEGER[], 1, ARRAY[11]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[12]::integer[], false); PREPARE v5e3q21 AS SELECT * FROM (VALUES - ('v', 4, ARRAY[2, 3]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10], -1, -1, -1) + ('v', 15, ARRAY[6, 10]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v5e3q20', 'v5e3q21', 'graph_e_2_3_12 QUERY 2: Directed graph with three edges and 11 is forbidden vertex'); --- GRAPH: 4 - 3 - 2 10 - 11 --- 2 is forbidden +-- GRAPH: 15-> 10 -> 6 8 -> 12 +-- 6 is forbidden PREPARE v5e3q30 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_12', - ARRAY[1]::INTEGER[], 1, ARRAY[2]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[6]::integer[], false); PREPARE v5e3q31 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[3,4]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10], -1, -1, -1) + ('v', 6, ARRAY[10,15]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v5e3q30', 'v5e3q31', 'graph_e_2_3_12 QUERY 3: Directed graph with three edges and 2 is forbidden vertex'); --- GRAPH: 4 - 3 - 2 10 - 11 --- 3 is forbidden +-- GRAPH: 15-> 10 -> 6 8 -> 12 +-- 10 is forbidden PREPARE v5e3q40 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_12', - ARRAY[1]::INTEGER[], 1, ARRAY[3]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[10]::integer[], false); PREPARE v5e3q41 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2,4]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10], -1, -1, -1) + ('v', 10, ARRAY[6,15]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('v5e3q40', 'v5e3q41', 'graph_e_2_3_12 QUERY 4: Directed graph with three edges and 3 is forbidden vertex'); --- GRAPH: 4 - 3 - 2 10 - 11 --- 2 and 11 are forbidden +-- GRAPH: 15-> 10 -> 6 8 -> 12 +-- 6 and 12 are forbidden PREPARE v5e3q50 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_12', - ARRAY[1]::INTEGER[], 1, ARRAY[2, 11]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[6, 12]::integer[], false); PREPARE v5e3q51 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[3,4]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10], -1, -1, -1) + ('v', 6, ARRAY[10,15]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('v5e3q50', 'v5e3q51', 'graph_e_2_3_12 QUERY 5: Directed graph with three edges and 2 and 11 are forbidden vertices'); --- GRAPH: 4 - 3 - 2 10 - 11 --- 3 and 11 are forbidden +-- GRAPH: 15-> 10 -> 6 8 -> 12 +-- 10 and 12 are forbidden PREPARE v5e3q60 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_12', - ARRAY[1]::INTEGER[], 1, ARRAY[3, 11]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[10, 12]::integer[], false); PREPARE v5e3q61 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2,4]::BIGINT[], -1, -1, -1), - ('v', 11, ARRAY[10], -1, -1, -1) + ('v', 10, ARRAY[6,15]::BIGINT[], -1, -1, -1), + ('v', 12, ARRAY[8], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v5e3q60', 'v5e3q61', 'graph_e_2_3_12 QUERY 6: Directed graph with three edges and 3 and 11 are forbidden vertices'); --- GRAPH: 1 - 2 4 - 3 7 - 8 +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 -- no forbidden vertices PREPARE v6e3q10 AS SELECT * FROM pgr_contraction( 'graph_e_1_3_6', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); + ARRAY[1]::integer[], 5, ARRAY[]::integer[], false); PREPARE v6e3q11 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[1]::BIGINT[], -1, -1, -1), - ('v', 4, ARRAY[3]::integer[], -1, -1, -1), - ('v', 8, ARRAY[7]::integer[], -1, -1, -1) + ('v', 6, ARRAY[5]::BIGINT[], -1, -1, -1), + ('v', 15, ARRAY[10]::integer[], -1, -1, -1), + ('v', 3, ARRAY[1]::integer[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v6e3q10', 'v6e3q11', 'graph_e_1_3_6 QUERY 1: Directed graph with three edges and no forbidden vertices'); --- GRAPH: 1 - 2 4 - 3 7 - 8 --- 1 is forbidden +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 +-- 5 is forbidden PREPARE v6e3q20 AS SELECT * FROM pgr_contraction( 'graph_e_1_3_6', - ARRAY[1]::INTEGER[], 1, ARRAY[1]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[5]::integer[], false); PREPARE v6e3q21 AS SELECT * FROM (VALUES - ('v', 1, ARRAY[2]::BIGINT[], -1, -1, -1), - ('v', 4, ARRAY[3]::integer[], -1, -1, -1), - ('v', 8, ARRAY[7]::integer[], -1, -1, -1) + ('v', 5, ARRAY[6]::BIGINT[], -1, -1, -1), + ('v', 15, ARRAY[10]::integer[], -1, -1, -1), + ('v', 3, ARRAY[1]::integer[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v6e3q20', 'v6e3q21', 'graph_e_1_3_6 QUERY 2: Directed graph with three edges and 1 is forbidden vertex'); --- GRAPH: 1 - 2 4 - 3 7 - 8 --- 3 is forbidden +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 +-- 10 is forbidden PREPARE v6e3q30 AS SELECT * FROM pgr_contraction( 'graph_e_1_3_6', - ARRAY[1]::INTEGER[], 1, ARRAY[3]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[10]::integer[], false); PREPARE v6e3q31 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[1]::BIGINT[], -1, -1, -1), - ('v', 3, ARRAY[4]::BIGINT[], -1, -1, -1), - ('v', 8, ARRAY[7]::BIGINT[], -1, -1, -1) + ('v', 6, ARRAY[5]::BIGINT[], -1, -1, -1), + ('v', 10, ARRAY[15]::BIGINT[], -1, -1, -1), + ('v', 3, ARRAY[1]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v6e3q30', 'v6e3q31', 'graph_e_1_3_6 QUERY 3: Directed graph with three edges and 3 is forbidden vertex'); --- GRAPH: 1 - 2 4 - 3 7 - 8 --- 7 is forbidden +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 +-- 1 is forbidden PREPARE v6e3q40 AS SELECT * FROM pgr_contraction( 'graph_e_1_3_6', - ARRAY[1]::INTEGER[], 1, ARRAY[7]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[1]::integer[], false); PREPARE v6e3q41 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[1]::BIGINT[], -1, -1, -1), - ('v', 4, ARRAY[3]::integer[], -1, -1, -1), - ('v', 7, ARRAY[8]::integer[], -1, -1, -1) + ('v', 6, ARRAY[5]::BIGINT[], -1, -1, -1), + ('v', 15, ARRAY[10]::integer[], -1, -1, -1), + ('v', 1, ARRAY[3]::integer[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v6e3q40', 'v6e3q41', 'graph_e_1_3_6 QUERY 4: Directed graph with three edges and 7 is forbidden vertex'); --- GRAPH: 1 - 2 4 - 3 7 - 8 --- 1 and 3 are forbidden +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 +-- 5 and 10 are forbidden PREPARE v6e3q50 AS SELECT * FROM pgr_contraction( 'graph_e_1_3_6', - ARRAY[1]::INTEGER[], 1, ARRAY[1, 3]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[5, 10]::integer[], false); PREPARE v6e3q51 AS SELECT * FROM (VALUES - ('v', 1, ARRAY[2]::BIGINT[], -1, -1, -1), - ('v', 3, ARRAY[4]::BIGINT[], -1, -1, -1), - ('v', 8, ARRAY[7]::BIGINT[], -1, -1, -1) + ('v', 5, ARRAY[6]::BIGINT[], -1, -1, -1), + ('v', 10, ARRAY[15]::BIGINT[], -1, -1, -1), + ('v', 3, ARRAY[1]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v6e3q50', 'v6e3q51', 'graph_e_1_3_6 QUERY 5: Directed graph with three edges and 1 and 3 are forbidden vertices'); --- GRAPH: 1 - 2 4 - 3 7 - 8 --- 3 and 7 are forbidden +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 +-- 10 and 1 are forbidden PREPARE v6e3q60 AS SELECT * FROM pgr_contraction( 'graph_e_1_3_6', - ARRAY[1]::INTEGER[], 1, ARRAY[3, 7]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[10, 1]::integer[], false); PREPARE v6e3q61 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[1]::BIGINT[], -1, -1, -1), - ('v', 3, ARRAY[4]::BIGINT[], -1, -1, -1), - ('v', 7, ARRAY[8]::BIGINT[], -1, -1, -1) + ('v', 6, ARRAY[5]::BIGINT[], -1, -1, -1), + ('v', 10, ARRAY[15]::BIGINT[], -1, -1, -1), + ('v', 1, ARRAY[3]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v6e3q60', 'v6e3q61', 'graph_e_1_3_6 QUERY 6: Directed graph with three edges and 3 and 7 are forbidden vertices'); --- GRAPH: 1 - 2 4 - 3 7 - 8 --- 1 and 7 are forbidden +-- GRAPH: 5 <=> 6 15 -> 10 1 <=> 3 +-- 5 and 1 are forbidden PREPARE v6e3q70 AS SELECT * FROM pgr_contraction( 'graph_e_1_3_6', - ARRAY[1]::INTEGER[], 1, ARRAY[1, 7]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[5, 1]::integer[], false); PREPARE v6e3q71 AS SELECT * FROM (VALUES - ('v', 1, ARRAY[2]::BIGINT[], -1, -1, -1), - ('v', 4, ARRAY[3]::BIGINT[], -1, -1, -1), - ('v', 7, ARRAY[8]::BIGINT[], -1, -1, -1) + ('v', 5, ARRAY[6]::BIGINT[], -1, -1, -1), + ('v', 15, ARRAY[10]::BIGINT[], -1, -1, -1), + ('v', 1, ARRAY[3]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v6e3q70', 'v6e3q71', 'graph_e_1_3_6 QUERY 7: Directed graph with three edges and 1 and 7 are forbidden vertices'); -- FOUR EDGES --- GRAPH: 4 - 3 - 2 3 - 6 - 11 +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 -- no forbidden vertices PREPARE v4e4q10 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_5_11', - ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); + ARRAY[1]::integer[], 5, ARRAY[]::integer[], false); PREPARE v4e4q11 AS SELECT * FROM (VALUES - ('v', 11, ARRAY[2, 3, 4, 6]::BIGINT[], -1, -1, -1) + ('v', 12, ARRAY[6, 10, 11, 15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e4q10', 'v4e4q11', 'graph_e_2_3_5_11 QUERY 1: Directed graph with four edges and no forbidden vertices'); --- GRAPH: 4 - 3 - 2 3 - 6 - 11 --- 2 is forbidden +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 6 is forbidden PREPARE v4e4q20 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[2]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[6]::integer[], false); PREPARE v4e4q21 AS SELECT * FROM (VALUES - ('v', 2, ARRAY[3, 4, 6, 11]::BIGINT[], -1, -1, -1) + ('v', 6, ARRAY[10, 11, 12, 15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e4q20', 'v4e4q21', 'graph_e_2_3_5_11 QUERY 2: Directed graph with four edges and 2 is forbidden vertex'); --- GRAPH: 4 - 3 - 2 3 - 6 - 11 --- 3 is forbidden +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 10 is forbidden PREPARE v4e4q30 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[3]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[10]::integer[], false); PREPARE v4e4q31 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2, 4, 6, 11]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[6, 11, 12, 15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e4q30', 'v4e4q31', 'FOUR QUERY 3: Directed graph with four edges and 3 is forbidden vertex'); --- GRAPH: 4 - 3 - 2 3 - 6 - 11 --- 6 is forbidden +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 11 is forbidden PREPARE v4e4q40 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[6]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[11]::integer[], false); PREPARE v4e4q41 AS SELECT * FROM (VALUES - ('v', 6, ARRAY[2,3,4,11]::BIGINT[], -1, -1, -1) + ('v', 11, ARRAY[6,10,12,15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e4q40', 'v4e4q41', 'graph_e_2_3_5_11 QUERY 4: Directed graph with four edges and 6 is forbidden vertex'); --- GRAPH: 4 - 3 - 2 3 - 6 - 11 --- 11 is forbidden +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 12 is forbidden PREPARE v4e4q50 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[11]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[12]::integer[], false); PREPARE v4e4q51 AS SELECT * FROM (VALUES - ('v', 11, ARRAY[2,3,4,6]::BIGINT[], -1, -1, -1) + ('v', 12, ARRAY[6,10,11,15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e4q50', 'v4e4q51', 'graph_e_2_3_5_11 QUERY 5: Directed graph with four edges and 11 is forbidden vertex'); --- GRAPH: 4 - 3 - 2 3 - 6 - 11 --- 2,3 are forbidden +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 6,10 are forbidden PREPARE v4e4q60 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[2, 3]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[6, 10]::integer[], false); PREPARE v4e4q61 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[4, 6, 11]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[11, 12, 15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e4q60', 'v4e4q61', 'graph_e_2_3_5_11 QUERY 6: Directed graph with four edges and 2 and 3 is forbidden vertex'); --- GRAPH: 4 - 3 - 2 3 - 6 - 11 --- 2,6 are forbidden +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 6,11 are forbidden PREPARE v4e4q70 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[2, 6]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[6, 11]::integer[], false); PREPARE v4e4q71 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[4]::BIGINT[], -1, -1, -1), - ('v', 6, ARRAY[11]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[15]::BIGINT[], -1, -1, -1), + ('v', 11, ARRAY[12]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e4q70', 'v4e4q71', 'graph_e_2_3_5_11 QUERY 7: Directed graph with four edges and 2 and 6 forbidden vertex'); --- GRAPH: 4 - 3 - 2 3 - 6 - 11 --- 2,11 are forbidden +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 6,12 are forbidden PREPARE v4e4q80 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[2, 11]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[6, 12]::integer[], false); PREPARE v4e4q81 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[4]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e4q80', 'v4e4q81', 'graph_e_2_3_5_11 QUERY 8: Directed graph with four edges and 2 and 11 forbidden vertex'); --- GRAPH: 4 - 3 - 2 3 - 6 - 11 --- 3,6 are forbidden +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 10,11 are forbidden PREPARE v4e4q90 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[3, 6]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[10, 11]::integer[], false); PREPARE v4e4q91 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2,4]::BIGINT[], -1, -1, -1), - ('v', 6, ARRAY[11]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[6,15]::BIGINT[], -1, -1, -1), + ('v', 11, ARRAY[12]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e4q90', 'v4e4q91', 'graph_e_2_3_5_11 QUERY 9: Directed graph with four edges and 3 and 6 forbidden vertex'); --- GRAPH: 4 - 3 - 2 3 - 6 - 11 --- 3,11 are forbidden +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 10,12 are forbidden PREPARE v4e4q100 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[3, 11]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[10, 12]::integer[], false); PREPARE v4e4q101 AS SELECT * FROM (VALUES - ('v', 3, ARRAY[2,4]::BIGINT[], -1, -1, -1) + ('v', 10, ARRAY[6,15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e4q100', 'v4e4q101', 'graph_e_2_3_5_11 QUERY 10: Directed graph with four edges and 3 and 11 forbidden vertex'); --- GRAPH: 4 - 3 - 2 3 - 6 - 11 --- 6,11 are forbidden +-- GRAPH: 15 -> 10 -> 6 10 -> 11 -> 12 +-- 11,12 are forbidden PREPARE v4e4q110 AS SELECT * FROM pgr_contraction( 'graph_e_2_3_5_11', - ARRAY[1]::INTEGER[], 1, ARRAY[6, 11]::integer[], false); + ARRAY[1]::INTEGER[], 5, ARRAY[11, 12]::integer[], false); PREPARE v4e4q111 AS SELECT * FROM (VALUES - ('v', 6, ARRAY[2,3,4]::BIGINT[], -1, -1, -1) + ('v', 11, ARRAY[6,10,15]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq('v4e4q110', 'v4e4q111', 'graph_e_2_3_5_11 QUERY 11: Directed graph with four edges and 6 and 11 forbidden vertex'); diff --git a/pgtap/contraction/deadend/undirected/small_ids.pg b/pgtap/contraction/deadend/undirected/small_ids.pg deleted file mode 100644 index eaa4f04a752..00000000000 --- a/pgtap/contraction/deadend/undirected/small_ids.pg +++ /dev/null @@ -1,128 +0,0 @@ - -/*PGR-GNU***************************************************************** - -Copyright (c) 2018 pgRouting developers -Mail: project@pgrouting.org - ------- -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - ********************************************************************PGR-GNU*/ -BEGIN; - -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(6); - --- input: 1 - 2, forbidden = 20 --- output: 2{1} ---Checking dead end contraction with invalid forbidden vertices -PREPARE q1 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', - ARRAY[1]::integer[], 1, ARRAY[20]::BIGINT[], false); - -SELECT set_eq('q1', - $$SELECT - 'v'::CHAR AS type, - 2::BIGINT AS id, - ARRAY[1]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - --- Checking dead end contraction with no dead end node --- input: 3-2, 2-5, 5-6, 3-6 --q1 --- output: -PREPARE q2 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 OR id = 4 OR id = 5 OR id = 8', - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -SELECT is_empty('q2'); - --- input: 1 - 2 --- outputt: 2{1} ---Checking dead end contraction for single dead end node -PREPARE q3 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -SELECT set_eq('q3', - $$SELECT - 'v'::CHAR AS type, - 2::BIGINT AS id, - ARRAY[1]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - --- Checking dead end contraction for two dead end nodes --- input: 2 - 3 - 4 --- output: 4{2, 3} -PREPARE q4 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 or id = 3', - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -SELECT set_eq('q4', - $$SELECT - 'v'::CHAR AS type, - 4::BIGINT AS id, - ARRAY[2,3]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - ---Checking dead end contraction for multiple dead end nodes --- input: 1 - 2 - 3 - 4 --- step: 2{1} - 3 - 4 --- output: 4{1, 2, 3} -PREPARE q5 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 OR id = 2 or id = 3', - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -PREPARE sol5 AS -SELECT type, id, contracted_vertices, source, target, cost -FROM (VALUES - ('v'::CHAR, 4::BIGINT, ARRAY[1, 2, 3]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT) -) AS t(type, id, contracted_vertices, source, target, cost ); - -SELECT set_eq('q5', 'sol5'); - --- all table --- 15{14} --- 16{17} --- 10{13} --- 5{7,8} --- 2{1} --- Checking dead end contraction for sample data -PREPARE q6 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -PREPARE sol6 AS -SELECT type, id, contracted_vertices, source, target, cost -FROM (VALUES - ('v'::CHAR, 2::BIGINT, ARRAY[1]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), - ('v', 5, ARRAY[7,8], -1, -1, -1), - ('v', 10, ARRAY[13], -1, -1, -1), - ('v', 15, ARRAY[14], -1, -1, -1), - ('v', 17, ARRAY[16], -1, -1, -1) -) AS t(type, id, contracted_vertices, source, target, cost ); - -SELECT set_eq('q6', 'sol6'); - -SELECT finish(); -ROLLBACK; diff --git a/pgtap/contraction/deadend/undirected/super_big_ids.pg b/pgtap/contraction/deadend/undirected/super_big_ids.pg deleted file mode 100644 index c4ba7fa8486..00000000000 --- a/pgtap/contraction/deadend/undirected/super_big_ids.pg +++ /dev/null @@ -1,139 +0,0 @@ - -/*PGR-GNU***************************************************************** - -Copyright (c) 2018 pgRouting developers -Mail: project@pgrouting.org - ------- -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - ********************************************************************PGR-GNU*/ -BEGIN; - -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(6); - -UPDATE edge_table -SET id = id + POWER(10, 12), - source = source + POWER(10, 12), - target = target + POWER(10, 12); - - --- input: 1 - 2, forbidden = 20 --- output: 2{1} ---Checking dead end contraction with invalid forbidden vertices -PREPARE q1 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id = 1000000000001$$, - ARRAY[1]::integer[], 1, ARRAY[20]::BIGINT[], false); - -SELECT set_eq('q1', - $$SELECT - 'v'::CHAR AS type, - 1000000000002::BIGINT AS id, - ARRAY[1000000000001]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - --- Checking dead end contraction with no dead end node --- input: 3-2, 2-5, 5-6, 3-6 --q1 --- output: -PREPARE q2 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id IN (1000000000002, 1000000000004, 1000000000005, 1000000000008)$$, - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -SELECT is_empty('q2'); - --- input: 1 - 2 --- outputt: 2{1} ---Checking dead end contraction for single dead end node -PREPARE q3 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id = 1000000000001$$, - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -SELECT set_eq('q3', - $$SELECT - 'v'::CHAR AS type, - 1000000000002::BIGINT AS id, - ARRAY[1000000000001]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - --- Checking dead end contraction for two dead end nodes --- input: 2 - 3 - 4 --- output: 4{2, 3} -PREPARE q4 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id IN (1000000000002, 1000000000003)$$, - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -SELECT set_eq('q4', - $$SELECT - 'v'::CHAR AS type, - 1000000000004::BIGINT AS id, - ARRAY[1000000000002,1000000000003]::BIGINT[] AS contracted_vertices, - -1::BIGINT AS source, - -1::BIGINT AS target, - -1::FLOAT AS cost$$); - ---Checking dead end contraction for multiple dead end nodes --- input: 1 - 2 - 3 - 4 --- step: 2{1} - 3 - 4 --- output: 4{1, 2, 3} -PREPARE q5 AS -SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE id IN (1000000000001, 1000000000002, 1000000000003)$$, - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -PREPARE sol5 AS -SELECT type, id, contracted_vertices, source, target, cost -FROM (VALUES - ('v'::CHAR, 1000000000004::BIGINT, ARRAY[1000000000001, 1000000000002, 1000000000003]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT) -) AS t(type, id, contracted_vertices, source, target, cost ); - -SELECT set_eq('q5', 'sol5'); - --- all table --- 15{14} --- 16{17} --- 10{13} --- 5{7,8} --- 2{1} --- Checking dead end contraction for sample data -PREPARE q6 AS -SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], false); - -PREPARE sol6 AS -SELECT type, id, contracted_vertices, source, target, cost -FROM (VALUES - ('v', 1000000000002::BIGINT, ARRAY[1000000000001]::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), - ('v', 1000000000005, ARRAY[1000000000007,1000000000008], -1, -1, -1), - ('v', 1000000000010, ARRAY[1000000000013], -1, -1, -1), - ('v', 1000000000015, ARRAY[1000000000014], -1, -1, -1), - ('v', 1000000000017, ARRAY[1000000000016], -1, -1, -1) -) AS t(type, id, contracted_vertices, source, target, cost ); - -SELECT set_eq('q6', 'sol6'); - -SELECT finish(); -ROLLBACK; diff --git a/pgtap/contraction/edge_cases/cycle_directed.pg b/pgtap/contraction/edge_cases/cycle_directed.pg index c61c5e079d5..896cc14bbff 100644 --- a/pgtap/contraction/edge_cases/cycle_directed.pg +++ b/pgtap/contraction/edge_cases/cycle_directed.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(30); SET client_min_messages TO WARNING; @@ -33,19 +33,19 @@ SELECT * FROM ( VALUES ('v', -1, '{}', -1, -1, -1) ) AS t(type, id, contracted_v PREPARE v2e1q10 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1', ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); PREPARE v2e1q11 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1', ARRAY[1, 1]::integer[], 1, ARRAY[]::integer[], true); SELECT set_eq('v2e1q10', 'v2e1q11', '1: Directed graph with single edge'); PREPARE v2e1q12 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1', ARRAY[1]::integer[], 2, ARRAY[]::integer[], true); SELECT set_eq('v2e1q10', 'v2e1q12', '1: Directed graph with single edge'); @@ -56,19 +56,19 @@ SELECT set_eq('v2e1q11', 'v2e1q12', '1: Directed graph with single edge'); PREPARE v3e2q10 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2', ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); PREPARE v3e2q11 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2', ARRAY[1, 1]::integer[], 1, ARRAY[]::integer[], true); SELECT set_eq('v2e1q10', 'v2e1q11', '1: Directed graph with two edges'); PREPARE v3e2q12 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2', ARRAY[1]::integer[], 2, ARRAY[]::integer[], true); SELECT set_eq('v3e2q10', 'v3e2q12', '1: Directed graph with two edges'); @@ -80,19 +80,19 @@ SELECT set_eq('v3e2q11', 'v3e2q12', '1: Directed graph with two edges'); PREPARE v4e3q10 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3', ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); PREPARE v4e3q11 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3', ARRAY[1, 1]::integer[], 1, ARRAY[]::integer[], true); SELECT set_eq('v4e3q10', 'v4e3q11', '1: Directed graph with three edges'); PREPARE v4e3q12 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3', ARRAY[1]::integer[], 2, ARRAY[]::integer[], true); SELECT set_eq('v4e3q10', 'v4e3q12', '1: Directed graph with three edges'); @@ -100,19 +100,19 @@ SELECT set_eq('v4e3q11', 'v4e3q12', '1: Directed graph with three edges'); PREPARE v4e3q13 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5 or id = 6', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5 or id = 6', ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); PREPARE v4e3q14 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5 or id = 6', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5 or id = 6', ARRAY[1, 1]::integer[], 1, ARRAY[]::integer[], true); SELECT set_eq('v4e3q13', 'v4e3q14', '1: Directed graph with three edges'); PREPARE v4e3q15 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5 or id = 6', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5 or id = 6', ARRAY[1]::integer[], 2, ARRAY[]::integer[], true); SELECT set_eq('v4e3q13', 'v4e3q15', '1: Directed graph with three edges'); @@ -122,19 +122,19 @@ SELECT set_eq('v4e3q14', 'v4e3q15', '1: Directed graph with three edges'); PREPARE v4e4q10 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5 or id = 6 or id = 8', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5 or id = 6 or id = 8', ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); PREPARE v4e4q11 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5 or id = 6 or id = 8', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5 or id = 6 or id = 8', ARRAY[1, 1]::integer[], 1, ARRAY[]::integer[], true); SELECT set_eq('v4e4q10', 'v4e4q11', '9: Directed graph with four edges '); PREPARE v4e4q12 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5 or id = 6 or id = 8', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5 or id = 6 or id = 8', ARRAY[1]::integer[], 2, ARRAY[]::integer[], true); SELECT set_eq('v4e4q10', 'v4e4q12', '9: Directed graph with four edges '); @@ -142,19 +142,19 @@ SELECT set_eq('v4e4q11', 'v4e4q12', '9: Directed graph with four edges '); PREPARE v6e4q10 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3 or id = 4', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3 or id = 4', ARRAY[1]::integer[], 1, ARRAY[]::integer[], true); PREPARE v6e4q11 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3 or id = 4', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3 or id = 4', ARRAY[1, 1]::integer[], 1, ARRAY[]::integer[], true); SELECT set_eq('v6e4q10', 'v6e4q11', '11: Directed graph with four edges and no forbidden vertices'); PREPARE v6e4q12 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3 or id = 4', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3 or id = 4', ARRAY[1]::integer[], 2, ARRAY[]::integer[], true); SELECT set_eq('v6e4q10', 'v6e4q12', '11: Directed graph with four edges and no forbidden vertices'); @@ -165,19 +165,19 @@ SELECT set_eq('v6e4q11', 'v6e4q12', '11: Directed graph with four edges and no f -- TWO EDGES PREPARE v3e2q20 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2', ARRAY[2]::integer[], 1, ARRAY[]::integer[], true); PREPARE v3e2q21 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2', ARRAY[2, 2]::integer[], 1, ARRAY[]::integer[], true); SELECT set_eq('v3e2q20', 'v3e2q21', '1: Directed graph with two edges and no forbidden vertices'); PREPARE v3e2q22 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2', ARRAY[2]::integer[], 2, ARRAY[]::integer[], true); SELECT set_eq('v3e2q20', 'v3e2q22', '1: Directed graph with two edges and no forbidden vertices'); @@ -188,19 +188,19 @@ SELECT set_eq('v3e2q21', 'v3e2q22', '1: Directed graph with two edges and no for PREPARE v4e3q20 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3', ARRAY[2]::integer[], 1, ARRAY[]::integer[], true); PREPARE v4e3q21 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3', ARRAY[2, 2]::integer[], 1, ARRAY[]::integer[], true); SELECT set_eq('v4e3q20', 'v4e3q21', '5: Directed graph with three edges and no forbidden vertices'); PREPARE v4e3q22 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3', ARRAY[2]::integer[], 2, ARRAY[]::integer[], true); SELECT set_eq('v4e3q20', 'v4e3q22', '5: Directed graph with three edges and no forbidden vertices'); @@ -209,19 +209,19 @@ SELECT set_eq('v4e3q21', 'v4e3q22', '5: Directed graph with three edges and no f -- FOUR EDGES PREPARE v4e4q20 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 9 or id = 10 or id = 11', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 9 or id = 10 or id = 11', ARRAY[2]::integer[], 1, ARRAY[]::integer[], true); PREPARE v4e4q21 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 9 or id = 10 or id = 11', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 9 or id = 10 or id = 11', ARRAY[2, 2]::integer[], 1, ARRAY[]::integer[], true); SELECT set_eq('v4e4q20', 'v4e4q21', '5: Directed graph with four edges and no forbidden vertices'); PREPARE v4e4q22 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 9 or id = 10 or id = 11', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 9 or id = 10 or id = 11', ARRAY[2]::integer[], 2, ARRAY[]::integer[], true); SELECT set_eq('v4e4q20', 'v4e4q22', '5: Directed graph with four edges and no forbidden vertices'); @@ -229,19 +229,19 @@ SELECT set_eq('v4e4q21', 'v4e4q22', '5: Directed graph with four edges and no fo PREPARE v4e4q23 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 or id = 9 or id = 12 or id = 13', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 2 or id = 9 or id = 12 or id = 13', ARRAY[2]::integer[], 1, ARRAY[]::integer[], true); PREPARE v4e4q24 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 or id = 9 or id = 12 or id = 13', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 2 or id = 9 or id = 12 or id = 13', ARRAY[2, 2]::integer[], 1, ARRAY[]::integer[], true); SELECT set_eq('v4e4q23', 'v4e4q24', '5: Directed graph with four edges and no forbidden vertices'); PREPARE v4e4q25 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 or id = 9 or id = 12 or id = 13', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 2 or id = 9 or id = 12 or id = 13', ARRAY[2]::integer[], 2, ARRAY[]::integer[], true); SELECT set_eq('v4e4q23', 'v4e4q25', '5: Directed graph with four edges and no forbidden vertices'); diff --git a/pgtap/contraction/edge_cases/cycle_undirected.pg b/pgtap/contraction/edge_cases/cycle_undirected.pg index 9364e90a237..a47d98abff7 100644 --- a/pgtap/contraction/edge_cases/cycle_undirected.pg +++ b/pgtap/contraction/edge_cases/cycle_undirected.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(36); SET client_min_messages TO WARNING; @@ -32,19 +32,19 @@ SELECT * FROM ( VALUES ('v', -1, '{}', -1, -1, -1) ) AS t(type, id, contracted_v -- SINGLE EDGE PREPARE v2e1q10 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1', ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); PREPARE v2e1q11 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1', ARRAY[1, 1]::integer[], 1, ARRAY[]::integer[], false); SELECT set_eq('v2e1q10', 'v2e1q11', '1: Undirected graph with single edge and no forbidden vertices'); PREPARE v2e1q12 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1', ARRAY[1]::integer[], 2, ARRAY[]::integer[], false); SELECT set_eq('v2e1q10', 'v2e1q12', '1: Undirected graph with single edge and no forbidden vertices'); @@ -53,19 +53,19 @@ SELECT set_eq('v2e1q11', 'v2e1q12', '1: Undirected graph with single edge and no -- TWO EDGES PREPARE v3e2q10 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2', ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); PREPARE v3e2q11 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2', ARRAY[1, 1]::integer[], 1, ARRAY[]::integer[], false); SELECT set_eq('v3e2q10', 'v3e2q11', '1: Undirected graph with single edge and no forbidden vertices'); PREPARE v3e2q12 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2', ARRAY[1]::integer[], 2, ARRAY[]::integer[], false); SELECT set_eq('v3e2q10', 'v3e2q12', '1: Undirected graph with single edge and no forbidden vertices'); @@ -73,19 +73,19 @@ SELECT set_eq('v3e2q11', 'v3e2q12', '1: Undirected graph with single edge and no PREPARE v3e2q13 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5', ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); PREPARE v3e2q14 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5', ARRAY[1, 1]::integer[], 1, ARRAY[]::integer[], false); SELECT set_eq('v3e2q13', 'v3e2q14', '4: Undirected graph with two edges and no forbidden vertices'); PREPARE v3e2q15 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5', ARRAY[1]::integer[], 2, ARRAY[]::integer[], false); SELECT set_eq('v3e2q13', 'v3e2q15', '4: Undirected graph with two edges and no forbidden vertices'); @@ -94,19 +94,19 @@ SELECT set_eq('v3e2q14', 'v3e2q15', '4: Undirected graph with two edges and no f -- THREE EDGES PREPARE v4e3q10 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3', ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); PREPARE v4e3q11 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3', ARRAY[1, 1]::integer[], 1, ARRAY[]::integer[], false); SELECT set_eq('v4e3q10', 'v4e3q11', '5: Undirected graph with three edges and no forbidden vertices'); PREPARE v4e3q12 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3', ARRAY[1]::integer[], 2, ARRAY[]::integer[], false); SELECT set_eq('v4e3q10', 'v4e3q12', '5: Undirected graph with three edges and no forbidden vertices'); @@ -114,19 +114,19 @@ SELECT set_eq('v4e3q11', 'v4e3q12', '5: Undirected graph with three edges and no PREPARE v4e3q13 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5 or id = 6', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5 or id = 6', ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); PREPARE v4e3q14 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5 or id = 6', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5 or id = 6', ARRAY[1, 1]::integer[], 1, ARRAY[]::integer[], false); SELECT set_eq('v4e3q13', 'v4e3q14', '7: Undirected graph with three edges and no forbidden vertices'); PREPARE v4e3q15 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5 or id = 6', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5 or id = 6', ARRAY[1]::integer[], 2, ARRAY[]::integer[], false); SELECT set_eq('v4e3q13', 'v4e3q15', '7: Undirected graph with three edges and no forbidden vertices'); @@ -136,19 +136,19 @@ SELECT set_eq('v4e3q14', 'v4e3q15', '7: Undirected graph with three edges and no PREPARE v4e4q10 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5 or id = 6 or id = 8', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5 or id = 6 or id = 8', ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); PREPARE v4e4q11 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5 or id = 6 or id = 8', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5 or id = 6 or id = 8', ARRAY[1, 1]::integer[], 1, ARRAY[]::integer[], false); SELECT set_eq('v4e4q10', 'v4e4q11', '9: Undirected graph with four edges and no forbidden vertices'); PREPARE v4e4q12 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5 or id = 6 or id = 8', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5 or id = 6 or id = 8', ARRAY[1]::integer[], 2, ARRAY[]::integer[], false); SELECT set_eq('v4e4q10', 'v4e4q12', '9: Undirected graph with four edges and no forbidden vertices'); @@ -156,19 +156,19 @@ SELECT set_eq('v4e4q11', 'v4e4q12', '9: Undirected graph with four edges and no PREPARE v6e4q10 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3 or id = 4', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3 or id = 4', ARRAY[1]::integer[], 1, ARRAY[]::integer[], false); PREPARE v6e4q11 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3 or id = 4', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3 or id = 4', ARRAY[1, 1]::integer[], 1, ARRAY[]::integer[], false); SELECT set_eq('v6e4q10', 'v6e4q11', '11: Directed graph with four edges and no forbidden vertices'); PREPARE v6e4q12 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3 or id = 4', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3 or id = 4', ARRAY[1]::integer[], 2, ARRAY[]::integer[], false); SELECT set_eq('v6e4q10', 'v6e4q12', '11: Directed graph with four edges and no forbidden vertices'); @@ -180,19 +180,19 @@ SELECT set_eq('v6e4q11', 'v6e4q12', '11: Directed graph with four edges and no f -- TWO EDGES PREPARE v3e2q20 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2', ARRAY[2]::integer[], 1, ARRAY[]::integer[], false); PREPARE v3e2q21 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2', ARRAY[2, 2]::integer[], 1, ARRAY[]::integer[], false); SELECT set_eq('v3e2q20', 'v3e2q21', '1: Undirected graph with two edges and no forbidden vertices'); PREPARE v3e2q22 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2', ARRAY[2]::integer[], 2, ARRAY[]::integer[], false); SELECT set_eq('v3e2q20', 'v3e2q22', '1: Undirected graph with two edges and no forbidden vertices'); @@ -200,19 +200,19 @@ SELECT set_eq('v3e2q21', 'v3e2q22', '1: Undirected graph with two edges and no f PREPARE v3e2q23 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5', ARRAY[2]::integer[], 1, ARRAY[]::integer[], false); PREPARE v3e2q24 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5', ARRAY[2, 2]::integer[], 1, ARRAY[]::integer[], false); SELECT set_eq('v3e2q23', 'v3e2q24', '1: Undirected graph with two edges and no forbidden vertex'); PREPARE v3e2q25 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 or id = 5', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 or id = 5', ARRAY[2]::integer[], 2, ARRAY[]::integer[], false); SELECT set_eq('v3e2q23', 'v3e2q25', '1: Undirected graph with two edges and no forbidden vertex'); @@ -222,19 +222,19 @@ SELECT set_eq('v3e2q24', 'v3e2q25', '1: Undirected graph with two edges and no f PREPARE v4e3q20 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3', ARRAY[2]::integer[], 1, ARRAY[]::integer[], false); PREPARE v4e3q21 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3', ARRAY[2, 2]::integer[], 1, ARRAY[]::integer[], false); SELECT set_eq('v4e3q20', 'v4e3q21', '5: Undirected graph with three edges and no forbidden vertices'); PREPARE v4e3q22 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 2 or id = 3', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 2 or id = 3', ARRAY[2]::integer[], 2, ARRAY[]::integer[], false); SELECT set_eq('v4e3q20', 'v4e3q22', '5: Undirected graph with three edges and no forbidden vertices'); @@ -244,19 +244,19 @@ SELECT set_eq('v4e3q21', 'v4e3q22', '5: Undirected graph with three edges and no -- FOUR EDGES PREPARE v4e4q20 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 9 or id = 10 or id = 11', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 9 or id = 10 or id = 11', ARRAY[2]::integer[], 1, ARRAY[]::integer[], false); PREPARE v4e4q21 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 9 or id = 10 or id = 11', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 9 or id = 10 or id = 11', ARRAY[2, 2]::integer[], 1, ARRAY[]::integer[], false); SELECT set_eq('v4e4q20', 'v4e4q21', '5: Undirected graph with four edges and no forbidden vertices'); PREPARE v4e4q22 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1 or id = 9 or id = 10 or id = 11', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1 or id = 9 or id = 10 or id = 11', ARRAY[2]::integer[], 2, ARRAY[]::integer[], false); SELECT set_eq('v4e4q20', 'v4e4q22', '5: Undirected graph with four edges and no forbidden vertices'); @@ -264,19 +264,19 @@ SELECT set_eq('v4e4q21', 'v4e4q22', '5: Undirected graph with four edges and no PREPARE v4e4q23 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 or id = 9 or id = 12 or id = 13', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 2 or id = 9 or id = 12 or id = 13', ARRAY[2]::integer[], 1, ARRAY[]::integer[], false); PREPARE v4e4q24 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 or id = 9 or id = 12 or id = 13', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 2 or id = 9 or id = 12 or id = 13', ARRAY[2, 2]::integer[], 1, ARRAY[]::integer[], false); SELECT set_eq('v4e4q23', 'v4e4q24', '5: Directed graph with four edges and no forbidden vertices'); PREPARE v4e4q25 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 or id = 9 or id = 12 or id = 13', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 2 or id = 9 or id = 12 or id = 13', ARRAY[2]::integer[], 2, ARRAY[]::integer[], false); SELECT set_eq('v4e4q23', 'v4e4q25', '5: Directed graph with four edges and no forbidden vertices'); diff --git a/pgtap/contraction/edge_cases/issue_1002.pg b/pgtap/contraction/edge_cases/issue_1002.pg index 54c0fd007c0..b66f3bb31c4 100644 --- a/pgtap/contraction/edge_cases/issue_1002.pg +++ b/pgtap/contraction/edge_cases/issue_1002.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(3); SET client_min_messages TO WARNING; @@ -31,49 +31,49 @@ SET client_min_messages TO WARNING; PREPARE issue1004_r AS SELECT * FROM (VALUES - ('v', 4, ARRAY[2,3]::BIGINT[], -1, -1, -1) + ('v', 15, ARRAY[6,10]::BIGINT[], -1, -1, -1) ) AS t(type, id, contracted_vertices, source, target, cost ); PREPARE issue1004_q AS SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 or id = 3$$, - ARRAY[1]::integer[], 1, ARRAY[7]::BIGINT[], true); + $$SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 2 or id = 3 ORDER BY id$$, + ARRAY[1]::integer[], 1, ARRAY[1]::BIGINT[], true); -SELECT set_eq('issue1004_r', 'issue1004_q', 'Contraction any one of the forbidden vertices do not belong to graph'); +SELECT set_eq('issue1004_q', 'issue1004_r', 'Contraction any one of the forbidden vertices do not belong to graph'); ------ https://github.com/pgRouting/pgrouting/issues/1005 PREPARE issue1005_r AS SELECT * FROM (VALUES - ('e', -1, ARRAY[6, 11]::BIGINT[], 3, 12, 3) + ('e', -1, ARRAY[11,12]::BIGINT[], 10, 17, 3) ) AS t(type, id, contracted_vertices, source, target, cost ); PREPARE issue1005_q AS SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table + $$SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 5 OR id = 11 OR id = 13$$, ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true); -SELECT set_eq('issue1005_r', 'issue1005_q', 'Contraction any one of the forbidden vertices do not belong to graph'); +SELECT set_eq('issue1005_q', 'issue1005_r', 'Contraction any one of the forbidden vertices do not belong to graph'); ------ https://github.com/pgRouting/pgrouting/issues/1006 PREPARE issue1006_r AS SELECT * FROM (VALUES - ('e', -1, ARRAY[6,9,11,12]::BIGINT[], 5, 4, 3) + ('e', -1, ARRAY[11,12,16,17]::BIGINT[], 7, 15, 3) ) AS t(type, id, contracted_vertices, source, target, cost ); PREPARE issue1006_q AS SELECT * FROM pgr_contraction( - $$SELECT id, source, target, cost FROM edge_table WHERE id IN (8, 9, 11, 13) + $$SELECT id, source, target, cost FROM edges WHERE id IN (8, 9, 11, 13) UNION - SELECT id, target, source, reverse_cost FROM edge_table WHERE id IN (15, 16) AND reverse_cost > 0; + SELECT id, target, source, reverse_cost FROM edges WHERE id IN (15, 16) AND reverse_cost > 0; $$, ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true); -SELECT set_eq('issue1006_r', 'issue1006_q', 'Contraction any one of the forbidden vertices do not belong to graph'); +SELECT set_eq('issue1006_q', 'issue1006_r', 'Contraction any one of the forbidden vertices do not belong to graph'); SELECT finish(); diff --git a/pgtap/contraction/edge_cases/remaining_tests.pg b/pgtap/contraction/edge_cases/remaining_tests.pg index 0e9b6c4ce70..30740360e4e 100644 --- a/pgtap/contraction/edge_cases/remaining_tests.pg +++ b/pgtap/contraction/edge_cases/remaining_tests.pg @@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(49); SET client_min_messages TO WARNING; SELECT has_function('pgr_contraction'); @@ -69,7 +69,7 @@ BEGIN END IF; start_sql = start_sql || p || ', '; END LOOP; -end_sql = ' FROM edge_table $$, ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true)'; +end_sql = ' FROM edges $$, ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true)'; query := start_sql || parameter || '::SMALLINT ' || end_sql; RETURN query SELECT lives_ok(query); @@ -109,7 +109,7 @@ BEGIN END IF; start_sql = start_sql || p || ', '; END LOOP; -end_sql = ' FROM edge_table $$, ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true)'; +end_sql = ' FROM edges $$, ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true)'; query := start_sql || parameter || '::SMALLINT ' || end_sql; RETURN query SELECT lives_ok(query); @@ -162,27 +162,27 @@ SELECT test_anyNumerical('pgr_contraction', PREPARE q10 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[]); PREPARE q11 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[], directed:= true); PREPARE q12 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[], directed:= false); PREPARE q13 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[], max_cycles:= 1, directed:= false); @@ -191,53 +191,53 @@ FROM pgr_contraction( PREPARE q1 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[], 1, ARRAY[ [2,3,4,5], [4,5,6,7] ]::integer[][], true); -- Contraction order array cannot be empty PREPARE q2 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[]::integer[], 1, ARRAY[]::integer[], true); -- Forbidden vertices should be an integer array PREPARE q3 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[], 1, ARRAY[ ]::integer[], true); PREPARE q4 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[], 1, ARRAY[ ]::bigint[], true); PREPARE q5 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[], 1, ARRAY[ ]::smallint[], true); /* PREPARE q5 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[ ]::bigint[], ARRAY[0]::FLOAT8[], 1, true); */ -- Contraction order array should be an integer array PREPARE q7 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::bigint[], 1, ARRAY[ ]::bigint[], true); PREPARE q8 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::integer[], 1, ARRAY[ ]::bigint[]); PREPARE q9 AS SELECT * FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1]::smallint[], 1, ARRAY[ ]::bigint[]); SELECT throws_ok('q1', 'XX000', 'One dimension expected', diff --git a/pgtap/contraction/linear/directed/compare_dijkstra.pg b/pgtap/contraction/linear/directed/compare_dijkstra.pg index 40a8fca34e6..f1b4574335f 100644 --- a/pgtap/contraction/linear/directed/compare_dijkstra.pg +++ b/pgtap/contraction/linear/directed/compare_dijkstra.pg @@ -15,81 +15,81 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; SELECT plan(334); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -ALTER SEQUENCE edge_table_id_seq RESTART WITH 19; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +ALTER SEQUENCE edges_id_seq RESTART WITH 19; --step 1: Initial tables -SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table$$); -SELECT isnt_empty($$SELECT id FROM edge_table_vertices_pgr$$); +SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edges$$); +SELECT isnt_empty($$SELECT id FROM vertices$$); -- add extra columns to the edges and vertices table -ALTER TABLE edge_table +ALTER TABLE edges ADD is_contracted BOOLEAN DEFAULT false, ADD contracted_vertices integer[]; -ALTER TABLE edge_table_vertices_pgr +ALTER TABLE vertices ADD is_contracted BOOLEAN DEFAULT false, ADD contracted_vertices integer[]; -SELECT has_column('edge_table', 'is_contracted'); -SELECT has_column('edge_table_vertices_pgr', 'is_contracted'); -SELECT has_column('edge_table', 'contracted_vertices'); -SELECT has_column('edge_table_vertices_pgr', 'contracted_vertices'); +SELECT has_column('edges', 'is_contracted'); +SELECT has_column('vertices', 'is_contracted'); +SELECT has_column('edges', 'contracted_vertices'); +SELECT has_column('vertices', 'contracted_vertices'); SELECT * INTO contraction_info FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true); + 'SELECT id, source, target, cost, reverse_cost FROM edges', + ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true); PREPARE c_info AS -SELECT type, id, contracted_vertices, source, target, cost +SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[8], 5, 7, '2.085'), - ('e', -2, ARRAY[8], 7, 5, '2.085') -) AS t(type, id, contracted_vertices, source, target, cost ); + ('e', -1, ARRAY[3], 1, 7, '2.085'), + ('e', -2, ARRAY[3], 7, 1, '2.085') +) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq( - $$SELECT type, id, contracted_vertices, source, target, cost::TEXT FROM contraction_info$$, + $$SELECT type, id, contracted_vertices, source, target, cost::TEXT FROM contraction_info$$, 'c_info', 'Contraction results'); -- add the new edges -INSERT INTO edge_table(source, target, cost, reverse_cost, contracted_vertices, is_contracted) -SELECT source, target, cost, -1, contracted_vertices, true +INSERT INTO edges(source, target, cost, reverse_cost, contracted_vertices, is_contracted) +SELECT source, target, cost, -1, contracted_vertices, true FROM contraction_info WHERE type = 'e'; -- Indicate vertices that were contracted -UPDATE edge_table_vertices_pgr +UPDATE vertices SET is_contracted = true WHERE id IN (SELECT unnest(contracted_vertices) FROM contraction_info); -- add the contracted vertices on the vertices table -UPDATE edge_table_vertices_pgr +UPDATE vertices SET contracted_vertices = contraction_info.contracted_vertices FROM contraction_info -WHERE type = 'v' AND edge_table_vertices_pgr.id = contraction_info.id; +WHERE type = 'v' AND vertices.id = contraction_info.id; SELECT id - FROM edge_table + FROM edges WHERE is_contracted; SELECT set_eq($$SELECT id - FROM edge_table + FROM edges WHERE NOT is_contracted$$, - $$SELECT unnest(ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])$$ + $$SELECT unnest(ARRAY[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18])$$ ); SELECT set_eq($$SELECT id - FROM edge_table + FROM edges WHERE is_contracted$$, $$SELECT unnest(ARRAY[19, 20])$$, 'Edges id added to edge table' @@ -97,36 +97,36 @@ SELECT set_eq($$SELECT id -- the contracted graph PREPARE c_graph AS -SELECT source, target, cost::TEXT, reverse_cost::TEXT FROM edge_table +SELECT source, target, cost::TEXT, reverse_cost::TEXT FROM edges WHERE - EXISTS (SELECT id FROM edge_table_vertices_pgr AS v WHERE NOT is_contracted AND v.id = edge_table.source) + EXISTS (SELECT id FROM vertices AS v WHERE NOT is_contracted AND v.id = edges.source) AND - EXISTS (SELECT id FROM edge_table_vertices_pgr AS v WHERE NOT is_contracted AND v.id = edge_table.target); + EXISTS (SELECT id FROM vertices AS v WHERE NOT is_contracted AND v.id = edges.target); PREPARE c_expected_graph AS -SELECT source, target, cost, reverse_cost +SELECT source, target, cost, reverse_cost FROM (VALUES - ( 1, 2, '1.001', '1.001'), - ( 2, 3, '-0.996', '1.004'), - ( 3, 4, '-0.991', '1.009'), - ( 2, 5, '1.016', '1.016'), - ( 3, 6, '1.025', '-0.975'), - ( 5, 6, '1.064', '1.064'), - ( 6, 9, '1.081', '1.081'), - ( 5, 10, '1.1', '1.1'), - ( 6, 11, '1.121', '-0.879'), - (10, 11, '1.144', '-0.856'), - (11, 12, '1.169', '-0.831'), - (10, 13, '1.196', '1.196'), - ( 9, 12, '1.225', '1.225'), - ( 4, 9, '1.256', '1.256'), - (14, 15, '1.289', '1.289'), - (16, 17, '1.324', '1.324'), - ( 7, 5, '2.085', '-1'), - ( 5, 7, '2.085', '-1')) -AS t(source, target, cost, reverse_cost); - -SELECT set_eq('c_graph', 'c_expected_graph', 'The contracted graph'); + (5, 6, '1.001', '1.001'), + (6, 10, '-0.996', '1.004'), + (10, 15, '-0.991', '1.009'), + (6, 7, '1.016', '1.016'), + (10, 11, '1.025', '-0.975'), + (7, 11, '1.064', '1.064'), + (11, 16, '1.081', '1.081'), + (7, 8, '1.1', '1.1'), + (11, 12, '1.121', '-0.879'), + (8, 12, '1.144', '-0.856'), + (12, 17, '1.169', '-0.831'), + (8, 9, '1.196', '1.196'), + (16, 17, '1.225', '1.225'), + (15, 16, '1.256', '1.256'), + (2, 4, '1.289', '1.289'), + (13, 14, '1.324', '1.324'), + (1, 7, '2.085', '-1'), + (7, 1, '2.085', '-1')) +AS t(source, target, cost, reverse_cost); + +SELECT set_eq('c_graph', 'c_expected_graph', 'The contracted graph'); CREATE OR REPLACE FUNCTION compare_dijkstra( BIGINT, BIGINT) @@ -139,44 +139,44 @@ BEGIN WITH contracted_section AS ( SELECT unnest(contracted_vertices) AS id - FROM edge_table_vertices_pgr + FROM vertices WHERE ARRAY[%1$s, %2$s] && contracted_vertices UNION SELECT unnest(contracted_vertices) AS id - FROM edge_table + FROM edges WHERE ARRAY[%1$s, %2$s] && contracted_vertices ), vertices AS ( - SELECT id FROM edge_table_vertices_pgr + SELECT id FROM vertices WHERE NOT is_contracted OR id IN (SELECT id FROM contracted_section) ) - SELECT id, source, target, cost, reverse_cost FROM edge_table + SELECT id, source, target, cost, reverse_cost FROM edges WHERE - EXISTS (SELECT id FROM vertices WHERE vertices.id = edge_table.source) + EXISTS (SELECT id FROM vertices WHERE vertices.id = edges.source) AND - EXISTS (SELECT id FROM vertices WHERE vertices.id = edge_table.target) - $query$, $1::BIGINT, $2::BIGINT); + EXISTS (SELECT id FROM vertices WHERE vertices.id = edges.target) + $query$, $1::BIGINT, $2::BIGINT); -- set client_min_messages TO notice; -- raise notice '%', graph_q; CREATE TEMP TABLE nodes_on_graph AS WITH dijkstra_r AS ( - SELECT edge, node FROM pgr_dijkstra(graph_q, $1::BIGINT, $2::BIGINT, true)) + SELECT edge, node FROM pgr_dijkstra(graph_q, $1::BIGINT, $2::BIGINT, true)) SELECT node FROM dijkstra_r UNION SELECT unnest(contracted_vertices) - FROM dijkstra_r JOIN edge_table ON (edge = id) WHERE is_contracted = true; + FROM dijkstra_r JOIN edges ON (edge = id) WHERE is_contracted = true; CREATE TEMP TABLE dijkstra_contracted AS - SELECT * FROM pgr_dijkstra($$SELECT id, source, target, cost, reverse_cost - FROM edge_table + SELECT * FROM pgr_dijkstra($$SELECT id, source, target, cost, reverse_cost + FROM edges WHERE contracted_vertices IS NULL AND source IN (SELECT * FROM nodes_on_graph) - AND target IN (SELECT * FROM nodes_on_graph)$$, $1::BIGINT, $2::BIGINT, true); + AND target IN (SELECT * FROM nodes_on_graph)$$, $1::BIGINT, $2::BIGINT, true); CREATE TEMP TABLE dijkstra_normal AS - SELECT * FROM pgr_dijkstra($$SELECT id, source, target, cost, reverse_cost - FROM edge_table WHERE id < 19$$, $1::BIGINT, $2::BIGINT, true); + SELECT * FROM pgr_dijkstra($$SELECT id, source, target, cost, reverse_cost + FROM edges WHERE id < 19$$, $1::BIGINT, $2::BIGINT, true); RETURN QUERY SELECT set_eq( $$SELECT * FROM dijkstra_contracted$$, diff --git a/pgtap/contraction/linear/directed/edge_cases.pg b/pgtap/contraction/linear/directed/edge_cases.pg index a1517a2af5e..eebae547f57 100644 --- a/pgtap/contraction/linear/directed/edge_cases.pg +++ b/pgtap/contraction/linear/directed/edge_cases.pg @@ -19,321 +19,321 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(25); -- TESTING ONE CYCLE OF LINEAR CONTRACTION FOR A DIRECTED GRAPH --- GRAPH 1 - 2 <- 3 +-- GRAPH 5 - 6 <- 10 PREPARE graph_e_1_2 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table WHERE id IN (1, 2); +FROM edges WHERE id IN (1, 2); --- GRAPH 1 - 2 - 5 +-- GRAPH 5 - 6 - 7 PREPARE graph_e_1_4 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table WHERE id IN (1, 4); +FROM edges WHERE id IN (1, 4); --- GRAPH 6 -> 11 <- 10 +-- GRAPH 11 -> 12 <- 8 PREPARE graph_e_11_12 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table WHERE id IN (11, 12); +FROM edges WHERE id IN (11, 12); --- GRAPH 4 -> 3 -> 6 -> 11 +-- GRAPH 15 -> 10 -> 11 -> 12 PREPARE graph_e_3_5_11 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table WHERE id IN (3, 5, 11); +FROM edges WHERE id IN (3, 5, 11); --- GRAPH 6 -> 11 -> 12 - 9 - 6 +-- GRAPH 11 -> 12 -> 17 - 16 - 11 PREPARE graph_e_9_11_13_15 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table WHERE id IN (9, 11, 13, 15) ORDER BY id; +FROM edges WHERE id IN (9, 11, 13, 15) ORDER BY id; -- TWO EDGES --- GRAPH 1 - 2 <- 3 +-- GRAPH 5 - 6 <- 10 -- no forbidden vertices PREPARE v3e2q10 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_1_2', - ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[]::INTEGER[], true); SELECT is_empty('v3e2q10', 'graph_e_1_2 QUERY 1: Directed graph with two edges and no forbidden vertices'); --- GRAPH 1 - 2 <- 3 --- 2 is forbidden +-- GRAPH 5 - 6 <- 10 +-- 6 is forbidden PREPARE v3e2q20 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_1_2', - ARRAY[2]::INTEGER[], 1, ARRAY[2]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[6]::INTEGER[], true); SELECT is_empty('v3e2q20', 'graph_e_1_2 QUERY 2: Directed graph with two edges and 2 is forbidden vertex'); --- GRAPH 1 - 2 - 5 +-- GRAPH 5 - 6 - 7 PREPARE graph_e_1_4_q1 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_1_4', - ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[]::INTEGER[], true); PREPARE graph_e_1_4_sol1 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[2]::BIGINT[], 1, 5, 2), - ('e', -2, ARRAY[2]::BIGINT[], 5, 1, 2)) + ('e', -1, ARRAY[6]::BIGINT[], 7, 5, 2), + ('e', -2, ARRAY[6]::BIGINT[], 5, 7, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_e_1_4_q1', 'graph_e_1_4_sol1', 'graph_e_1_4 QUERY 1: Directed graph with two edges and no forbidden vertices'); --- GRAPH 1 - 2 - 5 --- 2 is forbidden +-- GRAPH 5 - 6 - 7 +-- 6 is forbidden PREPARE graph_e_1_4_q2 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_1_4', - ARRAY[2]::INTEGER[], 1, ARRAY[2]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[6]::INTEGER[], true); SELECT is_empty('graph_e_1_4_q2', 'graph_e_1_4 QUERY 2: Directed graph with two edges and 2 is forbidden vertex'); --- GRAPH 6 -> 11 <- 10 +-- GRAPH 11 -> 12 <- 8 -- no forbidden vertices PREPARE v3e2q30 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_11_12', - ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[]::INTEGER[], true); SELECT is_empty('v3e2q30', 'graph_e_11_12 QUERY 1: Directed graph with two edges and no forbidden vertex'); -- THREE EDGES --- GRAPH 4 -> 3 -> 6 -> 11 +-- GRAPH 15 -> 10 -> 11 -> 12 -- no forbidden vertices PREPARE v4e3q10 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_3_5_11', - ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[]::INTEGER[], true); PREPARE v4e3q11 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[3, 6]::BIGINT[], 4, 11, 3)) + ('e', -1, ARRAY[10, 11]::BIGINT[], 15, 12, 3)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('v4e3q10', 'v4e3q11', 'graph_e_3_5_11 QUERY 1: Directed graph with three edges and no forbidden vertices'); --- GRAPH 4 -> 3 -> 6 ->11 --- 3 is forbidden +-- GRAPH 15 -> 10 -> 11 ->12 +-- 10 is forbidden PREPARE v4e3q20 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_3_5_11', - ARRAY[2]::INTEGER[], 1, ARRAY[3]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[10]::INTEGER[], true); PREPARE v4e3q21 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[6]::BIGINT[], 3, 11, 2)) + ('e', -1, ARRAY[11]::BIGINT[], 10, 12, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('v4e3q20', 'v4e3q21', 'graph_e_3_5_11 QUERY 2: Directed graph with three edges and 3 is forbidden vertices'); --- GRAPH 4 -> 3 -> 6 -> 11 --- 6 is forbidden +-- GRAPH 15 -> 10 -> 11 -> 12 +-- 11 is forbidden PREPARE v4e3q30 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_3_5_11', - ARRAY[2]::INTEGER[], 1, ARRAY[6]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[11]::INTEGER[], true); PREPARE v4e3q31 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[3]::BIGINT[], 4, 6, 2)) + ('e', -1, ARRAY[10]::BIGINT[], 15, 11, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('v4e3q30', 'v4e3q31', 'graph_e_3_5_11 QUERY 3: Directed graph with three edges and 6 is forbidden vertices'); --- 3, 6 are forbidden +-- 10, 11 are forbidden PREPARE v4e3q40 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_3_5_11', - ARRAY[2]::INTEGER[], 1, ARRAY[3, 6]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[10, 11]::INTEGER[], true); SELECT is_empty('v4e3q40', 'graph_3_5_11 QUERY 4: Directed graph with three edges and 3, 6 are forbidden vertices'); -- FOUR EDGES --- GRAPH 11 -> 12 - 9 - 6 -> 11 +-- GRAPH 12 -> 17 - 16 - 11 -> 12 -- no forbidden vertices PREPARE v4e4q10 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[]::INTEGER[], true); PREPARE graph_9_11_13_15_sol1 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[9]::BIGINT[], 6, 12, 2), - ('e', -2, ARRAY[9]::BIGINT[], 12, 6, 2), - ('e', -3, ARRAY[11]::BIGINT[], 6, 12, 2)) + ('e', -1, ARRAY[16]::BIGINT[], 11, 17, 2), + ('e', -2, ARRAY[16]::BIGINT[], 17, 11, 2), + ('e', -3, ARRAY[12]::BIGINT[], 11, 17, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('v4e4q10', 'graph_9_11_13_15_sol1', 'graph_9_11_13_15 QUERY 1: no forbidden vertices'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 --- 6 is forbidden +-- GRAPH 11 -> 12 -> 17 - 16 - 11 +-- 11 is forbidden PREPARE v4e4q20 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[11]::INTEGER[], true); SELECT set_eq('v4e4q20', 'graph_9_11_13_15_sol1', 'graph_9_11_13_15 QUERY 2: forbidden vertices: 6 (non contractible)'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 --- 12 is forbidden +-- GRAPH 11 -> 12 -> 17 - 16 - 11 +-- 17 is forbidden PREPARE graph_9_11_13_15_q4 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[12]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[17]::INTEGER[], true); SELECT set_eq('v4e4q20', 'graph_9_11_13_15_sol1', 'graph_9_11_13_15 QUERY 3: forbidden vertices: 12 (is non contractible)'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 --- 6, 12 is forbidden +-- GRAPH 11 -> 12 -> 17 - 16 - 11 +-- 11, 17 is forbidden PREPARE graph_9_11_13_15_q3 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6, 12]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[11, 17]::INTEGER[], true); SELECT set_eq('v4e4q20', 'graph_9_11_13_15_sol1', 'graph_9_11_13_15 QUERY 4: forbidden vertices: 6, 12 (non contractible)'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 +-- GRAPH 11 -> 12 -> 17 - 16 - 11 PREPARE v4e4q30 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[9]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[16]::INTEGER[], true); PREPARE graph_9_11_13_15_sol2 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[11]::BIGINT[], 6, 12, 2)) + ('e', -1, ARRAY[12]::BIGINT[], 11, 17, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('v4e4q30', 'graph_9_11_13_15_sol2', 'graph_9_11_13_15 QUERY 5: forbidden vertices: 9'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 +-- GRAPH 11 -> 12 -> 17 - 16 - 11 PREPARE v4e4q31 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6, 9]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[11, 16]::INTEGER[], true); SELECT set_eq('v4e4q31', 'graph_9_11_13_15_sol2', 'graph_9_11_13_15 QUERY 6: forbidden vertices: 6 (non contractible) & 9'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 +-- GRAPH 11 -> 12 -> 17 - 16 - 11 PREPARE v4e4q32 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[9, 12]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[16, 17]::INTEGER[], true); SELECT set_eq('v4e4q32', 'graph_9_11_13_15_sol2', 'graph_9_11_13_15 QUERY 6: forbidden vertices: 12 (non contractible) & 9'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 +-- GRAPH 11 -> 12 -> 17 - 16 - 11 PREPARE v4e4q33 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6, 9, 12]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[11, 16, 17]::INTEGER[], true); SELECT set_eq('v4e4q33', 'graph_9_11_13_15_sol2', 'graph_9_11_13_15 QUERY 7: forbidden vertices: 6, 12 (non contractible) & 9'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 +-- GRAPH 11 -> 12 -> 17 - 16 - 11 PREPARE v4e4q40 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[11]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[12]::INTEGER[], true); PREPARE graph_9_11_13_15_sol3 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[9]::BIGINT[], 6, 12, 2), - ('e', -2, ARRAY[9]::BIGINT[], 12, 6, 2)) + ('e', -1, ARRAY[16]::BIGINT[], 11, 17, 2), + ('e', -2, ARRAY[16]::BIGINT[], 17, 11, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('v4e4q40', 'graph_9_11_13_15_sol3', 'graph_9_11_13_15 QUERY 4: forbidden vertices: 11'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 +-- GRAPH 11 -> 12 -> 17 - 16 - 11 PREPARE graph_9_11_13_15_q9 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6, 11]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[11, 12]::INTEGER[], true); SELECT set_eq('graph_9_11_13_15_q9', 'graph_9_11_13_15_sol3', 'graph_9_11_13_15 QUERY 4: forbidden vertices: 6 (non contractible) & 11'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 +-- GRAPH 11 -> 12 -> 17 - 16 - 11 PREPARE graph_9_11_13_15_q10 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[11, 12]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[12, 17]::INTEGER[], true); SELECT set_eq('graph_9_11_13_15_q10', 'graph_9_11_13_15_sol3', 'graph_9_11_13_15 QUERY 4: forbidden vertices: 12 (non contractible) & 11'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 +-- GRAPH 11 -> 12 -> 17 - 16 - 11 PREPARE graph_9_11_13_15_q11 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6, 11, 12]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[11, 12, 17]::INTEGER[], true); SELECT set_eq('graph_9_11_13_15_q11', 'graph_9_11_13_15_sol3', 'graph_9_11_13_15 QUERY 4: forbidden vertices: 6, 12 (non contractible) & 11'); ---- empty solutions -- --- GRAPH 6 -> 11 -> 12 - 9 - 6 +-- GRAPH 11 -> 12 -> 17 - 16 - 11 PREPARE v4e4q60 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[9, 11]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[16, 12]::INTEGER[], true); SELECT is_empty('v4e4q60', 'graph_9_11_13_15 QUERY 6: forbidden vertices: 9 & 11'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 +-- GRAPH 11 -> 12 -> 17 - 16 - 11 PREPARE v4e4q80 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6, 9, 11]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[11, 16, 12]::INTEGER[], true); SELECT is_empty('v4e4q80', 'graph_9_11_13_15 QUERY 6: forbidden vertices: 6 (non contractible) & 9 & 11'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 +-- GRAPH 11 -> 12 -> 17 - 16 - 11 PREPARE v4e4q90 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[9, 11, 12]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[16, 12, 17]::INTEGER[], true); SELECT is_empty('v4e4q90', 'graph_9_11_13_15 QUERY 6: forbidden vertices: 12 (non contractible) & 9 & 11'); --- GRAPH 6 -> 11 -> 12 - 9 - 6 +-- GRAPH 11 -> 12 -> 17 - 16 - 11 PREPARE v4e4q100 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[9, 11, 12]::INTEGER[], true); + ARRAY[2]::INTEGER[], 5, ARRAY[16, 12, 17]::INTEGER[], true); SELECT is_empty('v4e4q100', 'graph_9_11_13_15 QUERY 6: forbidden vertices: 6 & 12 (non contractible) & 9 & 11'); SELECT finish(); diff --git a/pgtap/contraction/linear/directed/inner_query.pg b/pgtap/contraction/linear/directed/inner_query.pg index 7a87ed29b58..d599cb853a2 100644 --- a/pgtap/contraction/linear/directed/inner_query.pg +++ b/pgtap/contraction/linear/directed/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_contraction(', ', ARRAY[2]::BIGINT[], 1, ARRAY[3]::BIGINT[], true)'); diff --git a/pgtap/contraction/linear/directed/issue_1647.pg b/pgtap/contraction/linear/directed/issue_1647.pg index 2fc5191afd2..e15fc67f663 100644 --- a/pgtap/contraction/linear/directed/issue_1647.pg +++ b/pgtap/contraction/linear/directed/issue_1647.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.1.1') THEN plan(1) ELSE plan(4) END; @@ -36,13 +36,13 @@ END IF; PREPARE allgraph AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], true); PREPARE minigraph AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( - $$SELECT * FROM edge_table WHERE source IN(1,2) OR target IN(1,2)$$, + $$SELECT * FROM edges WHERE source IN(1,2) OR target IN(1,2)$$, ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], true); RETURN QUERY @@ -50,7 +50,7 @@ SELECT lives_ok('allgraph', 'allgraph QUERY 1: Graph with no loop cycle'); RETURN QUERY SELECT lives_ok('minigraph', 'minigraph QUERY 1: Graph with no loop cycle'); -INSERT INTO edge_table (source, target, cost, reverse_cost) VALUES +INSERT INTO edges (source, target, cost, reverse_cost) VALUES (1, 1, 1, 1); RETURN QUERY @@ -64,5 +64,5 @@ LANGUAGE plpgsql; SELECT issue_check(); SELECT finish(); -DELETE FROM edge_table WHERE id > 18; +DELETE FROM edges WHERE id > 18; ROLLBACK; diff --git a/pgtap/contraction/linear/undirected/compare_dijkstra.pg b/pgtap/contraction/linear/undirected/compare_dijkstra.pg index 41b8189b73a..9c88f519310 100644 --- a/pgtap/contraction/linear/undirected/compare_dijkstra.pg +++ b/pgtap/contraction/linear/undirected/compare_dijkstra.pg @@ -22,106 +22,106 @@ BEGIN; SELECT plan(334); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -ALTER SEQUENCE edge_table_id_seq RESTART WITH 19; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +ALTER SEQUENCE edges_id_seq RESTART WITH 19; --step 1: Initial tables -SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table$$); -SELECT isnt_empty($$SELECT id FROM edge_table_vertices_pgr$$); +SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edges$$); +SELECT isnt_empty($$SELECT id FROM vertices$$); -- add extra columns to the edges and vertices table -ALTER TABLE edge_table +ALTER TABLE edges ADD is_contracted BOOLEAN DEFAULT false, ADD contracted_vertices integer[]; -ALTER TABLE edge_table_vertices_pgr +ALTER TABLE vertices ADD is_contracted BOOLEAN DEFAULT false, ADD contracted_vertices integer[]; -SELECT has_column('edge_table', 'is_contracted'); -SELECT has_column('edge_table_vertices_pgr', 'is_contracted'); -SELECT has_column('edge_table', 'contracted_vertices'); -SELECT has_column('edge_table_vertices_pgr', 'contracted_vertices'); +SELECT has_column('edges', 'is_contracted'); +SELECT has_column('vertices', 'is_contracted'); +SELECT has_column('edges', 'contracted_vertices'); +SELECT has_column('vertices', 'contracted_vertices'); SELECT * INTO contraction_info FROM pgr_contraction( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], false); PREPARE c_info AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -3, ARRAY[12], 9, 11, '2.394'), - ('e', -2, ARRAY[8], 5, 7, '2.085'), - ('e', -1, ARRAY[4], 3, 9, '2.265') + ('e',-3,ARRAY[17],16,12,'2.394'), + ('e',-2,ARRAY[3],7,1,'2.085'), + ('e', -1, ARRAY[15], 10, 16, '2.265') ) AS t(type, id, contracted_vertices, source, target, cost ); SELECT set_eq($$SELECT type, id, contracted_vertices, source, target, round(cost::numeric,3)::TEXT FROM contraction_info$$, 'c_info'); -- add the new edges -INSERT INTO edge_table(source, target, cost, reverse_cost, contracted_vertices, is_contracted) +INSERT INTO edges(source, target, cost, reverse_cost, contracted_vertices, is_contracted) SELECT source, target, cost, -1, contracted_vertices, true FROM contraction_info WHERE type = 'e'; -- Indicate vertices that were contracted -UPDATE edge_table_vertices_pgr +UPDATE vertices SET is_contracted = true WHERE id IN (SELECT unnest(contracted_vertices) FROM contraction_info); -- add the contracted vertices on the vertices table -UPDATE edge_table_vertices_pgr +UPDATE vertices SET contracted_vertices = contraction_info.contracted_vertices FROM contraction_info -WHERE type = 'v' AND edge_table_vertices_pgr.id = contraction_info.id; +WHERE type = 'v' AND vertices.id = contraction_info.id; SELECT id - FROM edge_table + FROM edges WHERE is_contracted; SELECT set_eq($$SELECT id - FROM edge_table + FROM edges WHERE NOT is_contracted$$, $$SELECT unnest(ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])$$ ); SELECT set_eq($$SELECT id - FROM edge_table + FROM edges WHERE is_contracted$$, $$SELECT unnest(ARRAY[19, 20, 21])$$ ); -- the contracted graph PREPARE c_graph AS -SELECT source, target, round(cost::numeric, 3)::TEXT AS cost, round(reverse_cost::numeric, 3)::TEXT FROM edge_table +SELECT source, target, round(cost::numeric, 3)::TEXT AS cost, round(reverse_cost::numeric, 3)::TEXT FROM edges WHERE - EXISTS (SELECT id FROM edge_table_vertices_pgr AS v WHERE NOT is_contracted AND v.id = edge_table.source) + EXISTS (SELECT id FROM vertices AS v WHERE NOT is_contracted AND v.id = edges.source) AND - EXISTS (SELECT id FROM edge_table_vertices_pgr AS v WHERE NOT is_contracted AND v.id = edge_table.target); + EXISTS (SELECT id FROM vertices AS v WHERE NOT is_contracted AND v.id = edges.target); PREPARE c_expected_graph AS SELECT source, target, cost, reverse_cost FROM (VALUES - (1, 2, '1.001', '1.001'), - ( 2, 3, '-0.996', '1.004'), - ( 2, 5, '1.016', '1.016'), - ( 3, 6, '1.025', '-0.975'), - ( 5, 6, '1.064', '1.064'), - ( 6, 9, '1.081', '1.081'), - ( 5, 10, '1.100', '1.100'), - ( 6, 11, '1.121', '-0.879'), - ( 10, 11, '1.144', '-0.856'), - ( 10, 13, '1.196', '1.196'), - ( 14, 15, '1.289', '1.289'), - ( 16, 17, '1.324', '1.324'), - ( 9, 11, '2.394', '-1.000'), - ( 3, 9, '2.265', '-1.000'), - ( 5, 7, '2.085', '-1.000')) + (10,16,'2.265','-1.000'), + (7,1,'2.085','-1.000'), + (16,12,'2.394','-1.000'), + (5, 6, '1.001', '1.001'), + (6, 10, '-0.996', '1.004'), + (6, 7, '1.016', '1.016'), + (10, 11, '1.025', '-0.975'), + (7, 11, '1.064', '1.064'), + (11, 16, '1.081', '1.081'), + (11, 12, '1.121', '-0.879'), + (8, 12, '1.144', '-0.856'), + (8, 9, '1.196', '1.196'), + (2, 4, '1.289', '1.289'), + (7, 8, '1.100', '1.100'), + (13, 14, '1.324', '1.324')) AS t(source, target, cost, reverse_cost); -SELECT set_eq('c_graph', 'c_expected_graph'); +SELECT set_eq('c_graph', 'c_expected_graph', 'The contracted graph'); CREATE OR REPLACE FUNCTION compare_dijkstra( BIGINT, BIGINT) @@ -134,22 +134,22 @@ BEGIN WITH contracted_section AS ( SELECT unnest(contracted_vertices) AS id - FROM edge_table_vertices_pgr + FROM vertices WHERE ARRAY[%1$s, %2$s] && contracted_vertices UNION SELECT unnest(contracted_vertices) AS id - FROM edge_table + FROM edges WHERE ARRAY[%1$s, %2$s] && contracted_vertices ), vertices AS ( - SELECT id FROM edge_table_vertices_pgr + SELECT id FROM vertices WHERE NOT is_contracted OR id IN (SELECT id FROM contracted_section) ) - SELECT id, source, target, cost, reverse_cost FROM edge_table + SELECT id, source, target, cost, reverse_cost FROM edges WHERE - EXISTS (SELECT id FROM vertices WHERE vertices.id = edge_table.source) + EXISTS (SELECT id FROM vertices WHERE vertices.id = edges.source) AND - EXISTS (SELECT id FROM vertices WHERE vertices.id = edge_table.target) + EXISTS (SELECT id FROM vertices WHERE vertices.id = edges.target) $query$, $1::BIGINT, $2::BIGINT); -- set client_min_messages TO notice; -- raise notice '%', graph_q; @@ -159,11 +159,11 @@ BEGIN SELECT node FROM dijkstra_r UNION SELECT unnest(contracted_vertices) - FROM dijkstra_r JOIN edge_table ON (edge = id) WHERE is_contracted = true; + FROM dijkstra_r JOIN edges ON (edge = id) WHERE is_contracted = true; CREATE TEMP TABLE dijkstra_contracted AS SELECT * FROM pgr_dijkstra($$SELECT id, source, target, cost, reverse_cost - FROM edge_table + FROM edges WHERE contracted_vertices IS NULL AND source IN (SELECT * FROM nodes_on_graph) @@ -171,7 +171,7 @@ BEGIN CREATE TEMP TABLE dijkstra_normal AS SELECT * FROM pgr_dijkstra($$SELECT id, source, target, cost, reverse_cost - FROM edge_table WHERE id < 19$$, $1::BIGINT, $2::BIGINT, false); + FROM edges WHERE id < 19$$, $1::BIGINT, $2::BIGINT, false); RETURN QUERY SELECT set_eq( $$SELECT * FROM dijkstra_contracted$$, @@ -207,5 +207,6 @@ LANGUAGE plpgsql; SELECT compare_dijkstra_all(); + SELECT finish(); ROLLBACK; diff --git a/pgtap/contraction/linear/undirected/edge_cases.pg b/pgtap/contraction/linear/undirected/edge_cases.pg index 1d07afabcf2..72394f84099 100644 --- a/pgtap/contraction/linear/undirected/edge_cases.pg +++ b/pgtap/contraction/linear/undirected/edge_cases.pg @@ -19,305 +19,304 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(26); -- TESTING ONE CYCLE OF LINEAR CONTRACTION FOR A DIRECTED GRAPH --- GRAPH 1 - 2 - 3 +-- GRAPH 5 - 6 - 10 PREPARE graph_e_1_2 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table WHERE id IN (1, 2); +FROM edges WHERE id IN (1, 2) ORDER BY id; --- GRAPH 1 - 2 - 5 +-- GRAPH 5 - 6 - 7 PREPARE graph_e_1_4 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table WHERE id IN (1, 4); +FROM edges WHERE id IN (1, 4) ORDER BY id; --- GRAPH 6 - 11 - 10 +-- GRAPH 11 - 12 - 8 PREPARE graph_e_11_12 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table WHERE id IN (11, 12); +FROM edges WHERE id IN (11, 12) ORDER BY id; --- GRAPH 4 - 3 - 6 - 11 +-- GRAPH 15 - 10 - 11 - 12 PREPARE graph_e_3_5_11 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table WHERE id IN (3, 5, 11); +FROM edges WHERE id IN (3, 5, 11) ORDER BY id; --- GRAPH 6 - 11 - 12 - 9 - 6 +-- GRAPH 11 - 12 - 17 - 16 - 11 PREPARE graph_e_9_11_13_15 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table WHERE id IN (9, 11, 13, 15) ORDER BY id; +FROM edges WHERE id IN (9, 11, 13, 15) ORDER BY id; -- TWO EDGES --- GRAPH 1 - 2 - 3 +-- GRAPH 5 - 6 - 10 -- no forbidden vertices PREPARE graph_e_1_2_q1 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_1_2', - ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[]::INTEGER[], false); PREPARE graph_e_1_2_sol1 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[2]::BIGINT[], 1, 3, 2)) + ('e', -1, ARRAY[6]::BIGINT[], 5, 10, 2)) AS t(type, id, contracted_vertices, source, target, cost); - SELECT set_eq('graph_e_1_2_q1', 'graph_e_1_2_sol1', 'graph_e_1_2 QUERY 1: no forbidden vertices'); --- GRAPH 1 - 2 - 3 --- 2 is forbidden +-- GRAPH 5 - 6 - 10 +-- 6 is forbidden PREPARE graph_e_1_2_q2 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_1_2', - ARRAY[2]::INTEGER[], 1, ARRAY[2]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[6]::INTEGER[], false); SELECT is_empty('graph_e_1_2_q2', 'graph_e_1_2 QUERY 2: Directed graph with two edges and 2 is forbidden vertex'); -------------------- --- GRAPH 1 - 2 - 5 +-- GRAPH 5 - 6 - 7 PREPARE graph_e_1_4_q1 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_1_4', - ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[]::INTEGER[], false); PREPARE graph_e_1_4_sol1 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[2]::BIGINT[], 1, 5, 2)) + ('e', -1, ARRAY[6]::BIGINT[], 5, 7, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_e_1_4_q1', 'graph_e_1_4_sol1', 'graph_e_1_4 QUERY 1: Directed graph with two edges and no forbidden vertices'); --- GRAPH 1 - 2 - 5 --- 2 is forbidden +-- GRAPH 5 - 6 - 7 +-- 6 is forbidden PREPARE graph_e_1_4_q2 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_1_4', - ARRAY[2]::INTEGER[], 1, ARRAY[2]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[6]::INTEGER[], false); SELECT is_empty('graph_e_1_4_q2', 'graph_e_1_4 QUERY 2: Directed graph with two edges and 2 is forbidden vertex'); -------------------- --- GRAPH 6 - 11 - 10 +-- GRAPH 11 - 12 - 8 -- no forbidden vertices PREPARE graph_e_11_12_q1 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_11_12', - ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[]::INTEGER[], false); PREPARE graph_e_11_12_sol1 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[11]::BIGINT[], 6, 10, 2)) + ('e', -1, ARRAY[12]::BIGINT[], 11, 8, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_e_11_12_q1', 'graph_e_11_12_sol1', 'graph_e_11_12 QUERY 1: no forbidden vertices'); --- GRAPH 6 - 11 - 10 +-- GRAPH 11 - 12 - 8 PREPARE graph_e_11_12_q2 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_11_12', - ARRAY[2]::INTEGER[], 1, ARRAY[11]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[12]::INTEGER[], false); SELECT is_empty('graph_e_11_12_q2', 'graph_e_1_4 QUERY 2: forbidden vertex: 11'); -- THREE EDGES -------------------- --- GRAPH 4 - 3 - 6 - 11 +-- GRAPH 15 - 10 - 11 - 12 -- no forbidden vertices PREPARE graph_e_3_5_11_q1 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_3_5_11', - ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[]::INTEGER[], false); PREPARE graph_e_3_5_11_sol1 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[3, 6]::BIGINT[], 4, 11, 3)) + ('e', -1, ARRAY[10, 11]::BIGINT[], 15, 12, 3)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_e_3_5_11_q1', 'graph_e_3_5_11_sol1', 'graph_e_3_5_11 QUERY 1: Directed graph with three edges and no forbidden vertices'); --- GRAPH 4 - 3 - 6 -11 --- 3 is forbidden +-- GRAPH 15 - 10 - 11 -12 +-- 10 is forbidden PREPARE graph_e_3_5_11_q2 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_3_5_11', - ARRAY[2]::INTEGER[], 1, ARRAY[3]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[10]::INTEGER[], false); PREPARE graph_e_3_5_11_sol2 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[6]::BIGINT[], 3, 11, 2)) + ('e', -1, ARRAY[11]::BIGINT[], 10, 12, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_e_3_5_11_q2', 'graph_e_3_5_11_sol2', 'graph_e_3_5_11 QUERY 2: Directed graph with three edges and 3 is forbidden vertices'); --- GRAPH 4 - 3 - 6 - 11 --- 6 is forbidden +-- GRAPH 15 - 10 - 11 - 12 +-- 11 is forbidden PREPARE graph_e_3_5_11_q3 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_3_5_11', - ARRAY[2]::INTEGER[], 1, ARRAY[6]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[11]::INTEGER[], false); PREPARE graph_e_3_5_11_sol3 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[3]::BIGINT[], 4, 6, 2)) + ('e', -1, ARRAY[10]::BIGINT[], 15, 11, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_e_3_5_11_q3', 'graph_e_3_5_11_sol3', 'graph_e_3_5_11 QUERY 3: Directed graph with three edges and 6 is forbidden vertices'); --- 3, 6 are forbidden +-- 10, 11 are forbidden PREPARE graph_e_3_5_11_q4 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_3_5_11', - ARRAY[2]::INTEGER[], 1, ARRAY[3, 6]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[10, 11]::INTEGER[], false); SELECT is_empty('graph_e_3_5_11_q4', 'graph_3_5_11 QUERY 4: Directed graph with three edges and 3, 6 are forbidden vertices'); -- FOUR EDGES --- GRAPH 11 - 12 - 9 - 6 - 11 +-- GRAPH 12 - 17 - 16 - 11 - 12 -- no forbidden vertices PREPARE graph_9_11_13_15_q1 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[]::INTEGER[], false); PREPARE graph_9_11_13_15_sol1 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[6, 9]::BIGINT[], 11, 12, 3)) + ('e', -1, ARRAY[11, 16]::BIGINT[], 12, 17, 3)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q1', 'graph_9_11_13_15_sol1', 'graph_9_11_13_15 QUERY 1: no forbidden vertices'); --- GRAPH 6 - 11 - 12 - 9 - 6 --- 6 is forbidden +-- GRAPH 11 - 12 - 17 - 16 - 11 +-- 11 is forbidden PREPARE graph_9_11_13_15_q2 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[11]::INTEGER[], false); PREPARE graph_9_11_13_15_sol2 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[9, 12]::BIGINT[], 6, 11, 3)) + ('e', -1, ARRAY[16, 17]::BIGINT[], 11, 12, 3)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q2', 'graph_9_11_13_15_sol2', 'graph_9_11_13_15 QUERY 2: forbidden vertices: 6'); --- GRAPH 6 - 11 - 12 - 9 - 6 --- 12 is forbidden +-- GRAPH 11 - 12 - 17 - 16 - 11 +-- 17 is forbidden PREPARE graph_9_11_13_15_q3 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[12]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[17]::INTEGER[], false); PREPARE graph_9_11_13_15_sol3 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[6, 9]::BIGINT[], 11, 12, 3)) + ('e', -1, ARRAY[11, 16]::BIGINT[], 12, 17, 3)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q3', 'graph_9_11_13_15_sol3', 'graph_9_11_13_15 QUERY 3: forbidden vertices: 12'); --- GRAPH 6 - 11 - 12 - 9 - 6 --- 6, 12 is forbidden +-- GRAPH 11 - 12 - 17 - 16 - 11 +-- 11, 17 is forbidden PREPARE graph_9_11_13_15_q4 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6, 12]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[11, 17]::INTEGER[], false); PREPARE graph_9_11_13_15_sol4 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[9]::BIGINT[], 6, 12, 2), - ('e', -2, ARRAY[11]::BIGINT[], 6, 12, 2)) + ('e', -1, ARRAY[16]::BIGINT[], 11, 17, 2), + ('e', -2, ARRAY[12]::BIGINT[], 11, 17, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q4', 'graph_9_11_13_15_sol4', 'graph_9_11_13_15 QUERY 4: forbidden vertices: 6, 12'); --- GRAPH 6 - 11 - 12 - 9 - 6 +-- GRAPH 11 - 12 - 17 - 16 - 11 PREPARE graph_9_11_13_15_q5 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[9]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[16]::INTEGER[], false); PREPARE graph_9_11_13_15_sol5 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[6, 11]::BIGINT[], 9, 12, 3)) + ('e', -1, ARRAY[11, 12]::BIGINT[], 16, 17, 3)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q5', 'graph_9_11_13_15_sol5', 'graph_9_11_13_15 QUERY 5: forbidden vertices: 9'); --- GRAPH 6 - 11 - 12 - 9 - 6 +-- GRAPH 11 - 12 - 17 - 16 - 11 PREPARE graph_9_11_13_15_q6 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6, 9]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[11, 16]::INTEGER[], false); PREPARE graph_9_11_13_15_sol6 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[11, 12]::BIGINT[], 6, 9, 3)) + ('e', -1, ARRAY[12, 17]::BIGINT[], 11, 16, 3)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q6', 'graph_9_11_13_15_sol6', 'graph_9_11_13_15 QUERY 6: forbidden vertices: 6 & 9'); --- GRAPH 6 - 11 - 12 - 9 - 6 +-- GRAPH 11 - 12 - 17 - 16 - 11 PREPARE graph_9_11_13_15_q7 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[9, 12]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[16, 17]::INTEGER[], false); PREPARE graph_9_11_13_15_sol7 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[6, 11]::BIGINT[], 9, 12, 3)) + ('e', -1, ARRAY[11, 12]::BIGINT[], 16, 17, 3)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q7', 'graph_9_11_13_15_sol7', 'graph_9_11_13_15 QUERY 7: forbidden vertices: 12 & 9'); --- GRAPH 6 - 11 - 12 - 9 - 6 +-- GRAPH 11 - 12 - 17 - 16 - 11 PREPARE graph_9_11_13_15_q8 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6, 9, 12]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[11, 16, 17]::INTEGER[], false); PREPARE graph_9_11_13_15_sol8 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[11]::BIGINT[], 6, 12, 2)) + ('e', -1, ARRAY[12]::BIGINT[], 11, 17, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q8', 'graph_9_11_13_15_sol8', 'graph_9_11_13_15 QUERY 8: forbidden vertices: 6, 12 & 9'); --- GRAPH 6 - 11 - 12 - 9 - 6 +-- GRAPH 11 - 12 - 17 - 16 - 11 PREPARE graph_9_11_13_15_q9 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( @@ -327,107 +326,107 @@ FROM pgr_contraction( PREPARE graph_9_11_13_15_sol9 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[6, 9]::BIGINT[], 11, 12, 3)) + ('e', -1, ARRAY[16, 17]::BIGINT[], 11, 12, 3)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q9', 'graph_9_11_13_15_sol9', 'graph_9_11_13_15 QUERY 9: forbidden vertices: 11'); --- GRAPH 6 - 11 - 12 - 9 - 6 +-- GRAPH 11 - 12 - 17 - 16 - 11 PREPARE graph_9_11_13_15_q10 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6, 11]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[11, 12]::INTEGER[], false); PREPARE graph_9_11_13_15_sol10 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[9, 12]::BIGINT[], 6, 11, 3)) + ('e', -1, ARRAY[16, 17]::BIGINT[], 11, 12, 3)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q10', 'graph_9_11_13_15_sol10', 'graph_9_11_13_15 QUERY 10: forbidden vertices: 6 & 11'); --- GRAPH 6 - 11 - 12 - 9 - 6 +-- GRAPH 11 - 12 - 17 - 16 - 11 PREPARE graph_9_11_13_15_q11 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[11, 12]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[12, 17]::INTEGER[], false); SELECT set_eq('graph_9_11_13_15_q11', 'graph_9_11_13_15_sol3', 'graph_9_11_13_15 QUERY 11: forbidden vertices: 12 & 11'); --- GRAPH 6 - 11 - 12 - 9 - 6 +-- GRAPH 11 - 12 - 17 - 16 - 11 PREPARE graph_9_11_13_15_q12 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6, 11, 12]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[11, 12, 17]::INTEGER[], false); PREPARE graph_9_11_13_15_sol12 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[9]::BIGINT[], 6, 12, 2)) + ('e', -1, ARRAY[16]::BIGINT[], 11, 17, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q12', 'graph_9_11_13_15_sol12', 'graph_9_11_13_15 QUERY 12: forbidden vertices: 6, 12 & 11'); --- GRAPH 6 - 11 - 12 - 9 - 6 +-- GRAPH 11 - 12 - 17 - 16 - 11 PREPARE graph_9_11_13_15_q13 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[9, 11]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[16, 12]::INTEGER[], false); PREPARE graph_9_11_13_15_sol13 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -2, ARRAY[12]::BIGINT[], 9, 11, 2), - ('e', -1, ARRAY[6]::BIGINT[], 9, 11, 2)) + ('e', -2, ARRAY[17]::BIGINT[], 16, 12, 2), + ('e', -1, ARRAY[11]::BIGINT[], 16, 12, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q13', 'graph_9_11_13_15_sol13', 'graph_9_11_13_15 QUERY 13: forbidden vertices: 9 & 11'); --- GRAPH 6 - 11 - 12 - 9 - 6 +-- GRAPH 11 - 12 - 17 - 16 - 11 PREPARE graph_9_11_13_15_q14 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6, 9, 11]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[11, 16, 12]::INTEGER[], false); PREPARE graph_9_11_13_15_sol14 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[12]::BIGINT[], 9, 11, 2)) + ('e', -1, ARRAY[17]::BIGINT[], 16, 12, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q14', 'graph_9_11_13_15_sol14', 'graph_9_11_13_15 QUERY 13: forbidden vertices: 6 & 9 & 11'); --- GRAPH 6 - 11 - 12 - 9 - 6 +-- GRAPH 11 - 12 - 17 - 16 - 11 PREPARE graph_9_11_13_15_q15 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[9, 11, 12]::INTEGER[], false); + ARRAY[2]::INTEGER[], 5, ARRAY[16, 12, 17]::INTEGER[], false); PREPARE graph_9_11_13_15_sol15 AS SELECT type, id, contracted_vertices, source, target, cost FROM (VALUES - ('e', -1, ARRAY[6]::BIGINT[], 9, 11, 2)) + ('e', -1, ARRAY[11]::BIGINT[], 16, 12, 2)) AS t(type, id, contracted_vertices, source, target, cost); SELECT set_eq('graph_9_11_13_15_q15', 'graph_9_11_13_15_sol15', 'graph_9_11_13_15 QUERY 13: forbidden vertices: 9 & 11 & 12'); --- GRAPH 6 - 11 - 12 - 9 - 6 +-- GRAPH 11 - 12 - 17 - 16 - 11 PREPARE graph_9_11_13_15_q16 AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( 'graph_e_9_11_13_15', - ARRAY[2]::INTEGER[], 1, ARRAY[6, 9, 11, 12]::INTEGER[], false); -SELECT is_empty('graph_9_11_13_15_q16', 'graph_9_11_13_15 QUERY 16: forbidden vertices: 6 & 12 & 9 & 11'); + ARRAY[2]::INTEGER[], 5, ARRAY[11, 16, 12, 17]::INTEGER[], false); +SELECT is_empty('graph_9_11_13_15_q16', 'graph_9_11_13_15 QUERY 16: forbidden vertices: 11 & 17 & 16 & 12'); SELECT finish(); ROLLBACK; diff --git a/pgtap/contraction/linear/undirected/inner_query.pg b/pgtap/contraction/linear/undirected/inner_query.pg index 6a876cedccb..e0a6c5d2043 100644 --- a/pgtap/contraction/linear/undirected/inner_query.pg +++ b/pgtap/contraction/linear/undirected/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_contraction(', ', ARRAY[1]::BIGINT[], 1, ARRAY[3]::BIGINT[], false)'); diff --git a/pgtap/contraction/linear/undirected/issue_1647.pg b/pgtap/contraction/linear/undirected/issue_1647.pg index c77947d147d..e2d8172f55a 100644 --- a/pgtap/contraction/linear/undirected/issue_1647.pg +++ b/pgtap/contraction/linear/undirected/issue_1647.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.1.1') THEN plan(1) ELSE plan(4) END; @@ -36,13 +36,13 @@ END IF; PREPARE allgraph AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], false); PREPARE minigraph AS SELECT type, id, contracted_vertices, source, target, cost FROM pgr_contraction( - $$SELECT * FROM edge_table WHERE source IN(1,2) OR target IN(1,2)$$, + $$SELECT * FROM edges WHERE source IN(1,2) OR target IN(1,2)$$, ARRAY[2]::INTEGER[], 1, ARRAY[]::INTEGER[], false); RETURN QUERY @@ -50,7 +50,7 @@ SELECT lives_ok('allgraph', 'allgraph QUERY 1: Graph with no loop cycle'); RETURN QUERY SELECT lives_ok('minigraph', 'minigraph QUERY 1: Graph with no loop cycle'); -INSERT INTO edge_table (source, target, cost, reverse_cost) VALUES +INSERT INTO edges (source, target, cost, reverse_cost) VALUES (1, 1, 1, 1); RETURN QUERY @@ -64,5 +64,5 @@ LANGUAGE plpgsql; SELECT issue_check(); SELECT finish(); -DELETE FROM edge_table WHERE id > 18; +DELETE FROM edges WHERE id > 18; ROLLBACK; diff --git a/pgtap/contraction/no_crash_test.pg b/pgtap/contraction/no_crash_test.pg index b2474828002..0a6a663be12 100644 --- a/pgtap/contraction/no_crash_test.pg +++ b/pgtap/contraction/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(7); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -36,7 +36,7 @@ params TEXT[]; subs TEXT[]; BEGIN params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[1]::BIGINT[]' ]::TEXT[]; subs = ARRAY[ diff --git a/pgtap/dagShortestPath/edge_cases/empty_combinations_empty_result.pg b/pgtap/dagShortestPath/edge_cases/empty_combinations_empty_result.pg index 2e601260351..38ec79a8059 100644 --- a/pgtap/dagShortestPath/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/dagShortestPath/edge_cases/empty_combinations_empty_result.pg @@ -34,8 +34,8 @@ BEGIN RETURN query SELECT is_empty( 'SELECT seq, path_seq, node, edge, cost, agg_cost FROM pgr_dagShortestPath( - ''SELECT id, source, target, cost FROM edge_table'', - ''SELECT * FROM combinations_table WHERE source IN (-1)'' ) ' + ''SELECT id, source, target, cost FROM edges'', + ''SELECT * FROM combinations WHERE source IN (-1)'' ) ' ); RETURN; END diff --git a/pgtap/dagShortestPath/edge_cases/many_to_many_eq_combinations.pg b/pgtap/dagShortestPath/edge_cases/many_to_many_eq_combinations.pg index f4cdfd0debe..8f0c4bad8f3 100644 --- a/pgtap/dagShortestPath/edge_cases/many_to_many_eq_combinations.pg +++ b/pgtap/dagShortestPath/edge_cases/many_to_many_eq_combinations.pg @@ -21,7 +21,7 @@ BEGIN; SELECT plan(1); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE OR REPLACE FUNCTION eq_many( sql_TestFunction TEXT, cant INTEGER default 18 ) RETURNS SETOF TEXT AS @@ -56,11 +56,11 @@ BEGIN sql_Combinations := trim(trailing ',' from sql_Combinations); sql_Many := ( sql_TestFunction || '( - ''SELECT id, source, target, cost FROM edge_table'', + ''SELECT id, source, target, cost FROM edges'', ARRAY[' || sql_Many ||'], ARRAY[' || sql_Many || '] ) '); sql_Combinations := ( sql_TestFunction || '( - ''SELECT id, source, target, cost FROM edge_table'', + ''SELECT id, source, target, cost FROM edges'', ''SELECT * FROM (VALUES' || sql_Combinations ||') AS combinations (source, target)'' ) '); RETURN query SELECT set_eq( sql_Many, sql_Combinations ); diff --git a/pgtap/dagShortestPath/inner_query.pg b/pgtap/dagShortestPath/inner_query.pg index d5b6785c64f..9cb16839c62 100644 --- a/pgtap/dagShortestPath/inner_query.pg +++ b/pgtap/dagShortestPath/inner_query.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(132) ELSE plan(98) END; -- TODO the column has to be dropped because it creates a cycle when cost and reverse cost both have positive values -ALTER TABLE edge_table DROP COLUMN reverse_cost; +ALTER TABLE edges DROP COLUMN reverse_cost; -- ONE TO ONE SELECT style_dijkstra('pgr_dagshortestpath(', ', 2, 3)'); @@ -39,8 +39,8 @@ CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_dijkstra('pgr_dagshortestpath(', ', $$SELECT * FROM combinations_table$$)'); - RETURN QUERY SELECT innerquery_combinations('pgr_dagshortestpath($$SELECT * FROM edge_table$$,',')'); + RETURN QUERY SELECT style_dijkstra('pgr_dagshortestpath(', ', $$SELECT * FROM combinations$$)'); + RETURN QUERY SELECT innerquery_combinations('pgr_dagshortestpath($$SELECT * FROM edges$$,',')'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/dagShortestPath/no_crash_test.pg b/pgtap/dagShortestPath/no_crash_test.pg index 43836659269..d869863d1a6 100644 --- a/pgtap/dagShortestPath/no_crash_test.pg +++ b/pgtap/dagShortestPath/no_crash_test.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(81) ELSE plan(68) END; CREATE OR REPLACE FUNCTION no_crash() @@ -30,13 +30,13 @@ params TEXT[]; subs TEXT[]; BEGIN PREPARE edges AS - SELECT id, source, target, cost FROM edge_table; + SELECT id, source, target, cost FROM edges; PREPARE null_ret AS - SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); + SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS - SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); + SELECT array_agg(id) FROM vertices WHERE id IN (-1); RETURN QUERY SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -48,14 +48,14 @@ BEGIN -- one to one params = ARRAY[ - '$$SELECT id, source, target, cost FROM edge_table$$' - ,'1::BIGINT', - '2::BIGINT' + '$$SELECT id, source, target, cost FROM edges$$', + '5::BIGINT', + '6::BIGINT' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_dagShortestPath', params, subs); @@ -68,11 +68,11 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_dagShortestPath', params, subs); -- one to many - params = ARRAY['$$edges$$','1', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; + params = ARRAY['$$edges$$','1', 'ARRAY[6,7]::BIGINT[]']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_dagShortestPath', params, subs); @@ -85,11 +85,11 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_dagShortestPath', params, subs); -- many to one - params = ARRAY['$$edges$$', 'ARRAY[1]::BIGINT[]', '2']::TEXT[]; + params = ARRAY['$$edges$$', 'ARRAY[5]::BIGINT[]', '6']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_dagShortestPath', params, subs); @@ -102,11 +102,11 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_dagShortestPath', params, subs); -- many to many - params = ARRAY['$$edges$$','ARRAY[1]::BIGINT[]', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; + params = ARRAY['$$edges$$','ARRAY[1]::BIGINT[]', 'ARRAY[6,7]::BIGINT[]']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_dagShortestPath', params, subs); @@ -125,10 +125,10 @@ BEGIN END IF; PREPARE combinations AS - SELECT source, target FROM combinations_table; + SELECT source, target FROM combinations; PREPARE null_combinations AS - SELECT source, target FROM combinations_table WHERE source IN (-1); + SELECT source, target FROM combinations WHERE source IN (-1); RETURN QUERY SELECT isnt_empty('combinations', 'Should be not empty to tests be meaningful'); @@ -139,7 +139,7 @@ BEGIN params = ARRAY['$$edges$$', '$$combinations$$']::TEXT[]; subs = ARRAY[ 'NULL', - '$$(SELECT source, target FROM combinations_table WHERE source IN (-1))$$' + '$$(SELECT source, target FROM combinations WHERE source IN (-1))$$' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_dagShortestPath', params, subs); diff --git a/pgtap/dijkstra/dijkstra/edge_cases/empty_combinations_empty_result.pg b/pgtap/dijkstra/dijkstra/edge_cases/empty_combinations_empty_result.pg index 7d62937132d..275f78cdb77 100644 --- a/pgtap/dijkstra/dijkstra/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/dijkstra/dijkstra/edge_cases/empty_combinations_empty_result.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(1); create or REPLACE FUNCTION foo() @@ -37,8 +37,8 @@ BEGIN RETURN query SELECT is_empty( 'SELECT path_seq, start_vid, end_vid, node, edge, cost, agg_cost FROM pgr_dijkstra( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', - ''SELECT * FROM combinations_table WHERE source=-1'' ) ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', + ''SELECT * FROM combinations WHERE source=-1'' ) ' ); END $BODY$ diff --git a/pgtap/dijkstra/dijkstra/edge_cases/infinity_alt_cost.pg b/pgtap/dijkstra/dijkstra/edge_cases/infinity_alt_cost.pg index 2bf9519fd9a..9daff3c58a2 100644 --- a/pgtap/dijkstra/dijkstra/edge_cases/infinity_alt_cost.pg +++ b/pgtap/dijkstra/dijkstra/edge_cases/infinity_alt_cost.pg @@ -19,22 +19,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(4); PREPARE q0 AS -SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - 7, 6) ORDER BY seq DESC LIMIT 1; +SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edges', + 1, 11) ORDER BY seq DESC LIMIT 1; PREPARE update2infinity9 AS -UPDATE edge_table SET cost = 'Infinity' WHERE id = 9; +UPDATE edges SET cost = 'Infinity' WHERE id = 9; PREPARE update2k13 AS -UPDATE edge_table SET cost = 10 WHERE id = 13; +UPDATE edges SET cost = 10 WHERE id = 13; PREPARE q1 AS -SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - 5, 12) ORDER BY seq DESC LIMIT 1; +SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edges', + 7, 17) ORDER BY seq DESC LIMIT 1; -- test for infinity if alternative is available SELECT results_eq('q0', 'SELECT cast(3 as double precision) as agg_cost;'); diff --git a/pgtap/dijkstra/dijkstra/edge_cases/infinity_cost.pg b/pgtap/dijkstra/dijkstra/edge_cases/infinity_cost.pg index b78a99a6c5c..d3b7fc143dd 100644 --- a/pgtap/dijkstra/dijkstra/edge_cases/infinity_cost.pg +++ b/pgtap/dijkstra/dijkstra/edge_cases/infinity_cost.pg @@ -19,39 +19,39 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(8); PREPARE q0 AS -SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - 7, 6) ORDER BY seq DESC LIMIT 1; +SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edges', + 1, 11) ORDER BY seq DESC LIMIT 1; PREPARE update2infinity AS -UPDATE edge_table SET cost = 'Infinity' WHERE id = 7; +UPDATE edges SET cost = 'Infinity' WHERE id = 7; PREPARE q1 AS -SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - 7, 8) ORDER BY seq DESC LIMIT 1; +SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edges', + 1, 3) ORDER BY seq DESC LIMIT 1; PREPARE q2 AS -SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - 8, 5) ORDER BY seq DESC LIMIT 1; +SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edges', + 3, 7) ORDER BY seq DESC LIMIT 1; PREPARE q3 AS -SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - 5, 6) ORDER BY seq DESC LIMIT 1; +SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edges', + 7, 11) ORDER BY seq DESC LIMIT 1; PREPARE q4 AS -SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - 7, 5) ORDER BY seq DESC LIMIT 1; +SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edges', + 1, 7) ORDER BY seq DESC LIMIT 1; PREPARE q5 AS -SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - 8, 6) ORDER BY seq DESC LIMIT 1; +SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edges', + 3, 11) ORDER BY seq DESC LIMIT 1; PREPARE q6 AS -SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - 7, 6) ORDER BY seq DESC LIMIT 1; +SELECT agg_cost FROM pgr_dijkstra( 'select id, source, target, cost from edges', + 1, 11) ORDER BY seq DESC LIMIT 1; -- test for infinity if there is no alternative SELECT results_eq('q0', 'SELECT cast(3 as double precision) as agg_cost;'); diff --git a/pgtap/dijkstra/dijkstra/edge_cases/issue_353.pg b/pgtap/dijkstra/dijkstra/edge_cases/issue_353.pg index 1e948bbca21..4f51c749d5c 100644 --- a/pgtap/dijkstra/dijkstra/edge_cases/issue_353.pg +++ b/pgtap/dijkstra/dijkstra/edge_cases/issue_353.pg @@ -19,27 +19,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(3); PREPARE q1 AS -SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - array[2,7], array[5,6]); +SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edges', + array[1,6], array[7,11]); PREPARE q2 AS -SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - array[2,7], array[17,18]); +SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edges', + array[1,6], array[14,18]); Prepare q3 AS -(SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - array[2,7], array[5,6])) +(SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edges', + array[1,6], array[7,11])) UNION -(SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - array[2,7], array[17,18])); +(SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edges', + array[1,6], array[14,18])); PREPARE q4 AS -SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', - array[2,7], array[5,6,17,18]); +SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edges', + array[1,6], array[7,11,14,18]); SELECT is_empty( 'q2', '1'); SELECT set_eq( 'q1', 'q3', '2'); diff --git a/pgtap/dijkstra/dijkstra/edge_cases/manyToMany_equiv_combinations.pg b/pgtap/dijkstra/dijkstra/edge_cases/manyToMany_equiv_combinations.pg index 8610c1a0e5a..c6f8e1ba87c 100644 --- a/pgtap/dijkstra/dijkstra/edge_cases/manyToMany_equiv_combinations.pg +++ b/pgtap/dijkstra/dijkstra/edge_cases/manyToMany_equiv_combinations.pg @@ -22,7 +22,7 @@ BEGIN; SELECT plan(2); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; create or REPLACE FUNCTION foo( sql_TestFunction TEXT, cant INTEGER default 18 ) RETURNS SETOF TEXT AS @@ -57,12 +57,12 @@ BEGIN sql_Combinations := trim(trailing ',' from sql_Combinations); sql_Many := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table''::text, ' + ''SELECT id, source, target, cost, reverse_cost FROM edges''::text, ' || ' ARRAY[' || sql_Many ||'], ARRAY[' || sql_Many || '] ) '); sql_Combinations := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table''::text, + ''SELECT id, source, target, cost, reverse_cost FROM edges''::text, ''SELECT * FROM (VALUES' || sql_Combinations ||') AS combinations (source, target)'' ) '); RETURN query SELECT set_eq( sql_Many, sql_Combinations ); diff --git a/pgtap/dijkstra/dijkstra/edge_cases/oneToOne_equiv_manyToMany.pg b/pgtap/dijkstra/dijkstra/edge_cases/oneToOne_equiv_manyToMany.pg index aa1d5030b4a..3569e029aaa 100644 --- a/pgtap/dijkstra/dijkstra/edge_cases/oneToOne_equiv_manyToMany.pg +++ b/pgtap/dijkstra/dijkstra/edge_cases/oneToOne_equiv_manyToMany.pg @@ -22,7 +22,7 @@ BEGIN; SELECT plan(1); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; create or REPLACE FUNCTION foo(cant INTEGER default 18 ) @@ -48,14 +48,14 @@ BEGIN END IF; sql_OneToOne := sql_OneToOne || '( SELECT seq, ' || i || ' AS start_vid, ' || j || ' AS end_vid, node, edge, cost, agg_cost FROM pgr_dijkstra( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ' || i || ', ' || j || ') )'; END LOOP; END LOOP; sql_Many := ' SELECT path_seq, start_vid, end_vid, node, edge, cost, agg_cost FROM pgr_dijkstra( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ' || ' ARRAY[' || sql_Many ||'], ARRAY[' || sql_Many || '] ) '; diff --git a/pgtap/dijkstra/dijkstra/edge_cases/oneToOne_equiv_manyToOne.pg b/pgtap/dijkstra/dijkstra/edge_cases/oneToOne_equiv_manyToOne.pg index cafdbf67869..3271c97cfe0 100644 --- a/pgtap/dijkstra/dijkstra/edge_cases/oneToOne_equiv_manyToOne.pg +++ b/pgtap/dijkstra/dijkstra/edge_cases/oneToOne_equiv_manyToOne.pg @@ -22,7 +22,7 @@ BEGIN; SELECT plan(18); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; create or REPLACE FUNCTION foo(cant INTEGER default 18 ) @@ -45,14 +45,14 @@ BEGIN END IF; sql_OneToOne := sql_OneToOne || '( SELECT seq, ' || j || ' AS start_vid, ' || i || ' AS end_vid, node, edge, round(cost::numeric,8) AS cost, round(agg_cost::numeric,8) AS agg_cost FROM pgr_dijkstra( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ' || j || ', ' || i || ') )'; sql_Many := sql_Many || j ; END LOOP; sql_Many := ' SELECT path_seq, start_vid, ' || i || ' AS end_vid, node, edge, round(cost::numeric,8) AS cost, round(agg_cost::numeric,8) AS agg_cost FROM pgr_dijkstra( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ' ' ARRAY[' || sql_Many || '], ' || i || ' ) '; diff --git a/pgtap/dijkstra/dijkstra/edge_cases/oneToOne_equiv_oneToMany.pg b/pgtap/dijkstra/dijkstra/edge_cases/oneToOne_equiv_oneToMany.pg index f97fb94d3a9..304fe89111e 100644 --- a/pgtap/dijkstra/dijkstra/edge_cases/oneToOne_equiv_oneToMany.pg +++ b/pgtap/dijkstra/dijkstra/edge_cases/oneToOne_equiv_oneToMany.pg @@ -21,7 +21,7 @@ BEGIN; SELECT plan(36); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; create or REPLACE FUNCTION foo(cant INTEGER default 18, flag boolean default true ) @@ -45,14 +45,14 @@ BEGIN END IF; sql_OneToOne := sql_OneToOne || '( SELECT seq, ' || i || ' as start_vid, ' || j || ' as end_vid, node, edge, cost, agg_cost FROM pgr_dijkstra( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ' || i || ', ' || j || ', ' || flag || ' ) )'; sql_OneToMany := sql_OneToMany || j ; END LOOP; sql_OneToMany := ' SELECT path_seq, ' || i || ' as start_vid, end_vid, node, edge, cost, agg_cost FROM pgr_dijkstra( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ' || i || ', ARRAY[' || sql_OneToMany || '], ' || flag || ' ) '; diff --git a/pgtap/dijkstra/dijkstra/edge_cases/remaining_tests.pg b/pgtap/dijkstra/dijkstra/edge_cases/remaining_tests.pg deleted file mode 100644 index 5fa08a40ab2..00000000000 --- a/pgtap/dijkstra/dijkstra/edge_cases/remaining_tests.pg +++ /dev/null @@ -1,316 +0,0 @@ - -/*PGR-GNU***************************************************************** - -Copyright (c) 2018 pgRouting developers -Mail: project@pgrouting.org - ------- -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - ********************************************************************PGR-GNU*/ - -BEGIN; - -SET client_min_messages TO WARNING; - -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(33); - --- testing for the 4 signatures that they return the correct names & columns --- Preparing -PREPARE v21q00 AS -SELECT pg_typeof(seq)::text AS t1, pg_typeof(path_seq)::text AS t2, - pg_typeof(node)::text AS t5, pg_typeof(edge)::text AS t6, - pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8 - FROM ( - SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', - 2, 3, true) ) AS a - limit 1 -; -PREPARE v21q01 AS -SELECT 'integer'::text AS t1,'integer'::text AS t2, - 'bigint'::text AS t5, 'bigint'::text AS t6, - 'double precision'::text AS t7, 'double precision'::text AS t8; - -PREPARE v21q10 AS -SELECT pg_typeof(seq)::text AS t1, pg_typeof(path_seq)::text AS t2, - pg_typeof(end_vid)::text AS t4, - pg_typeof(node)::text AS t5, pg_typeof(edge)::text AS t6, - pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8 - FROM ( - SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', - 2, ARRAY[3], true) ) AS a - limit 1 -; -PREPARE v21q11 AS -SELECT 'integer'::text AS t1,'integer'::text AS t2, - 'bigint'::text AS t4, - 'bigint'::text AS t5, 'bigint'::text AS t6, - 'double precision'::text AS t7, 'double precision'::text AS t8; - - -PREPARE v21q20 AS -SELECT pg_typeof(seq)::text AS t1, pg_typeof(path_seq)::text AS t2, - pg_typeof(start_vid)::text AS t3, - pg_typeof(node)::text AS t5, pg_typeof(edge)::text AS t6, - pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8 - FROM ( - SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', - ARRAY[2], 3, true) ) AS a - limit 1 -; -PREPARE v21q21 AS -SELECT 'integer'::text AS t1,'integer'::text AS t2, - 'bigint'::text AS t3, - 'bigint'::text AS t5, 'bigint'::text AS t6, - 'double precision'::text AS t7, 'double precision'::text AS t8; - -PREPARE v21q30 AS -SELECT pg_typeof(seq)::text AS t1, pg_typeof(path_seq)::text AS t2, - pg_typeof(start_vid)::text AS t3, pg_typeof(end_vid)::text AS t4, - pg_typeof(node)::text AS t5, pg_typeof(edge)::text AS t6, - pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8 - FROM ( - SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', - ARRAY[2], ARRAY[3], true) ) AS a - limit 1 -; -PREPARE v21q31 AS -SELECT 'integer'::text AS t1,'integer'::text AS t2, - 'bigint'::text AS t3, 'bigint'::text AS t4, - 'bigint'::text AS t5, 'bigint'::text AS t6, - 'double precision'::text AS t7, 'double precision'::text AS t8; - --- testing -SELECT set_eq('v21q00', 'v21q01','1 to 1: Expected returning, columns names & types'); -SELECT set_eq('v21q10', 'v21q11','1 to many: Expected returning, columns names & types'); -SELECT set_eq('v21q20', 'v21q21','many to 1: Expected returning, columns names & types'); -SELECT set_eq('v21q30', 'v21q31','many to many: Expected returning, columns names & types'); - - --- CHECKING WORKS WITH & WITOUT REVERSE COST - -PREPARE v20q1 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', - 2, 3, true); -PREPARE v20q3 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', - 2, 3, false); - -SELECT lives_ok('v20q1','with reverse cost 1'); -SELECT lives_ok('v20q3','with reverse cost 3'); - -PREPARE v20q5 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, true); - -PREPARE v20q6 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); - - -SELECT lives_ok('v20q5','without reverse cost 1'); -SELECT lives_ok('v20q6','without reverse cost 2'); - --- V2.0 --- CHECKING INNER QUERY --- ANY-INTEGER, ANY-INTEGER, ANY-INTEGER, ANY-NUMERIC, [ANY-NUMERIC] - -/* TEST USES THE EDGES_INPUT FOR 5 PARAMETERS */ - ---id ANY-INTEGER -PREPARE v200id1 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::SMALLINT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200id2 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::BIGINT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200id3 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::FLOAT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200id4 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::REAL, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200id5 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::TEXT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); - -SELECT lives_ok('v200id1', - 'lives because id is SMALLINT'); -SELECT lives_ok('v200id2', - 'lives because id is BIGINT'); -SELECT throws_ok('v200id3', - 'XX000','Unexpected Column ''id'' type. Expected ANY-INTEGER', - 'throws because id is REAL'); -SELECT throws_ok('v200id4', - 'XX000','Unexpected Column ''id'' type. Expected ANY-INTEGER', - 'throws because id is FLOAT'); -SELECT throws_ok('v200id5', - 'XX000','Unexpected Column ''id'' type. Expected ANY-INTEGER', - 'throws because id is TEXT'); - ---source is only integer -PREPARE v200s1 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::SMALLINT, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200s2 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::BIGINT, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200s3 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::REAL, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200s4 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::FLOAT, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200s5 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::TEXT, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); - -SELECT lives_ok('v200s1', - 'lives because source is SMALLINT'); -SELECT lives_ok('v200s2', - 'lives because source is BIGINT'); -SELECT throws_ok('v200s3', - 'XX000','Unexpected Column ''source'' type. Expected ANY-INTEGER', - 'throws because source is REAL'); -SELECT throws_ok('v200s4', - 'XX000','Unexpected Column ''source'' type. Expected ANY-INTEGER', - 'throws because source is FLOAT'); -SELECT throws_ok('v200s5', - 'XX000','Unexpected Column ''source'' type. Expected ANY-INTEGER', - 'throws because id is TEXT'); - - ---target is only integer -PREPARE v200t1 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::SMALLINT, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200t2 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::BIGINT, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200t3 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::FLOAT, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200t4 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::REAL, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200t5 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::TEXT, cost::FLOAT FROM edge_table', - 2, 3, false); - -SELECT lives_ok('v200t1', - 'lives because target is SMALLINT'); -SELECT lives_ok('v200t2', - 'lives because target is BIGINT'); -SELECT throws_ok('v200t3', - 'XX000','Unexpected Column ''target'' type. Expected ANY-INTEGER', - 'throws because target is REAL'); -SELECT throws_ok('v200t4', - 'XX000','Unexpected Column ''target'' type. Expected ANY-INTEGER', - 'throws because target is FLOAT'); -SELECT throws_ok('v200t5', - 'XX000','Unexpected Column ''target'' type. Expected ANY-INTEGER', - 'throws because target is TEXT'); - --- cost -PREPARE v200c1 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::SMALLINT FROM edge_table', - 2, 3, false); -PREPARE v200c2 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER FROM edge_table', - 2, 3, false); -PREPARE v200c3 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::BIGINT FROM edge_table', - 2, 3, false); -PREPARE v200c4 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::REAL FROM edge_table', - 2, 3, false); -PREPARE v200c5 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::TEXT FROM edge_table', - 2, 3, false); - -SELECT lives_ok('v200c1', - 'lives because cost is SMALLINT'); -SELECT lives_ok('v200c2', - 'lives because cost is INTEGER'); -SELECT lives_ok('v200c3', - 'lives because cost is BIGINT'); -SELECT lives_ok('v200c4', - 'lives because cost is REAL'); -SELECT throws_ok('v200c5', - 'XX000','Unexpected Column ''cost'' type. Expected ANY-NUMERICAL', - 'throws because cost is TEXT'); - --- reverse_cost -PREPARE v200r1 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::SMALLINT FROM edge_table', - 2, 3, false); -PREPARE v200r2 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::INTEGER FROM edge_table', - 2, 3, false); -PREPARE v200r3 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::BIGINT FROM edge_table', - 2, 3, false); -PREPARE v200r4 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::REAL FROM edge_table', - 2, 3, false); -PREPARE v200r5 AS -SELECT * FROM pgr_dijkstra( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::TEXT FROM edge_table', - 2, 3, false); - -SELECT lives_ok('v200r1', - 'lives because reverse_cost is SMALLINT'); -SELECT lives_ok('v200r2', - 'lives because reverse_cost is INTEGER'); -SELECT lives_ok('v200r3', - 'lives because reverse_cost is BIGINT'); -SELECT lives_ok('v200r4', - 'lives because reverse_cost is REAL'); -SELECT throws_ok('v200r5', - 'XX000','Unexpected Column ''reverse_cost'' type. Expected ANY-NUMERICAL', - 'throws because reverse_cost is TEXT'); - - SELECT finish(); - ROLLBACK; diff --git a/pgtap/dijkstra/dijkstra/edge_cases/zero_one_edge_has_reverse.pg b/pgtap/dijkstra/dijkstra/edge_cases/zero_one_edge_has_reverse.pg index 73f2e3b2b24..8431c385663 100644 --- a/pgtap/dijkstra/dijkstra/edge_cases/zero_one_edge_has_reverse.pg +++ b/pgtap/dijkstra/dijkstra/edge_cases/zero_one_edge_has_reverse.pg @@ -19,235 +19,90 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; - UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(79); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); +SELECT CASE WHEN min_version('3.1.0') THEN plan(126) ELSE PLAN(102) END; -- 0 edges tests -SELECT is_empty(' SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id>18 ','1'); - --- directed graph -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '', 5, 6)', '2'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '',array[5], 6)','3'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '',array[5], array[6])', '4'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '', 5, array[6])', '5'); - --- undirected graph -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '', 5, 6, false)', '6'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '',array[5], 6, false)', '7'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '',array[5], array[6], false)', '8'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '', 5, array[6], false)', '9'); +PREPARE edges0 AS +SELECT id, source, target, cost, reverse_cost from edges where id>18; + +SELECT is_empty('edges0','Edges 0'); + +SELECT taptest('is_empty','edges0', 7, 11, true); +SELECT taptest('is_empty','edges0', 11, 7, true); +SELECT taptest('is_empty','edges0', 7, 11, false); +SELECT taptest('is_empty','edges0', 11, 7, false); -- 1 edges tests --- edge doesnt have start_vid = 5 but has end_vid = 6 -SELECT results_eq(' -SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id = 9', -'SELECT 9::BIGINT, 6::BIGINT, 9::BIGINT, true, true', -'10: Edge does not have start_vid = 5 but has end_vid = 6'); - --- directed graph - -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 9 '', 5, 6)', '11'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 9 '',array[5], 6)', '12'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 9 '',array[5], array[6])', '13'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 9 '', 5, array[6])', '14'); - --- undirected graph -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 9 '', 5, 6, false)', '15'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 9 '',array[5], 6, false)', '16'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 9 '',array[5], array[6], false)', '17'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 9 '', 5, array[6], false)', '18'); - --- edge doesnt have end_vid = 6 but has start_vid = 5 -SELECT results_eq( -'SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id = 4', -'SELECT 4::BIGINT, 2::BIGINT, 5::BIGINT, true, true', -'19: Edge doesnt have end_vid = 6 but has start_vid = 5'); - - --- directed graph -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 4 '', 5, 6)', '20'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 4 '',array[5], 6)', '21'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 4 '',array[5], array[6])', '22'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 4 '', 5, array[6])', '23'); - --- undirected graph -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 4 '', 5, 6, false)', '24'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 4 '',array[5], 6, false)', '25'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 4 '',array[5], array[6], false)', '26'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 4 '', 5, array[6], false)', '27'); - --- edge has start_vid 6 and end_vid 5 - -SELECT results_eq(' -SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id = 8', -'SELECT 8::BIGINT, 5::BIGINT, 6::BIGINT, true, true', -' 28: Edge has start_vid 6 and end_vid 5'); - -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 8 '', 5, 6)', '29'); -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 8 '',array[5], 6)', '30'); -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 8 '',array[5], array[6])', '31'); -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 8 '', 5, array[6])', '32'); - --- undirected graph -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 8 '', 5, 6, false)', '33'); -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 8 '',array[5], 6, false)', '34'); -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 8 '',array[5], array[6], false)', '35'); -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 8 '', 5, array[6], false)', '36'); - - --- edge has only vid = 6 but really only one edge is inserted the first one -SELECT results_eq(' -SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id = 5', -'SELECT 5::BIGINT, 3::BIGINT, 6::BIGINT, true, false', -'37: has only vid = 6 but really only one edge is inserted the first one'); - - --- directed graph -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '', 5, 6)', '38'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '',array[5], 6)', '39'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '',array[5], array[6])', '40'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '', 5, array[6])', '41'); - -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '', 6, 5)', '42'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '',array[6], 5)', '43'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '',array[6], array[5])', '44'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '', 6, array[5])', '45'); - --- undirected graph - -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '', 5, 6, false)', '46'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '',array[5], 6, false)', '47'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '',array[5], array[6], false)', '48'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '', 5, array[6], false)', '49'); - -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '', 6, 5, false)', '50'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '',array[6], 5, false)', '51'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '',array[6], array[5], false)', '52'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '', 6, array[5], false)', '53'); - - --- only answer is from 4 to 3 -SELECT results_eq(' -SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id = 3', -'SELECT 3::BIGINT, 3::BIGINT, 4::BIGINT, false, true', -'54: only answer is from 4 to 3'); - --- directed graph THIS doesnt get an answer -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '', 3, 4)', '55'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '',array[3], 4)', '56'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '',array[3], array[4])', '57'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '', 3, array[4])', '58'); - -SELECT isnt_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '', 4, 3)', '59'); -SELECT isnt_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '',array[4], 3)', '60'); -SELECT isnt_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '',array[4], array[3])', '61'); -SELECT isnt_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '', 4, array[3])', '62'); - --- undirected graph allways gets an answer -SELECT isnt_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '', 3, 4, false)', '63'); -SELECT isnt_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '',array[3], 4, false)', '64'); -SELECT isnt_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '',array[3], array[4], false)', '65'); -SELECT isnt_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '', 3, array[4], false)', '66'); - -SELECT isnt_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '', 4, 3, false)', '67'); -SELECT isnt_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '',array[4], 3, false)', '68'); -SELECT isnt_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '',array[4], array[3], false)', '69'); -SELECT isnt_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 3 '', 4, array[3], false)', '70'); - --- The edge doesnt have any of them -SELECT results_eq(' -SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id = 3', -'SELECT 3::BIGINT, 3::BIGINT, 4::BIGINT, false, true', -'71: The edge doesnt have any of them'); - - -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '', 5, 6)', '72'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '',array[5], 6)', '73'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '',array[5], array[6])', '74'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '', 5, array[6])', '75'); - -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '', 6, 5, false)', '76'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '',array[6], 5, false)', '77'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '',array[6], array[5], false)', '78'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, reverse_cost from edge_table where id = 5 '', 6, array[5], false)', '79'); - - --- Finish the tests and clean up. +-- edge 11-16 +PREPARE edges1 AS +SELECT id, source, target, cost, reverse_cost from edges where id = 9; + +SELECT results_eq('edges1', +'SELECT 9::BIGINT, 11::BIGINT, 16::BIGINT, 1::FLOAT, 1::FLOAT', +'Edges1: 11-16'); + +SELECT taptest('is_empty','edges1', 7, 11, true); +SELECT taptest('is_empty','edges1', 11, 7, true); +SELECT taptest('is_empty','edges1', 7, 11, false); +SELECT taptest('is_empty','edges1', 11, 7, false); + + +-- edge 6-7 +PREPARE edges2 AS +SELECT id, source, target, cost, reverse_cost from edges where id = 4; + +SELECT results_eq('edges2', +'SELECT 4::BIGINT, 6::BIGINT, 7::BIGINT, 1::FLOAT, 1::FLOAT', +'Edges2: 6-7'); + +SELECT taptest('is_empty','edges2', 7, 11, true); +SELECT taptest('is_empty','edges2', 11, 7, true); +SELECT taptest('is_empty','edges2', 7, 11, false); +SELECT taptest('is_empty','edges2', 11, 7, false); + +-- edge 7-11 +PREPARE edges3 AS +SELECT id, source, target, cost, reverse_cost from edges where id = 8; + +SELECT results_eq('edges3', +'SELECT 8::BIGINT, 7::BIGINT, 11::BIGINT, 1::FLOAT, 1::FLOAT', +'Edges3: 7-11'); + +SELECT taptest('isnt_empty','edges3', 7, 11, true); +SELECT taptest('isnt_empty','edges3', 11, 7, true); +SELECT taptest('isnt_empty','edges3', 7, 11, false); +SELECT taptest('isnt_empty','edges3', 11, 7, false); + +-- edge 10->11 +PREPARE edges4 AS +SELECT id, source, target, cost, reverse_cost from edges where id = 5; + +SELECT results_eq('edges4', +'SELECT 5::BIGINT, 10::BIGINT, 11::BIGINT, 1::FLOAT, -1::FLOAT', +'edges4: 10->11'); + +SELECT taptest('is_empty','edges4', 7, 11, true); +SELECT taptest('is_empty','edges4', 11, 7, true); +SELECT taptest('is_empty','edges4', 7, 11, false); +SELECT taptest('is_empty','edges4', 11, 7, false); + +-- only 10<-15 +PREPARE edges5 AS +SELECT id, source, target, cost, reverse_cost from edges where id = 3; + +SELECT results_eq('edges5', +'SELECT 3::BIGINT, 10::BIGINT, 15::BIGINT, -1::FLOAT, 1::FLOAT', +'edges5: 10<-15'); + +SELECT taptest('is_empty','edges5', 10, 15, true); +SELECT taptest('isnt_empty','edges5', 15, 10, true); +SELECT taptest('isnt_empty','edges5', 10, 15, false); +SELECT taptest('isnt_empty','edges5', 15, 10, false); + SELECT * FROM finish(); ROLLBACK; diff --git a/pgtap/dijkstra/dijkstra/edge_cases/zero_one_edge_neg1_reverse.pg b/pgtap/dijkstra/dijkstra/edge_cases/zero_one_edge_neg1_reverse.pg index 6d366c95acf..24ccdfd92a9 100644 --- a/pgtap/dijkstra/dijkstra/edge_cases/zero_one_edge_neg1_reverse.pg +++ b/pgtap/dijkstra/dijkstra/edge_cases/zero_one_edge_neg1_reverse.pg @@ -19,233 +19,102 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; - UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(79); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); +SELECT CASE WHEN min_version('3.1.0') THEN plan(147) ELSE PLAN(119) END; -- 0 edges tests -SELECT is_empty(' SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id>18 ','1'); - --- directed graph -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id>18 '', 5, 6)', '2'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id>18 '',array[5], 6)','3'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id>18 '',array[5], array[6])', '4'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id>18 '', 5, array[6])', '5'); - --- undirected graph -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id>18 '', 5, 6, false)', '6'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id>18 '',array[5], 6, false)', '7'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id>18 '',array[5], array[6], false)', '8'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id>18 '', 5, array[6], false)', '9'); +PREPARE edges0 AS +SELECT id, source, target, cost, reverse_cost from edges where id>18; + +SELECT is_empty('edges0','Edges 0'); + +SELECT taptest('is_empty','edges0', 7, 11, true); +SELECT taptest('is_empty','edges0', 11, 7, true); +SELECT taptest('is_empty','edges0', 7, 11, false); +SELECT taptest('is_empty','edges0', 11, 7, false); -- 1 edges tests --- edge doesnt have start_vid = 5 but has end_vid = 6 -SELECT results_eq(' -SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id = 9', -'SELECT 9::BIGINT, 6::BIGINT, 9::BIGINT, true, true', -'10: Edge does not have start_vid = 5 but has end_vid = 6'); - --- directed graph - -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 9 '', 5, 6)', '11'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 9 '',array[5], 6)', '12'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 9 '',array[5], array[6])', '13'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 9 '', 5, array[6])', '14'); - --- undirected graph -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 9 '', 5, 6, false)', '15'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 9 '',array[5], 6, false)', '16'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 9 '',array[5], array[6], false)', '17'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 9 '', 5, array[6], false)', '18'); - --- edge doesnt have end_vid = 6 but has start_vid = 5 -SELECT results_eq( -'SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id = 4', -'SELECT 4::BIGINT, 2::BIGINT, 5::BIGINT, true, true', -'19: Edge doesnt have end_vid = 6 but has start_vid = 5'); - - --- directed graph -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 4 '', 5, 6)', '20'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 4 '',array[5], 6)', '21'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 4 '',array[5], array[6])', '22'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 4 '', 5, array[6])', '23'); - --- undirected graph -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 4 '', 5, 6, false)', '24'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 4 '',array[5], 6, false)', '25'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 4 '',array[5], array[6], false)', '26'); -SELECT is_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 4 '', 5, array[6], false)', '27'); - --- edge has start_vid 6 and end_vid 5 - -SELECT results_eq(' -SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id = 8', -'SELECT 8::BIGINT, 5::BIGINT, 6::BIGINT, true, true', -' 28: Edge has start_vid 6 and end_vid 5'); - -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 8 '', 5, 6)', '29'); -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 8 '',array[5], 6)', '30'); -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 8 '',array[5], array[6])', '31'); -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 8 '', 5, array[6])', '32'); - --- undirected graph -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 8 '', 5, 6, false)', '33'); -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 8 '',array[5], 6, false)', '34'); -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 8 '',array[5], array[6], false)', '35'); -SELECT isnt_empty(' -SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 8 '', 5, array[6], false)', '36'); - - --- edge has only vid = 6 but really only one edge is inserted the first one -SELECT results_eq(' -SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id = 5', -'SELECT 5::BIGINT, 3::BIGINT, 6::BIGINT, true, false', -'37: has only vid = 6 but really only one edge is inserted the first one'); - - --- directed graph -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '', 5, 6)', '38'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '',array[5], 6)', '39'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '',array[5], array[6])', '40'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '', 5, array[6])', '41'); - -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '', 6, 5)', '42'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '',array[6], 5)', '43'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '',array[6], array[5])', '44'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '', 6, array[5])', '45'); - --- undirected graph - -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '', 5, 6, false)', '46'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '',array[5], 6, false)', '47'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '',array[5], array[6], false)', '48'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '', 5, array[6], false)', '49'); - -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '', 6, 5, false)', '50'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '',array[6], 5, false)', '51'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '',array[6], array[5], false)', '52'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '', 6, array[5], false)', '53'); - - --- only answer is from 4 to 3 -SELECT results_eq(' -SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id = 3', -'SELECT 3::BIGINT, 3::BIGINT, 4::BIGINT, false, true', -'54: only answer is from 4 to 3'); - --- directed graph THIS doesnt get an answer -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '', 3, 4)', '55'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '',array[3], 4)', '56'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '',array[3], array[4])', '57'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '', 3, array[4])', '58'); - -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '', 4, 3)', '59'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '',array[4], 3)', '60'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '',array[4], array[3])', '61'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '', 4, array[3])', '62'); - --- undirected graph allways gets an answer -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '', 3, 4, false)', '63'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '',array[3], 4, false)', '64'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '',array[3], array[4], false)', '65'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '', 3, array[4], false)', '66'); - -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '', 4, 3, false)', '67'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '',array[4], 3, false)', '68'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '',array[4], array[3], false)', '69'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 3 '', 4, array[3], false)', '70'); - --- The edge doesnt have any of them -SELECT results_eq(' -SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id = 3', -'SELECT 3::BIGINT, 3::BIGINT, 4::BIGINT, false, true', -'71: The edge doesnt have any of them'); - - -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '', 5, 6)', '72'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '',array[5], 6)', '73'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '',array[5], array[6])', '74'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '', 5, array[6])', '75'); - -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '', 6, 5, false)', '76'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '',array[6], 5, false)', '77'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '',array[6], array[5], false)', '78'); -SELECT is_empty(' - SELECT * from pgr_dijkstra(''SELECT id, source, target, cost, -1 AS reverse_cost from edge_table where id = 5 '', 6, array[5], false)', '79'); +-- edge 11->16 +PREPARE edges1 AS +SELECT id, source, target, cost, -1::FLOAT AS reverse_cost from edges where id = 9; + +SELECT results_eq('edges1', +'SELECT 9::BIGINT, 11::BIGINT, 16::BIGINT, 1::FLOAT, -1::FLOAT', +'Edges1: 11 -> 16'); + +SELECT taptest('is_empty','edges1', 7, 11, true); +SELECT taptest('is_empty','edges1', 11, 7, true); +SELECT taptest('is_empty','edges1', 7, 11, false); +SELECT taptest('is_empty','edges1', 11, 7, false); + +-- edge 6->7 +PREPARE edges2 AS +SELECT id, source, target, cost, -1::FLOAT AS reverse_cost from edges where id = 4; + +SELECT results_eq('edges2', +'SELECT 4::BIGINT, 6::BIGINT, 7::BIGINT, 1::FLOAT, -1::FLOAT', +'Edges2: 6 -> 7'); + +SELECT taptest('is_empty','edges2', 7, 11, true); +SELECT taptest('is_empty','edges2', 11, 7, true); +SELECT taptest('is_empty','edges2', 7, 11, false); +SELECT taptest('is_empty','edges2', 11, 7, false); + +-- edge 7->11 +PREPARE edges3 AS +SELECT id, source, target, cost, -1::FLOAT AS reverse_cost from edges where id = 8; + +SELECT results_eq('edges3', +'SELECT 8::BIGINT, 7::BIGINT, 11::BIGINT, 1::FLOAT, -1::FLOAT', +'Edges3: 7 -> 11'); + +SELECT taptest('isnt_empty','edges3', 7, 11, true); +SELECT taptest('is_empty','edges3', 11, 7, true); +SELECT taptest('isnt_empty','edges3', 7, 11, false); +SELECT taptest('isnt_empty','edges3', 11, 7, false); + + +-- edge 10->11 +PREPARE edges4 AS +SELECT id, source, target, cost, -1::FLOAT AS reverse_cost from edges where id = 5; + +SELECT results_eq('edges4', +'SELECT 5::BIGINT, 10::BIGINT, 11::BIGINT, 1::FLOAT, -1::FLOAT', +'edges4: 10 -> 11'); + +SELECT taptest('is_empty','edges4', 7, 11, true); +SELECT taptest('is_empty','edges4', 11, 7, true); +SELECT taptest('is_empty','edges4', 7, 11, false); +SELECT taptest('is_empty','edges4', 11, 7, false); + +-- vertices 10 15 +PREPARE edges5 AS +SELECT id, source, target, cost, -1::FLOAT AS reverse_cost from edges where id = 3; + +SELECT results_eq('edges5', +'SELECT 3::BIGINT, 10::BIGINT, 15::BIGINT, -1::FLOAT, -1::FLOAT', +'edges5: only vertices 10 15'); + +SELECT taptest('is_empty','edges5', 10, 15, true); +SELECT taptest('is_empty','edges5', 15, 10, true); +SELECT taptest('is_empty','edges5', 10, 15, false); +SELECT taptest('is_empty','edges5', 15, 10, false); + +-- edge 8->12 +PREPARE edges6 AS +SELECT id, source, target, cost, -1::FLOAT AS reverse_cost from edges where id = 12; + +SELECT results_eq('edges6', +'SELECT 12::BIGINT, 8::BIGINT, 12::BIGINT, 1::FLOAT, -1::FLOAT', +'edges5: 8 -> 12'); +SELECT taptest('is_empty','edges6', 7, 11, true); +SELECT taptest('is_empty','edges6', 11, 7, true); +SELECT taptest('is_empty','edges6', 7, 11, false); +SELECT taptest('is_empty','edges6', 11, 7, false); -- Finish the tests and clean up. SELECT * FROM finish(); diff --git a/pgtap/dijkstra/dijkstra/edge_cases/zero_one_edge_no_reverse.pg b/pgtap/dijkstra/dijkstra/edge_cases/zero_one_edge_no_reverse.pg index f9e648cb9fa..994c3894b8a 100644 --- a/pgtap/dijkstra/dijkstra/edge_cases/zero_one_edge_no_reverse.pg +++ b/pgtap/dijkstra/dijkstra/edge_cases/zero_one_edge_no_reverse.pg @@ -19,102 +19,89 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT CASE WHEN min_version('3.1.0') THEN plan(130) ELSE plan(104) END; - -CREATE OR REPLACE FUNCTION do_test(TEXT, BIGINT, BIGINT) -RETURNS SETOF TEXT AS -$BODY$ -BEGIN - -- directed graph - RETURN QUERY - SELECT is_empty(format($$SELECT * from pgr_dijkstra(%1$L, %2$s, %3$s)$$,$1,$2,$3), 'D. One to one ' || $1); - RETURN QUERY - SELECT is_empty(format($$SELECT * from pgr_dijkstra(%1$L, ARRAY[%2$s], %3$s)$$,$1,$2,$3), 'D. One to many- ' || $1); - RETURN QUERY - SELECT is_empty(format($$SELECT * from pgr_dijkstra(%1$L, %2$s, ARRAY[%3$s])$$,$1,$2,$3), 'D. Many to one- ' || $1); - RETURN QUERY - SELECT is_empty(format($$SELECT * from pgr_dijkstra(%1$L, ARRAY[%2$s], ARRAY[%3$s])$$,$1,$2,$3), 'D. Many to Many- ' || $1); - - -- undirected graph - RETURN QUERY - SELECT is_empty(format($$SELECT * from pgr_dijkstra(%1$L, %2$s, %3$s, false)$$,$1,$2,$3), 'D. One to one ' || $1); - RETURN QUERY - SELECT is_empty(format($$SELECT * from pgr_dijkstra(%1$L, ARRAY[%2$s], %3$s, false)$$,$1,$2,$3), 'D. One to many- ' || $1); - RETURN QUERY - SELECT is_empty(format($$SELECT * from pgr_dijkstra(%1$L, %2$s, ARRAY[%3$s], false)$$,$1,$2,$3), 'D. Many to one- ' || $1); - RETURN QUERY - SELECT is_empty(format($$SELECT * from pgr_dijkstra(%1$L, ARRAY[%2$s], ARRAY[%3$s], false)$$,$1,$2,$3), 'D. Many to Many- ' || $1); - - IF min_version('3.1.0') THEN - RETURN QUERY SELECT is_empty(format($$SELECT * from pgr_dijkstra(%1$L, 'combination', false)$$,$1), 'D. Combinations- ' || $1); - RETURN QUERY SELECT is_empty(format($$SELECT * from pgr_dijkstra(%1$L, 'combination')$$,$1), 'D. Combinations- ' || $1); - END IF; - -END; -$BODY$ -LANGUAGE plpgsql VOLATILE; - - -PREPARE combination AS -SELECT 5 AS source, 6 AS target; +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); +SELECT CASE WHEN min_version('3.1.0') THEN plan(126) ELSE PLAN(102) END; -- 0 edges tests -PREPARE empty_edges AS -SELECT id, source, target, cost FROM edge_table WHERE id > 18; -SELECT do_test('empty_edges', 5, 6); -SELECT do_test('empty_edges', 6, 5); +PREPARE edges0 AS +SELECT id, source, target, cost from edges where id>18; + +SELECT is_empty('edges0','Edges 0'); + +SELECT taptest('is_empty','edges0', 7, 11, true); +SELECT taptest('is_empty','edges0', 11, 7, true); +SELECT taptest('is_empty','edges0', 7, 11, false); +SELECT taptest('is_empty','edges0', 11, 7, false); -- 1 edges tests -PREPARE edge_9_6 AS -SELECT id, source, target, cost FROM edge_table WHERE id = 9; -SELECT do_test('edge_9_6', 5, 6); -SELECT do_test('edge_9_6', 6, 5); - - -PREPARE edge_4_5 AS -SELECT id, source, target, cost FROM edge_table WHERE id = 4; -SELECT do_test('edge_4_5', 5, 6); -SELECT do_test('edge_4_5', 6, 5); - -PREPARE edge_3_6 AS -SELECT id, source, target, cost FROM edge_table WHERE id = 5; -SELECT do_test('edge_3_6', 5, 6); -SELECT do_test('edge_3_6', 6, 5); - -PREPARE edge_3_4 AS -SELECT id, source, target, cost FROM edge_table WHERE id = 3; -SELECT do_test('edge_3_4', 3, 4); -SELECT do_test('edge_3_4', 4, 3); -SELECT do_test('edge_3_4', 5, 6); -SELECT do_test('edge_3_4', 6, 5); - --- There is a solution -PREPARE edge_5_6 AS -SELECT id, source, target, cost FROM edge_table WHERE id = 8; - --- directed graph -SELECT isnt_empty($$SELECT * from pgr_dijkstra('edge_5_6', 5, 6)$$, 'D. One to one- edge_5_6 -> no result'); -SELECT isnt_empty($$SELECT * from pgr_dijkstra('edge_5_6', ARRAY[5], 6)$$, 'D. One to many- edge_5_6 -> no result'); -SELECT isnt_empty($$SELECT * from pgr_dijkstra('edge_5_6', 5, ARRAY[6])$$, 'D. Many to one- edge_5_6 -> no result'); -SELECT isnt_empty($$SELECT * from pgr_dijkstra('edge_5_6', ARRAY[5], ARRAY[6])$$, 'D. Many to Many- edge_5_6 -> no result'); - --- undirected graph -SELECT isnt_empty($$SELECT * from pgr_dijkstra('edge_5_6', 5, 6, false)$$, 'U. One to one- edge_5_6 -> no result'); -SELECT isnt_empty($$SELECT * from pgr_dijkstra('edge_5_6', ARRAY[5], 6, false)$$, 'U. One to many- edge_5_6 -> no result'); -SELECT isnt_empty($$SELECT * from pgr_dijkstra('edge_5_6', 5, ARRAY[6], false)$$, 'U. Many to one- edge_5_6 -> no result'); -SELECT isnt_empty($$SELECT * from pgr_dijkstra('edge_5_6', ARRAY[5], ARRAY[6], false)$$, 'U. Many to Many- edge_5_6 -> no result'); - -SELECT CASE -WHEN min_version('3.1.0') THEN - collect_tap( - isnt_empty($$SELECT * from pgr_dijkstra('edge_5_6', 'combination')$$, 'D. Combinations- edge_5_6 -> no result'), - isnt_empty($$SELECT * from pgr_dijkstra('edge_5_6', 'combination', false)$$, 'U. Combinations- edge_5_6 -> no result') - ) -END; +-- edge 11->16 +PREPARE edges1 AS +SELECT id, source, target, cost from edges where id = 9; + +SELECT results_eq('edges1', +'SELECT 9::BIGINT, 11::BIGINT, 16::BIGINT, 1::FLOAT', +'Edges1: 11->16'); + +SELECT taptest('is_empty','edges1', 7, 11, true); +SELECT taptest('is_empty','edges1', 11, 7, true); +SELECT taptest('is_empty','edges1', 7, 11, false); +SELECT taptest('is_empty','edges1', 11, 7, false); + + +-- edge 6->7 +PREPARE edges2 AS +SELECT id, source, target, cost from edges where id = 4; + +SELECT results_eq('edges2', +'SELECT 4::BIGINT, 6::BIGINT, 7::BIGINT, 1::FLOAT', +'Edges2: 6->7'); + +SELECT taptest('is_empty','edges2', 7, 11, true); +SELECT taptest('is_empty','edges2', 11, 7, true); +SELECT taptest('is_empty','edges2', 7, 11, false); +SELECT taptest('is_empty','edges2', 11, 7, false); + +-- edge 7->11 +PREPARE edges3 AS +SELECT id, source, target, cost from edges where id = 8; + +SELECT results_eq('edges3', +'SELECT 8::BIGINT, 7::BIGINT, 11::BIGINT, 1::FLOAT', +'Edges3: 7->11'); + +SELECT taptest('isnt_empty','edges3', 7, 11, true); +SELECT taptest('is_empty','edges3', 11, 7, true); +SELECT taptest('isnt_empty','edges3', 7, 11, false); +SELECT taptest('isnt_empty','edges3', 11, 7, false); + +-- edge 10->11 +PREPARE edges4 AS +SELECT id, source, target, cost from edges where id = 5; + +SELECT results_eq('edges4', +'SELECT 5::BIGINT, 10::BIGINT, 11::BIGINT, 1::FLOAT', +'edges4: 10->11'); + +SELECT taptest('is_empty','edges4', 7, 11, true); +SELECT taptest('is_empty','edges4', 11, 7, true); +SELECT taptest('is_empty','edges4', 7, 11, false); +SELECT taptest('is_empty','edges4', 11, 7, false); + +-- only 10 15 +PREPARE edges5 AS +SELECT id, source, target, cost from edges where id = 3; + +SELECT results_eq('edges5', +'SELECT 3::BIGINT, 10::BIGINT, 15::BIGINT, -1::FLOAT', +'edges5: 10 15'); + +SELECT taptest('is_empty','edges5', 10, 15, true); +SELECT taptest('is_empty','edges5', 15, 10, true); +SELECT taptest('is_empty','edges5', 10, 15, false); +SELECT taptest('is_empty','edges5', 15, 10, false); SELECT * FROM finish(); ROLLBACK; diff --git a/pgtap/dijkstra/dijkstra/inner_query.pg b/pgtap/dijkstra/dijkstra/inner_query.pg index c5b6d287bfe..c5b577ce31d 100644 --- a/pgtap/dijkstra/dijkstra/inner_query.pg +++ b/pgtap/dijkstra/dijkstra/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.1.0') THEN plan(282) ELSE plan(218) END; @@ -37,8 +37,8 @@ CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.1.0') THEN - RETURN QUERY SELECT style_dijkstra('pgr_dijkstra(', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_dijkstra($$SELECT * FROM edge_table$$,',', true)'); + RETURN QUERY SELECT style_dijkstra('pgr_dijkstra(', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_dijkstra($$SELECT * FROM edges$$,',', true)'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.1.0'); END IF; diff --git a/pgtap/dijkstra/dijkstra/no_crash_test.pg b/pgtap/dijkstra/dijkstra/no_crash_test.pg index 907ad3944a8..58105f220ec 100644 --- a/pgtap/dijkstra/dijkstra/no_crash_test.pg +++ b/pgtap/dijkstra/dijkstra/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.1.0') THEN plan(81) ELSE plan(68) END; SELECT no_crash_dijkstra('pgr_dijkstra'); diff --git a/pgtap/dijkstra/dijkstraCost/edge_cases/empty_combinations_empty_result.pg b/pgtap/dijkstra/dijkstraCost/edge_cases/empty_combinations_empty_result.pg index aff0fb116c0..57627d9e432 100644 --- a/pgtap/dijkstra/dijkstraCost/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/dijkstra/dijkstraCost/edge_cases/empty_combinations_empty_result.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(1); create or REPLACE FUNCTION foo() @@ -37,8 +37,8 @@ BEGIN RETURN query SELECT is_empty( 'SELECT start_vid, end_vid, agg_cost FROM pgr_dijkstraCost( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', - ''SELECT * FROM combinations_table WHERE source=-1'' ) ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', + ''SELECT * FROM combinations WHERE source=-1'' ) ' ); END $BODY$ diff --git a/pgtap/dijkstra/dijkstraCost/edge_cases/remaining_tests.pg b/pgtap/dijkstra/dijkstraCost/edge_cases/remaining_tests.pg deleted file mode 100644 index c8b55247fe0..00000000000 --- a/pgtap/dijkstra/dijkstraCost/edge_cases/remaining_tests.pg +++ /dev/null @@ -1,313 +0,0 @@ - -/*PGR-GNU***************************************************************** - -Copyright (c) 2018 pgRouting developers -Mail: project@pgrouting.org - ------- -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - ********************************************************************PGR-GNU*/ - -BEGIN; - -SET client_min_messages TO WARNING; - -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(33); - - - - --- testing for the 4 signatures that they return the correct names & columns --- Preparing -PREPARE v21q00 AS -SELECT - pg_typeof(start_vid)::text AS t3, pg_typeof(end_vid)::text AS t4, - pg_typeof(agg_cost)::TEXT AS t8 - FROM ( - SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', - 2, 3, true) ) AS a - limit 1 -; -PREPARE v21q01 AS -SELECT - 'bigint'::text AS t3, 'bigint'::text AS t4, - 'double precision'::text AS t8; - -PREPARE v21q10 AS -SELECT - pg_typeof(start_vid)::text AS t3, pg_typeof(end_vid)::text AS t4, - pg_typeof(agg_cost)::TEXT AS t8 - FROM ( - SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', - 2, ARRAY[3], true) ) AS a - limit 1 -; -PREPARE v21q11 AS -SELECT - 'bigint'::text AS t3, 'bigint'::text AS t4, - 'double precision'::text AS t8; - - -PREPARE v21q20 AS -SELECT - pg_typeof(start_vid)::text AS t3, pg_typeof(end_vid)::text AS t4, - pg_typeof(agg_cost)::TEXT AS t8 - FROM ( - SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', - ARRAY[2], 3, true) ) AS a - limit 1 -; -PREPARE v21q21 AS -SELECT - 'bigint'::text AS t3, 'bigint'::text AS t4, - 'double precision'::text AS t8; - -PREPARE v21q30 AS -SELECT - pg_typeof(start_vid)::text AS t3, pg_typeof(end_vid)::text AS t4, - pg_typeof(agg_cost)::TEXT AS t8 - FROM ( - SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', - ARRAY[2], ARRAY[3], true) ) AS a - limit 1 -; -PREPARE v21q31 AS -SELECT - 'bigint'::text AS t3, 'bigint'::text AS t4, - 'double precision'::text AS t8; - --- testing -SELECT set_eq('v21q00', 'v21q01','1 to 1: Expected returning, columns names & types'); -SELECT set_eq('v21q10', 'v21q11','1 to many: Expected returning, columns names & types'); -SELECT set_eq('v21q20', 'v21q21','many to 1: Expected returning, columns names & types'); -SELECT set_eq('v21q30', 'v21q31','many to many: Expected returning, columns names & types'); - - --- CHECKING WORKS WITH & WITOUT REVERSE COST - -PREPARE v20q1 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', - 2, 3, true); -PREPARE v20q3 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', - 2, 3, false); - -SELECT lives_ok('v20q1','with reverse cost 1'); -SELECT lives_ok('v20q3','with reverse cost 3'); - -PREPARE v20q5 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, true); - -PREPARE v20q6 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); - - -SELECT lives_ok('v20q5','without reverse cost 1'); -SELECT lives_ok('v20q6','without reverse cost 2'); - --- V2.0 --- CHECKING INNER QUERY --- ANY-INTEGER, ANY-INTEGER, ANY-INTEGER, ANY-NUMERIC, [ANY-NUMERIC] - -/* TEST USES THE EDGES_INPUT FOR 5 PARAMETERS */ - ---id ANY-INTEGER -PREPARE v200id1 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::SMALLINT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200id2 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::BIGINT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200id3 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::FLOAT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200id4 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::REAL, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200id5 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::TEXT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); - -SELECT lives_ok('v200id1', - 'lives because id is SMALLINT'); -SELECT lives_ok('v200id2', - 'lives because id is BIGINT'); -SELECT throws_ok('v200id3', - 'XX000','Unexpected Column ''id'' type. Expected ANY-INTEGER', - 'throws because id is REAL'); -SELECT throws_ok('v200id4', - 'XX000','Unexpected Column ''id'' type. Expected ANY-INTEGER', - 'throws because id is FLOAT'); -SELECT throws_ok('v200id5', - 'XX000','Unexpected Column ''id'' type. Expected ANY-INTEGER', - 'throws because id is TEXT'); - ---source is only integer -PREPARE v200s1 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::SMALLINT, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200s2 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::BIGINT, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200s3 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::REAL, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200s4 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::FLOAT, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200s5 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::TEXT, target::INTEGER, cost::FLOAT FROM edge_table', - 2, 3, false); - -SELECT lives_ok('v200s1', - 'lives because source is SMALLINT'); -SELECT lives_ok('v200s2', - 'lives because source is BIGINT'); -SELECT throws_ok('v200s3', - 'XX000','Unexpected Column ''source'' type. Expected ANY-INTEGER', - 'throws because source is REAL'); -SELECT throws_ok('v200s4', - 'XX000','Unexpected Column ''source'' type. Expected ANY-INTEGER', - 'throws because source is FLOAT'); -SELECT throws_ok('v200s5', - 'XX000','Unexpected Column ''source'' type. Expected ANY-INTEGER', - 'throws because id is TEXT'); - - ---target is only integer -PREPARE v200t1 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::SMALLINT, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200t2 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::BIGINT, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200t3 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::FLOAT, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200t4 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::REAL, cost::FLOAT FROM edge_table', - 2, 3, false); -PREPARE v200t5 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::TEXT, cost::FLOAT FROM edge_table', - 2, 3, false); - -SELECT lives_ok('v200t1', - 'lives because target is SMALLINT'); -SELECT lives_ok('v200t2', - 'lives because target is BIGINT'); -SELECT throws_ok('v200t3', - 'XX000','Unexpected Column ''target'' type. Expected ANY-INTEGER', - 'throws because target is REAL'); -SELECT throws_ok('v200t4', - 'XX000','Unexpected Column ''target'' type. Expected ANY-INTEGER', - 'throws because target is FLOAT'); -SELECT throws_ok('v200t5', - 'XX000','Unexpected Column ''target'' type. Expected ANY-INTEGER', - 'throws because target is TEXT'); - --- cost -PREPARE v200c1 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::SMALLINT FROM edge_table', - 2, 3, false); -PREPARE v200c2 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER FROM edge_table', - 2, 3, false); -PREPARE v200c3 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::BIGINT FROM edge_table', - 2, 3, false); -PREPARE v200c4 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::REAL FROM edge_table', - 2, 3, false); -PREPARE v200c5 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::TEXT FROM edge_table', - 2, 3, false); - -SELECT lives_ok('v200c1', - 'lives because cost is SMALLINT'); -SELECT lives_ok('v200c2', - 'lives because cost is INTEGER'); -SELECT lives_ok('v200c3', - 'lives because cost is BIGINT'); -SELECT lives_ok('v200c4', - 'lives because cost is REAL'); -SELECT throws_ok('v200c5', - 'XX000','Unexpected Column ''cost'' type. Expected ANY-NUMERICAL', - 'throws because cost is TEXT'); - --- reverse_cost -PREPARE v200r1 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::SMALLINT FROM edge_table', - 2, 3, false); -PREPARE v200r2 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::INTEGER FROM edge_table', - 2, 3, false); -PREPARE v200r3 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::BIGINT FROM edge_table', - 2, 3, false); -PREPARE v200r4 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::REAL FROM edge_table', - 2, 3, false); -PREPARE v200r5 AS -SELECT * FROM pgr_dijkstracost( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::TEXT FROM edge_table', - 2, 3, false); - -SELECT lives_ok('v200r1', - 'lives because reverse_cost is SMALLINT'); -SELECT lives_ok('v200r2', - 'lives because reverse_cost is INTEGER'); -SELECT lives_ok('v200r3', - 'lives because reverse_cost is BIGINT'); -SELECT lives_ok('v200r4', - 'lives because reverse_cost is REAL'); -SELECT throws_ok('v200r5', - 'XX000','Unexpected Column ''reverse_cost'' type. Expected ANY-NUMERICAL', - 'throws because reverse_cost is TEXT'); - -SELECT finish(); -ROLLBACK; diff --git a/pgtap/dijkstra/dijkstraCost/inner_query.pg b/pgtap/dijkstra/dijkstraCost/inner_query.pg index 8029bad285f..e5c33ee1529 100644 --- a/pgtap/dijkstra/dijkstraCost/inner_query.pg +++ b/pgtap/dijkstra/dijkstraCost/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.1.0') THEN plan(282) ELSE plan(218) END; @@ -37,8 +37,8 @@ CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.1.0') THEN - RETURN QUERY SELECT style_dijkstra('pgr_dijkstraCost(', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_dijkstraCost($$SELECT * FROM edge_table$$,',', true)'); + RETURN QUERY SELECT style_dijkstra('pgr_dijkstraCost(', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_dijkstraCost($$SELECT * FROM edges$$,',', true)'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.1.0'); END IF; diff --git a/pgtap/dijkstra/dijkstraCost/no_crash_test.pg b/pgtap/dijkstra/dijkstraCost/no_crash_test.pg index 8ed9e80825f..2319fa46d32 100644 --- a/pgtap/dijkstra/dijkstraCost/no_crash_test.pg +++ b/pgtap/dijkstra/dijkstraCost/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.1.0') THEN plan(81) ELSE plan(68) END; SELECT no_crash_dijkstra('pgr_dijkstraCost'); diff --git a/pgtap/dijkstra/dijkstraCostMatrix/inner_query.pg b/pgtap/dijkstra/dijkstraCostMatrix/inner_query.pg index 145d3c9cad9..0b139e86680 100644 --- a/pgtap/dijkstra/dijkstraCostMatrix/inner_query.pg +++ b/pgtap/dijkstra/dijkstraCostMatrix/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); -- ONE MATRIX diff --git a/pgtap/dijkstra/dijkstraCostMatrix/no_crash_test.pg b/pgtap/dijkstra/dijkstraCostMatrix/no_crash_test.pg index fc4402b3693..a6a15810711 100644 --- a/pgtap/dijkstra/dijkstraCostMatrix/no_crash_test.pg +++ b/pgtap/dijkstra/dijkstraCostMatrix/no_crash_test.pg @@ -19,14 +19,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(14); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); SELECT set_eq('null_ret', 'SELECT NULL::BIGINT[]', 'Should be empty to tests be meaningful'); @@ -39,10 +39,10 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY['$$edges$$','ARRAY[1,2]::BIGINT[]']::TEXT[]; + params = ARRAY['$$edges$$','ARRAY[5,6]::BIGINT[]']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_dijkstraCostMatrix', params, subs); diff --git a/pgtap/dijkstra/dijkstraNear/compare_dijkstra.pg b/pgtap/dijkstra/dijkstraNear/compare_dijkstra.pg index 2d5a50c9518..65fd51c7cc1 100644 --- a/pgtap/dijkstra/dijkstraNear/compare_dijkstra.pg +++ b/pgtap/dijkstra/dijkstraNear/compare_dijkstra.pg @@ -21,7 +21,7 @@ BEGIN; SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(142) END; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; @@ -29,25 +29,25 @@ CREATE TABLE expected AS WITH a AS (SELECT start_vid, d_w_1, u_w_1, d_n_1, u_n_1, d_w_2, u_w_2, d_n_2, u_n_2 FROM (VALUES - (1::BIGINT, - ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], - ARRAY[2,5]::BIGINT[], ARRAY[2,3]::BIGINT[], ARRAY[2,5]::BIGINT[], ARRAY[2, 5]::BIGINT[]), - (2, ARRAY[ 1], ARRAY[ 1], ARRAY[ 5], ARRAY[ 1], ARRAY[1, 5], ARRAY[1, 3], ARRAY[5, 6], ARRAY[1, 5]), - (3, ARRAY[ 2], ARRAY[ 2], ARRAY[ 6], ARRAY[ 6], ARRAY[2, 6], ARRAY[2, 4], ARRAY[6, 9], ARRAY[5, 6]), - (4, ARRAY[ 3], ARRAY[ 3], ARRAY[ 9], ARRAY[ 9], ARRAY[3, 9], ARRAY[3, 9], ARRAY[9, 12], ARRAY[6, 9]), - (5, ARRAY[ 2], ARRAY[ 2], ARRAY[ 6], ARRAY[ 2], ARRAY[2, 8], ARRAY[2, 8], ARRAY[6, 10], ARRAY[2, 8]), - (6, ARRAY[ 5], ARRAY[ 3], ARRAY[ 9], ARRAY[ 3], ARRAY[5, 9], ARRAY[3, 5], ARRAY[9, 11], ARRAY[3, 5]), - (7, ARRAY[ 8], ARRAY[ 8], ARRAY[ 8], ARRAY[ 8], ARRAY[5, 8], ARRAY[5, 8], ARRAY[5, 8], ARRAY[5, 8]), - (8, ARRAY[ 7], ARRAY[ 7], ARRAY[ 5], ARRAY[ 7], ARRAY[5, 7], ARRAY[5, 7], ARRAY[5, 6], ARRAY[5, 7]), - (9, ARRAY[ 6], ARRAY[ 6], ARRAY[12], ARRAY[ 6], ARRAY[6,12], ARRAY[6, 12], ARRAY[12], ARRAY[6, 12]), - (10, ARRAY[ 5], ARRAY[ 5], ARRAY[11], ARRAY[ 5], ARRAY[5,11], ARRAY[5, 11], ARRAY[11, 13], ARRAY[5, 11]), - (11, ARRAY[12], ARRAY[ 6], ARRAY[12], ARRAY[ 6], ARRAY[9,12], ARRAY[6, 10], ARRAY[12], ARRAY[6, 10]), - (12, ARRAY[ 9], ARRAY[11], NULL, ARRAY[ 11], ARRAY[6, 9], ARRAY[9, 11], NULL, ARRAY[9, 11]), - (13, ARRAY[10], ARRAY[10], NULL, ARRAY[ 10], ARRAY[5,10], ARRAY[5, 10], NULL, ARRAY[5, 10]), - (14, ARRAY[15], ARRAY[15], ARRAY[15], ARRAY[ 15], ARRAY[15], ARRAY[15], ARRAY[15], ARRAY[15]), - (15, ARRAY[14], ARRAY[14], NULL, ARRAY[ 14], ARRAY[14], ARRAY[14], NULL, ARRAY[14]), - (16, ARRAY[17], ARRAY[17], ARRAY[17], ARRAY[ 17], ARRAY[17], ARRAY[17], ARRAY[17], ARRAY[17]), - (17, ARRAY[16], ARRAY[16], NULL, ARRAY[ 16], ARRAY[16], ARRAY[16], NULL, ARRAY[16]) + (5::BIGINT, + ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], + ARRAY[6,7]::BIGINT[], ARRAY[6,10]::BIGINT[], ARRAY[6,7]::BIGINT[], ARRAY[6, 7]::BIGINT[]), + (6, ARRAY[ 5], ARRAY[ 5], ARRAY[ 7], ARRAY[ 5], ARRAY[5,7], ARRAY[5,10], ARRAY[7,11], ARRAY[5,7]), + (10,ARRAY[ 6], ARRAY[ 6], ARRAY[11], ARRAY[11], ARRAY[6,11], ARRAY[6,15], ARRAY[11,16],ARRAY[7,11]), + (15,ARRAY[10], ARRAY[10], ARRAY[16], ARRAY[16], ARRAY[10,16],ARRAY[10,16],ARRAY[16,17],ARRAY[11,16]), + (7, ARRAY[ 6], ARRAY[ 6], ARRAY[11], ARRAY[ 6], ARRAY[6,3], ARRAY[6,3], ARRAY[11,8], ARRAY[6,3]), + (11,ARRAY[ 7], ARRAY[10], ARRAY[16], ARRAY[10], ARRAY[7,16], ARRAY[10,7], ARRAY[16,12],ARRAY[10,7]), + (1, ARRAY[ 3], ARRAY[ 3], ARRAY[ 3], ARRAY[ 3], ARRAY[7,3], ARRAY[7,3], ARRAY[7,3], ARRAY[7,3]), + (3, ARRAY[ 1], ARRAY[ 1], ARRAY[ 7], ARRAY[ 1], ARRAY[7,1], ARRAY[7,1], ARRAY[7,11], ARRAY[7,1]), + (16,ARRAY[11], ARRAY[11], ARRAY[17], ARRAY[11], ARRAY[11,17],ARRAY[11,17],ARRAY[17], ARRAY[11,17]), + (8, ARRAY[ 7], ARRAY[ 7], ARRAY[12], ARRAY[ 7], ARRAY[7,12], ARRAY[7,12], ARRAY[12,9], ARRAY[7,12]), + (12,ARRAY[17], ARRAY[11], ARRAY[17], ARRAY[11], ARRAY[16,17],ARRAY[11,8], ARRAY[17], ARRAY[11,8]), + (17,ARRAY[16], ARRAY[12], NULL, ARRAY[12], ARRAY[11,16],ARRAY[16,12],NULL, ARRAY[16,12]), + (9, ARRAY[8], ARRAY[8], NULL, ARRAY[ 8], ARRAY[7,8], ARRAY[7,8], NULL, ARRAY[7,8]), + (2, ARRAY[4], ARRAY[4], ARRAY[4], ARRAY[ 4], ARRAY[4], ARRAY[4], ARRAY[4], ARRAY[4]), + (4, ARRAY[2], ARRAY[2], NULL, ARRAY[ 2], ARRAY[2], ARRAY[2], NULL, ARRAY[2]), + (13,ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[14]), + (14,ARRAY[13], ARRAY[13], NULL, ARRAY[13], ARRAY[13], ARRAY[13], NULL, ARRAY[13]) ) t(start_vid, d_w_1, u_w_1, d_n_1, u_n_1, d_w_2, u_w_2, d_n_2, u_n_2)) SELECT * from a; @@ -65,7 +65,7 @@ BEGIN FROM pgr_dijkstraNear( %1$L, %2$s, - (SELECT array_agg(id) FROM edge_table_vertices_pgr where id != %2$s), + (SELECT array_agg(id) FROM vertices where id != %2$s), %3$s); $$, edges_q, id, optionals_n); dijkstra_query := format($$ @@ -98,44 +98,44 @@ IF NOT min_version('3.2.0') THEN END IF; RETURN QUERY -SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table$$); +SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edges$$); RETURN QUERY -SELECT isnt_empty($$SELECT id FROM edge_table_vertices_pgr$$); +SELECT isnt_empty($$SELECT id FROM vertices$$); -- vertex id values that dont exist RETURN QUERY -SELECT is_empty($$SELECT id FROM edge_table_vertices_pgr WHERE id > 18$$); +SELECT is_empty($$SELECT id FROM vertices WHERE id > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE source > 18$$); +SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edges WHERE source > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE target > 18$$); +SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edges WHERE target > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id FROM edge_table WHERE id > 18$$); +SELECT is_empty($$SELECT id FROM edges WHERE id > 18$$); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, d_w_1 AS scnd FROM expected$$, 'directed => true, cap => 1', 'directed => true' ); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, u_w_1 AS scnd FROM expected$$, 'directed => false, cap => 1', 'directed => false' ); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, d_n_1 AS scnd FROM expected$$, 'directed => true, cap => 1', 'directed => true' ); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, u_n_1 AS scnd FROM expected$$, 'directed => false, cap => 1', 'directed => false' ); @@ -143,28 +143,28 @@ SELECT * from check_compare( RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, d_w_2 AS scnd FROM expected$$, 'directed => true, cap => 2', 'directed => true' ); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, u_w_2 AS scnd FROM expected$$, 'directed => false, cap => 2', 'directed => false' ); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, d_n_2 AS scnd FROM expected$$, 'directed => true, cap => 2', 'directed => true' ); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, u_n_2 AS scnd FROM expected$$, 'directed => false, cap => 2', 'directed => false' ); diff --git a/pgtap/dijkstra/dijkstraNear/edge_cases.pg b/pgtap/dijkstra/dijkstraNear/edge_cases.pg index d2299472e03..f8ee9351014 100644 --- a/pgtap/dijkstra/dijkstraNear/edge_cases.pg +++ b/pgtap/dijkstra/dijkstraNear/edge_cases.pg @@ -21,7 +21,7 @@ BEGIN; SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(122) END; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); @@ -29,24 +29,24 @@ CREATE TABLE expected AS WITH a AS (SELECT start_vid, d_w_1, u_w_1, d_n_1, u_n_1 FROM (VALUES - (1::BIGINT, - ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[]), - (2, ARRAY[ 1, 5], ARRAY[ 1, 3, 5], ARRAY[ 5], ARRAY[ 1, 5]), - (3, ARRAY[ 2, 6], ARRAY[ 2, 4, 6], ARRAY[ 6], ARRAY[ 6]), - (4, ARRAY[ 3, 9], ARRAY[ 3, 9], ARRAY[ 9], ARRAY[ 9]), - (5, ARRAY[ 2, 6, 8, 10], ARRAY[ 2, 6, 8, 10], ARRAY[ 6, 10], ARRAY[ 2, 6, 8, 10]), - (6, ARRAY[ 5, 9, 11], ARRAY[ 3, 5, 9, 11], ARRAY[ 9, 11], ARRAY[ 3, 5, 9, 11]), - (7, ARRAY[ 8], ARRAY[ 8], ARRAY[ 8], ARRAY[ 8]), - (8, ARRAY[ 5, 7], ARRAY[ 5, 7], ARRAY[ 5], ARRAY[ 5, 7]), - (9, ARRAY[ 4, 6, 12], ARRAY[ 4, 6, 12], ARRAY[12], ARRAY[ 4, 6, 12]), - (10, ARRAY[ 5, 11, 13], ARRAY[ 5, 11, 13], ARRAY[11, 13], ARRAY[ 5, 11, 13]), - (11, ARRAY[12], ARRAY[ 6, 10, 12], ARRAY[12], ARRAY[ 6, 10, 12]), - (12, ARRAY[ 9], ARRAY[9, 11], NULL, ARRAY[ 9, 11]), - (13, ARRAY[10], ARRAY[10], NULL, ARRAY[ 10]), - (14, ARRAY[15], ARRAY[15], ARRAY[15], ARRAY[ 15]), - (15, ARRAY[14], ARRAY[14], NULL, ARRAY[ 14]), - (16, ARRAY[17], ARRAY[17], ARRAY[17], ARRAY[ 17]), - (17, ARRAY[16], ARRAY[16], NULL, ARRAY[ 16]) + (5::BIGINT, + ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[]), + (6, ARRAY[ 5, 7], ARRAY[ 5, 10, 7], ARRAY[ 7], ARRAY[ 5, 7]), + (10, ARRAY[ 6, 11], ARRAY[ 6, 15, 11], ARRAY[ 11], ARRAY[ 11]), + (15, ARRAY[ 10, 16], ARRAY[ 10, 16], ARRAY[ 16], ARRAY[ 16]), + (7, ARRAY[ 6, 11, 3, 8], ARRAY[ 6, 11, 3, 8], ARRAY[ 11, 8], ARRAY[ 6, 11, 3, 8]), + (11, ARRAY[ 7, 16, 12], ARRAY[ 10, 7, 16, 12], ARRAY[ 16, 12], ARRAY[ 10, 7, 16, 12]), + (1, ARRAY[ 3], ARRAY[ 3], ARRAY[ 3], ARRAY[ 3]), + (3, ARRAY[ 7, 1], ARRAY[ 7, 1], ARRAY[ 7], ARRAY[ 7, 1]), + (16, ARRAY[ 15, 11, 17], ARRAY[ 15, 11, 17], ARRAY[17], ARRAY[ 15, 11, 17]), + (8, ARRAY[ 7, 12, 9], ARRAY[ 7, 12, 9], ARRAY[12, 9], ARRAY[ 7, 12, 9]), + (12, ARRAY[17], ARRAY[17, 8, 11], ARRAY[17], ARRAY[ 17, 8, 11]), + (11, ARRAY[ 16], ARRAY[16, 12], NULL, ARRAY[ 16, 12]), + (9, ARRAY[8], ARRAY[8], NULL, ARRAY[ 8]), + (2, ARRAY[4], ARRAY[4], ARRAY[4], ARRAY[ 4]), + (4, ARRAY[2], ARRAY[2], NULL, ARRAY[ 2]), + (13, ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[ 14]), + (14, ARRAY[13], ARRAY[13], NULL, ARRAY[ 13]) ) t(start_vid, d_w_1, u_w_1, d_n_1, u_n_1)) SELECT * from a; @@ -79,7 +79,7 @@ BEGIN FROM pgr_dijkstraNear( %1$L, %2$s, - (SELECT array_agg(id) FROM edge_table_vertices_pgr where id != %2$s), + (SELECT array_agg(id) FROM vertices where id != %2$s), %3$s) $$, inner_query, id, optionals); expected_query := format($$ @@ -107,51 +107,51 @@ IF NOT min_version('3.2.0') THEN END IF; RETURN QUERY -SELECT is_empty($$SELECT distinct cost FROM edge_table WHERE cost != 1 AND cost != -1$$); +SELECT is_empty($$SELECT distinct cost FROM edges WHERE cost != 1 AND cost != -1$$); RETURN QUERY -SELECT is_empty($$SELECT distinct reverse_cost FROM edge_table WHERE cost != 1 AND cost != -1$$); +SELECT is_empty($$SELECT distinct reverse_cost FROM edges WHERE cost != 1 AND cost != -1$$); -- Initial tables are good to work RETURN QUERY -SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table$$); +SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edges$$); RETURN QUERY -SELECT isnt_empty($$SELECT id FROM edge_table_vertices_pgr$$); +SELECT isnt_empty($$SELECT id FROM vertices$$); -- vertex id values that dont exist RETURN QUERY -SELECT is_empty($$SELECT id FROM edge_table_vertices_pgr WHERE id > 18$$); +SELECT is_empty($$SELECT id FROM vertices WHERE id > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE source > 18$$); +SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edges WHERE source > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE target > 18$$); +SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edges WHERE target > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id FROM edge_table WHERE id > 18$$); +SELECT is_empty($$SELECT id FROM edges WHERE id > 18$$); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id DESC$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id DESC$$, $$SELECT start_vid AS frst, d_w_1 AS scnd FROM expected$$, 'directed => true, cap => 1' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id DESC$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id DESC$$, $$SELECT start_vid AS frst, u_w_1 AS scnd FROM expected$$, 'directed => false, cap => 1' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost FROM edge_table ORDER BY id DESC$$, + $$SELECT id, source, target, cost FROM edges ORDER BY id DESC$$, $$SELECT start_vid AS frst, d_n_1 AS scnd FROM expected$$, 'directed => true, cap => 1' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost FROM edge_table ORDER BY id DESC$$, + $$SELECT id, source, target, cost FROM edges ORDER BY id DESC$$, $$SELECT start_vid AS frst, u_n_1 AS scnd FROM expected$$, 'directed => false, cap => 1' ); diff --git a/pgtap/dijkstra/dijkstraNear/expected_results.pg b/pgtap/dijkstra/dijkstraNear/expected_results.pg index 6ec9cdccfb8..8045353fe31 100644 --- a/pgtap/dijkstra/dijkstraNear/expected_results.pg +++ b/pgtap/dijkstra/dijkstraNear/expected_results.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(142) END; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; @@ -28,25 +28,25 @@ CREATE TABLE expected AS WITH a AS (SELECT start_vid, d_w_1, u_w_1, d_n_1, u_n_1, d_w_2, u_w_2, d_n_2, u_n_2 FROM (VALUES - (1::BIGINT, - ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], - ARRAY[2,5]::BIGINT[], ARRAY[2,3]::BIGINT[], ARRAY[2,5]::BIGINT[], ARRAY[2, 5]::BIGINT[]), - (2, ARRAY[ 1], ARRAY[ 1], ARRAY[ 5], ARRAY[ 1], ARRAY[1, 5], ARRAY[1, 3], ARRAY[5, 6], ARRAY[1, 5]), - (3, ARRAY[ 2], ARRAY[ 2], ARRAY[ 6], ARRAY[ 6], ARRAY[2, 6], ARRAY[2, 4], ARRAY[6, 9], ARRAY[5, 6]), - (4, ARRAY[ 3], ARRAY[ 3], ARRAY[ 9], ARRAY[ 9], ARRAY[3, 9], ARRAY[3, 9], ARRAY[9, 12], ARRAY[6, 9]), - (5, ARRAY[ 2], ARRAY[ 2], ARRAY[ 6], ARRAY[ 2], ARRAY[2, 8], ARRAY[2, 8], ARRAY[6, 10], ARRAY[2, 8]), - (6, ARRAY[ 5], ARRAY[ 3], ARRAY[ 9], ARRAY[ 3], ARRAY[5, 9], ARRAY[3, 5], ARRAY[9, 11], ARRAY[3, 5]), - (7, ARRAY[ 8], ARRAY[ 8], ARRAY[ 8], ARRAY[ 8], ARRAY[5, 8], ARRAY[5, 8], ARRAY[5, 8], ARRAY[5, 8]), - (8, ARRAY[ 7], ARRAY[ 7], ARRAY[ 5], ARRAY[ 7], ARRAY[5, 7], ARRAY[5, 7], ARRAY[5, 6], ARRAY[5, 7]), - (9, ARRAY[ 6], ARRAY[ 6], ARRAY[12], ARRAY[ 6], ARRAY[6,12], ARRAY[6, 12], ARRAY[12], ARRAY[6, 12]), - (10, ARRAY[ 5], ARRAY[ 5], ARRAY[11], ARRAY[ 5], ARRAY[5,11], ARRAY[5, 11], ARRAY[11, 13], ARRAY[5, 11]), - (11, ARRAY[12], ARRAY[ 6], ARRAY[12], ARRAY[ 6], ARRAY[9,12], ARRAY[6, 10], ARRAY[12], ARRAY[6, 10]), - (12, ARRAY[ 9], ARRAY[11], NULL, ARRAY[ 11], ARRAY[6, 9], ARRAY[9, 11], NULL, ARRAY[9, 11]), - (13, ARRAY[10], ARRAY[10], NULL, ARRAY[ 10], ARRAY[5,10], ARRAY[5, 10], NULL, ARRAY[5, 10]), - (14, ARRAY[15], ARRAY[15], ARRAY[15], ARRAY[ 15], ARRAY[15], ARRAY[15], ARRAY[15], ARRAY[15]), - (15, ARRAY[14], ARRAY[14], NULL, ARRAY[ 14], ARRAY[14], ARRAY[14], NULL, ARRAY[14]), - (16, ARRAY[17], ARRAY[17], ARRAY[17], ARRAY[ 17], ARRAY[17], ARRAY[17], ARRAY[17], ARRAY[17]), - (17, ARRAY[16], ARRAY[16], NULL, ARRAY[ 16], ARRAY[16], ARRAY[16], NULL, ARRAY[16]) + (5::BIGINT, + ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], + ARRAY[6,7]::BIGINT[], ARRAY[6,10]::BIGINT[], ARRAY[6,7]::BIGINT[], ARRAY[6, 7]::BIGINT[]), + (6, ARRAY[ 5], ARRAY[ 5], ARRAY[ 7], ARRAY[ 5], ARRAY[5, 7], ARRAY[5, 10], ARRAY[7,11], ARRAY[5, 7]), + (10, ARRAY[ 6], ARRAY[ 6], ARRAY[ 11], ARRAY[ 11], ARRAY[6, 11], ARRAY[6, 15], ARRAY[11, 16], ARRAY[7,11]), + (15, ARRAY[ 10], ARRAY[ 10], ARRAY[ 16], ARRAY[ 16], ARRAY[10, 16], ARRAY[10, 16], ARRAY[16, 17], ARRAY[11, 16]), + (7, ARRAY[ 6], ARRAY[ 6], ARRAY[ 11], ARRAY[ 6], ARRAY[3,6], ARRAY[3,6], ARRAY[8,11], ARRAY[3,6]), + (11, ARRAY[ 7], ARRAY[ 10], ARRAY[ 16], ARRAY[ 10], ARRAY[7,16], ARRAY[7,10], ARRAY[12,16], ARRAY[7,10]), + (1, ARRAY[ 3], ARRAY[ 3], ARRAY[ 3], ARRAY[ 3], ARRAY[3,7], ARRAY[3,7], ARRAY[3,7], ARRAY[3,7]), + (3, ARRAY[ 1], ARRAY[ 1], ARRAY[ 7], ARRAY[ 1], ARRAY[1,7], ARRAY[1,7], ARRAY[7,11], ARRAY[1,7]), + (16, ARRAY[ 11], ARRAY[ 11], ARRAY[17], ARRAY[ 11], ARRAY[11,17], ARRAY[11, 17], ARRAY[17], ARRAY[11, 17]), + (8, ARRAY[ 7], ARRAY[ 7], ARRAY[12], ARRAY[ 7], ARRAY[7,12], ARRAY[7,12], ARRAY[9,12], ARRAY[7,12]), + (12, ARRAY[17], ARRAY[ 11], ARRAY[17], ARRAY[ 11], ARRAY[16,17], ARRAY[8,11], ARRAY[17], ARRAY[8,11]), + (17, ARRAY[ 16], ARRAY[12], NULL, ARRAY[ 12], ARRAY[11, 16], ARRAY[12,16], NULL, ARRAY[12,16]), + (9, ARRAY[8], ARRAY[8], NULL, ARRAY[ 8], ARRAY[7,8], ARRAY[7, 8], NULL, ARRAY[7, 8]), + (2, ARRAY[4], ARRAY[4], ARRAY[4], ARRAY[ 4], ARRAY[4], ARRAY[4], ARRAY[4], ARRAY[4]), + (4, ARRAY[2], ARRAY[2], NULL, ARRAY[ 2], ARRAY[2], ARRAY[2], NULL, ARRAY[2]), + (13, ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[ 14], ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[14]), + (14, ARRAY[13], ARRAY[13], NULL, ARRAY[ 13], ARRAY[13], ARRAY[13], NULL, ARRAY[13]) ) t(start_vid, d_w_1, u_w_1, d_n_1, u_n_1, d_w_2, u_w_2, d_n_2, u_n_2)) SELECT * from a; @@ -64,7 +64,7 @@ BEGIN FROM pgr_dijkstraNear( %1$L, %2$s, - (SELECT array_agg(id) FROM edge_table_vertices_pgr where id != %2$s), + (SELECT array_agg(id) FROM vertices where id != %2$s), %3$s) $$, edges_q, id, optionals); expected_query := format($$ @@ -72,7 +72,7 @@ BEGIN $$, expected_q, id); RETURN QUERY - SELECT set_eq(dijstraNear_query, expected_query, id::TEXT || ' ' || optionals); + SELECT set_eq(dijstraNear_query, expected_query, id::TEXT || ' ' || optionals || ' ' || expected_q); END LOOP; END @@ -93,44 +93,44 @@ END IF; -- Initial tables are good to work RETURN QUERY -SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table$$); +SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edges$$); RETURN QUERY -SELECT isnt_empty($$SELECT id FROM edge_table_vertices_pgr$$); +SELECT isnt_empty($$SELECT id FROM vertices$$); -- vertex id values that dont exist RETURN QUERY -SELECT is_empty($$SELECT id FROM edge_table_vertices_pgr WHERE id > 18$$); +SELECT is_empty($$SELECT id FROM vertices WHERE id > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE source > 18$$); +SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edges WHERE source > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE target > 18$$); +SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edges WHERE target > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id FROM edge_table WHERE id > 18$$); +SELECT is_empty($$SELECT id FROM edges WHERE id > 18$$); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, d_w_1 AS scnd FROM expected$$, 'directed => true, cap => 1' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, u_w_1 AS scnd FROM expected$$, 'directed => false, cap => 1' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, d_n_1 AS scnd FROM expected$$, 'directed => true, cap => 1' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, u_n_1 AS scnd FROM expected$$, 'directed => false, cap => 1' ); @@ -138,28 +138,28 @@ SELECT * from check_expected( RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, d_w_2 AS scnd FROM expected$$, 'directed => true, cap => 2' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, u_w_2 AS scnd FROM expected$$, 'directed => false, cap => 2' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, d_n_2 AS scnd FROM expected$$, 'directed => true, cap => 2' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, u_n_2 AS scnd FROM expected$$, 'directed => false, cap => 2' ); diff --git a/pgtap/dijkstra/dijkstraNear/inner_query.pg b/pgtap/dijkstra/dijkstraNear/inner_query.pg index 5d079b9adab..8e1e2163606 100644 --- a/pgtap/dijkstra/dijkstraNear/inner_query.pg +++ b/pgtap/dijkstra/dijkstraNear/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(228) ELSE plan(1) END; @@ -34,8 +34,8 @@ BEGIN -- MANY TO MANY RETURN QUERY SELECT style_dijkstra('pgr_dijkstraNear(', ', ARRAY[2], ARRAY[3], true)'); -- COMBINATIONS - RETURN QUERY SELECT style_dijkstra('pgr_dijkstraNear(', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_dijkstraNear($$SELECT * FROM edge_table$$,',', true)'); + RETURN QUERY SELECT style_dijkstra('pgr_dijkstraNear(', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_dijkstraNear($$SELECT * FROM edges$$,',', true)'); ELSE diff --git a/pgtap/dijkstra/dijkstraNear/no_crash_test.pg b/pgtap/dijkstra/dijkstraNear/no_crash_test.pg index 5dcdd5f8a75..94366a3e60d 100644 --- a/pgtap/dijkstra/dijkstraNear/no_crash_test.pg +++ b/pgtap/dijkstra/dijkstraNear/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(126) END; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); @@ -40,43 +40,43 @@ BEGIN END IF; PREPARE edges AS - SELECT id, source, target, cost, reverse_cost FROM edge_table; + SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE combs AS - SELECT source, target FROM combinations_table; + SELECT source, target FROM combinations; RETURN QUERY SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); RETURN QUERY SELECT isnt_empty('combs', 'Should be not empty to tests be meaningful'); PREPARE null_id AS - SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); + SELECT id FROM vertices WHERE id IN (-1); RETURN QUERY SELECT is_empty('null_id', 'Should be empty to tests be meaningful'); PREPARE null_id_arr AS - SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); + SELECT array_agg(id) FROM vertices WHERE id IN (-1); RETURN QUERY SELECT set_eq('null_id_arr', 'SELECT NULL::BIGINT[]', 'Should be empty to tests be meaningful'); PREPARE null_edges AS - SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (-1); + SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (-1); RETURN QUERY SELECT is_empty('null_edges', 'Should be empty to tests be meaningful'); PREPARE null_comb AS - SELECT source, target FROM combinations_table WHERE source IN (-1); + SELECT source, target FROM combinations WHERE source IN (-1); RETURN QUERY SELECT is_empty('null_comb', 'Should be empty to tests be meaningful'); -- one to many params1 = ARRAY['$$edges$$','1', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; - params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '(SELECT 1)', '(SELECT ARRAY[2,5]::BIGINT[])']::TEXT[]; subs1 = ARRAY[ '$$null_edges$$', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; subs2 = ARRAY[ 'NULL', @@ -92,13 +92,13 @@ BEGIN -- many to one params1 = ARRAY['$$edges$$', 'ARRAY[2,5]::BIGINT[]', '1']::TEXT[]; - params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '(SELECT ARRAY[2,5]::BIGINT[])', '(SELECT 1)']::TEXT[]; subs1 = ARRAY[ '$$null_edges$$', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; subs2 = ARRAY[ 'NULL', @@ -113,13 +113,13 @@ BEGIN -- many to many params1 = ARRAY['$$edges$$','ARRAY[1]::BIGINT[]', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; - params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '(SELECT ARRAY[2,5]::BIGINT[])', '(SELECT ARRAY[1]::BIGINT[])']::TEXT[]; subs1 = ARRAY[ '$$null_edges$$', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; subs2 = ARRAY[ 'NULL', @@ -134,8 +134,8 @@ BEGIN -- combinations params1 = ARRAY['$$edges$$','$$combs$$']::TEXT[]; - params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', - '$$SELECT source, target FROM edge_table$$']::TEXT[]; + params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$', + '$$SELECT source, target FROM edges$$']::TEXT[]; subs1 = ARRAY[ '$$null_edges$$', '$$null_comb$$' diff --git a/pgtap/dijkstra/dijkstraNearCost/compare_dijkstra.pg b/pgtap/dijkstra/dijkstraNearCost/compare_dijkstra.pg index e8133088b8b..84f51045e17 100644 --- a/pgtap/dijkstra/dijkstraNearCost/compare_dijkstra.pg +++ b/pgtap/dijkstra/dijkstraNearCost/compare_dijkstra.pg @@ -21,32 +21,32 @@ BEGIN; SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(142) END; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE TABLE expected AS WITH a AS (SELECT start_vid, d_w_1, u_w_1, d_n_1, u_n_1, d_w_2, u_w_2, d_n_2, u_n_2 FROM (VALUES - (1::BIGINT, - ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], - ARRAY[2,5]::BIGINT[], ARRAY[2,3]::BIGINT[], ARRAY[2,5]::BIGINT[], ARRAY[2, 5]::BIGINT[]), - (2, ARRAY[ 1], ARRAY[ 1], ARRAY[ 5], ARRAY[ 1], ARRAY[1, 5], ARRAY[1, 3], ARRAY[5, 6], ARRAY[1, 5]), - (3, ARRAY[ 2], ARRAY[ 2], ARRAY[ 6], ARRAY[ 6], ARRAY[2, 6], ARRAY[2, 4], ARRAY[6, 9], ARRAY[5, 6]), - (4, ARRAY[ 3], ARRAY[ 3], ARRAY[ 9], ARRAY[ 9], ARRAY[3, 9], ARRAY[3, 9], ARRAY[9, 12], ARRAY[6, 9]), - (5, ARRAY[ 2], ARRAY[ 2], ARRAY[ 6], ARRAY[ 2], ARRAY[2, 8], ARRAY[2, 8], ARRAY[6, 10], ARRAY[2, 8]), - (6, ARRAY[ 5], ARRAY[ 3], ARRAY[ 9], ARRAY[ 3], ARRAY[5, 9], ARRAY[3, 5], ARRAY[9, 11], ARRAY[3, 5]), - (7, ARRAY[ 8], ARRAY[ 8], ARRAY[ 8], ARRAY[ 8], ARRAY[5, 8], ARRAY[5, 8], ARRAY[5, 8], ARRAY[5, 8]), - (8, ARRAY[ 7], ARRAY[ 7], ARRAY[ 5], ARRAY[ 7], ARRAY[5, 7], ARRAY[5, 7], ARRAY[5, 6], ARRAY[5, 7]), - (9, ARRAY[ 6], ARRAY[ 6], ARRAY[12], ARRAY[ 6], ARRAY[6,12], ARRAY[6, 12], ARRAY[12], ARRAY[6, 12]), - (10, ARRAY[ 5], ARRAY[ 5], ARRAY[11], ARRAY[ 5], ARRAY[5,11], ARRAY[5, 11], ARRAY[11, 13], ARRAY[5, 11]), - (11, ARRAY[12], ARRAY[ 6], ARRAY[12], ARRAY[ 6], ARRAY[9,12], ARRAY[6, 10], ARRAY[12], ARRAY[6, 10]), - (12, ARRAY[ 9], ARRAY[11], NULL, ARRAY[ 11], ARRAY[6, 9], ARRAY[9, 11], NULL, ARRAY[9, 11]), - (13, ARRAY[10], ARRAY[10], NULL, ARRAY[ 10], ARRAY[5,10], ARRAY[5, 10], NULL, ARRAY[5, 10]), - (14, ARRAY[15], ARRAY[15], ARRAY[15], ARRAY[ 15], ARRAY[15], ARRAY[15], ARRAY[15], ARRAY[15]), - (15, ARRAY[14], ARRAY[14], NULL, ARRAY[ 14], ARRAY[14], ARRAY[14], NULL, ARRAY[14]), - (16, ARRAY[17], ARRAY[17], ARRAY[17], ARRAY[ 17], ARRAY[17], ARRAY[17], ARRAY[17], ARRAY[17]), - (17, ARRAY[16], ARRAY[16], NULL, ARRAY[ 16], ARRAY[16], ARRAY[16], NULL, ARRAY[16]) + (5::BIGINT, + ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], + ARRAY[6,7]::BIGINT[], ARRAY[6,10]::BIGINT[], ARRAY[6,7]::BIGINT[], ARRAY[6, 7]::BIGINT[]), + (6, ARRAY[ 5], ARRAY[ 5], ARRAY[ 7], ARRAY[ 5], ARRAY[5,7], ARRAY[5,10], ARRAY[7,11], ARRAY[5,7]), + (10,ARRAY[ 6], ARRAY[ 6], ARRAY[11], ARRAY[11], ARRAY[6,11], ARRAY[6,15], ARRAY[11,16],ARRAY[7,11]), + (15,ARRAY[10], ARRAY[10], ARRAY[16], ARRAY[16], ARRAY[10,16],ARRAY[10,16],ARRAY[16,17],ARRAY[11,16]), + (7, ARRAY[ 6], ARRAY[ 6], ARRAY[11], ARRAY[ 6], ARRAY[6,3], ARRAY[6,3], ARRAY[11,8], ARRAY[6,3]), + (11,ARRAY[ 7], ARRAY[10], ARRAY[16], ARRAY[10], ARRAY[7,16], ARRAY[10,7], ARRAY[16,12],ARRAY[10,7]), + (1, ARRAY[ 3], ARRAY[ 3], ARRAY[ 3], ARRAY[ 3], ARRAY[7,3], ARRAY[7,3], ARRAY[7,3], ARRAY[7,3]), + (3, ARRAY[ 1], ARRAY[ 1], ARRAY[ 7], ARRAY[ 1], ARRAY[7,1], ARRAY[7,1], ARRAY[7,11], ARRAY[7,1]), + (16,ARRAY[11], ARRAY[11], ARRAY[17], ARRAY[11], ARRAY[11,17],ARRAY[11,17],ARRAY[17], ARRAY[11,17]), + (8, ARRAY[ 7], ARRAY[ 7], ARRAY[12], ARRAY[ 7], ARRAY[7,12], ARRAY[7,12], ARRAY[12,9], ARRAY[7,12]), + (12,ARRAY[17], ARRAY[11], ARRAY[17], ARRAY[11], ARRAY[16,17],ARRAY[11,8], ARRAY[17], ARRAY[11,8]), + (17,ARRAY[16], ARRAY[12], NULL, ARRAY[12], ARRAY[11,16],ARRAY[16,12],NULL, ARRAY[16,12]), + (9, ARRAY[8], ARRAY[8], NULL, ARRAY[ 8], ARRAY[7,8], ARRAY[7,8], NULL, ARRAY[7,8]), + (2, ARRAY[4], ARRAY[4], ARRAY[4], ARRAY[ 4], ARRAY[4], ARRAY[4], ARRAY[4], ARRAY[4]), + (4, ARRAY[2], ARRAY[2], NULL, ARRAY[ 2], ARRAY[2], ARRAY[2], NULL, ARRAY[2]), + (13,ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[14]), + (14,ARRAY[13], ARRAY[13], NULL, ARRAY[13], ARRAY[13], ARRAY[13], NULL, ARRAY[13]) ) t(start_vid, d_w_1, u_w_1, d_n_1, u_n_1, d_w_2, u_w_2, d_n_2, u_n_2)) SELECT * from a; @@ -64,7 +64,7 @@ BEGIN FROM pgr_dijkstraNearCost( %1$L, %2$s, - (SELECT array_agg(id) FROM edge_table_vertices_pgr where id != %2$s), + (SELECT array_agg(id) FROM vertices where id != %2$s), %3$s); $$, edges_q, id, optionals_n); dijkstra_query := format($$ @@ -101,44 +101,44 @@ END IF; -- Initial tables are good to work RETURN QUERY -SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table$$); +SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edges$$); RETURN QUERY -SELECT isnt_empty($$SELECT id FROM edge_table_vertices_pgr$$); +SELECT isnt_empty($$SELECT id FROM vertices$$); -- vertex id values that dont exist RETURN QUERY -SELECT is_empty($$SELECT id FROM edge_table_vertices_pgr WHERE id > 18$$); +SELECT is_empty($$SELECT id FROM vertices WHERE id > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE source > 18$$); +SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edges WHERE source > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE target > 18$$); +SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edges WHERE target > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id FROM edge_table WHERE id > 18$$); +SELECT is_empty($$SELECT id FROM edges WHERE id > 18$$); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, d_w_1 AS scnd FROM expected$$, 'directed => true, cap => 1', 'directed => true' ); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, u_w_1 AS scnd FROM expected$$, 'directed => false, cap => 1', 'directed => false' ); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, d_n_1 AS scnd FROM expected$$, 'directed => true, cap => 1', 'directed => true' ); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, u_n_1 AS scnd FROM expected$$, 'directed => false, cap => 1', 'directed => false' ); @@ -146,28 +146,28 @@ SELECT * from check_compare( RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, d_w_2 AS scnd FROM expected$$, 'directed => true, cap => 2', 'directed => true' ); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, u_w_2 AS scnd FROM expected$$, 'directed => false, cap => 2', 'directed => false' ); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, d_n_2 AS scnd FROM expected$$, 'directed => true, cap => 2', 'directed => true' ); RETURN QUERY SELECT * from check_compare( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, u_n_2 AS scnd FROM expected$$, 'directed => false, cap => 2', 'directed => false' ); diff --git a/pgtap/dijkstra/dijkstraNearCost/edge_cases.pg b/pgtap/dijkstra/dijkstraNearCost/edge_cases.pg index 9804653e985..2c71757ae40 100644 --- a/pgtap/dijkstra/dijkstraNearCost/edge_cases.pg +++ b/pgtap/dijkstra/dijkstraNearCost/edge_cases.pg @@ -21,31 +21,31 @@ BEGIN; SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(122) END; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); CREATE TABLE expected AS WITH a AS (SELECT start_vid, d_w_1, u_w_1, d_n_1, u_n_1 FROM (VALUES - (1::BIGINT, - ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[]), - (2, ARRAY[ 1, 5], ARRAY[ 1, 3, 5], ARRAY[ 5], ARRAY[ 1, 5]), - (3, ARRAY[ 2, 6], ARRAY[ 2, 4, 6], ARRAY[ 6], ARRAY[ 6]), - (4, ARRAY[ 3, 9], ARRAY[ 3, 9], ARRAY[ 9], ARRAY[ 9]), - (5, ARRAY[ 2, 6, 8, 10], ARRAY[ 2, 6, 8, 10], ARRAY[ 6, 10], ARRAY[ 2, 6, 8, 10]), - (6, ARRAY[ 5, 9, 11], ARRAY[ 3, 5, 9, 11], ARRAY[ 9, 11], ARRAY[ 3, 5, 9, 11]), - (7, ARRAY[ 8], ARRAY[ 8], ARRAY[ 8], ARRAY[ 8]), - (8, ARRAY[ 5, 7], ARRAY[ 5, 7], ARRAY[ 5], ARRAY[ 5, 7]), - (9, ARRAY[ 4, 6, 12], ARRAY[ 4, 6, 12], ARRAY[12], ARRAY[ 4, 6, 12]), - (10, ARRAY[ 5, 11, 13], ARRAY[ 5, 11, 13], ARRAY[11, 13], ARRAY[ 5, 11, 13]), - (11, ARRAY[12], ARRAY[ 6, 10, 12], ARRAY[12], ARRAY[ 6, 10, 12]), - (12, ARRAY[ 9], ARRAY[9, 11], NULL, ARRAY[ 9, 11]), - (13, ARRAY[10], ARRAY[10], NULL, ARRAY[ 10]), - (14, ARRAY[15], ARRAY[15], ARRAY[15], ARRAY[ 15]), - (15, ARRAY[14], ARRAY[14], NULL, ARRAY[ 14]), - (16, ARRAY[17], ARRAY[17], ARRAY[17], ARRAY[ 17]), - (17, ARRAY[16], ARRAY[16], NULL, ARRAY[ 16]) + (5::BIGINT, + ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[]), + (6, ARRAY[ 5, 7], ARRAY[ 5, 10, 7], ARRAY[ 7], ARRAY[ 5, 7]), + (10, ARRAY[ 6, 11], ARRAY[ 6, 15, 11], ARRAY[ 11], ARRAY[ 11]), + (15, ARRAY[ 10, 16], ARRAY[ 10, 16], ARRAY[ 16], ARRAY[ 16]), + (7, ARRAY[ 6, 11, 3, 8], ARRAY[ 6, 11, 3, 8], ARRAY[ 11, 8], ARRAY[ 6, 11, 3, 8]), + (11, ARRAY[ 7, 16, 12], ARRAY[ 10, 7, 16, 12], ARRAY[ 16, 12], ARRAY[ 10, 7, 16, 12]), + (1, ARRAY[ 3], ARRAY[ 3], ARRAY[ 3], ARRAY[ 3]), + (3, ARRAY[ 7, 1], ARRAY[ 7, 1], ARRAY[ 7], ARRAY[ 7, 1]), + (16, ARRAY[ 15, 11, 17], ARRAY[ 15, 11, 17], ARRAY[17], ARRAY[ 15, 11, 17]), + (8, ARRAY[ 7, 12, 9], ARRAY[ 7, 12, 9], ARRAY[12, 9], ARRAY[ 7, 12, 9]), + (12, ARRAY[17], ARRAY[17, 8, 11], ARRAY[17], ARRAY[ 17, 8, 11]), + (11, ARRAY[ 16], ARRAY[16, 12], NULL, ARRAY[ 16, 12]), + (9, ARRAY[8], ARRAY[8], NULL, ARRAY[ 8]), + (2, ARRAY[4], ARRAY[4], ARRAY[4], ARRAY[ 4]), + (4, ARRAY[2], ARRAY[2], NULL, ARRAY[ 2]), + (13, ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[ 14]), + (14, ARRAY[13], ARRAY[13], NULL, ARRAY[ 13]) ) t(start_vid, d_w_1, u_w_1, d_n_1, u_n_1)) SELECT * from a; @@ -84,7 +84,7 @@ BEGIN FROM pgr_dijkstraNearCost( %1$L, %2$s, - (SELECT array_agg(id) FROM edge_table_vertices_pgr where id != %2$s), + (SELECT array_agg(id) FROM vertices where id != %2$s), %3$s) $$, inner_query, id, optionals); expected_query := format($$ @@ -112,52 +112,52 @@ IF NOT min_version('3.2.0') THEN END IF; RETURN QUERY -SELECT is_empty($$SELECT distinct cost FROM edge_table WHERE cost != 1 AND cost != -1$$); +SELECT is_empty($$SELECT distinct cost FROM edges WHERE cost != 1 AND cost != -1$$); RETURN QUERY -SELECT is_empty($$SELECT distinct reverse_cost FROM edge_table WHERE cost != 1 AND cost != -1$$); +SELECT is_empty($$SELECT distinct reverse_cost FROM edges WHERE cost != 1 AND cost != -1$$); -- Initial tables are good to work RETURN QUERY -SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table$$); +SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edges$$); RETURN QUERY -SELECT isnt_empty($$SELECT id FROM edge_table_vertices_pgr$$); +SELECT isnt_empty($$SELECT id FROM vertices$$); -- vertex id values that dont exist RETURN QUERY -SELECT is_empty($$SELECT id FROM edge_table_vertices_pgr WHERE id > 18$$); +SELECT is_empty($$SELECT id FROM vertices WHERE id > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE source > 18$$); +SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edges WHERE source > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE target > 18$$); +SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edges WHERE target > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id FROM edge_table WHERE id > 18$$); +SELECT is_empty($$SELECT id FROM edges WHERE id > 18$$); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id DESC$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id DESC$$, $$SELECT start_vid AS frst, d_w_1 AS scnd FROM expected$$, 'directed => true, cap => 1' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id DESC$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id DESC$$, $$SELECT start_vid AS frst, u_w_1 AS scnd FROM expected$$, 'directed => false, cap => 1' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost FROM edge_table ORDER BY id DESC$$, + $$SELECT id, source, target, cost FROM edges ORDER BY id DESC$$, $$SELECT start_vid AS frst, d_n_1 AS scnd FROM expected$$, 'directed => true, cap => 1' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost FROM edge_table ORDER BY id DESC$$, + $$SELECT id, source, target, cost FROM edges ORDER BY id DESC$$, $$SELECT start_vid AS frst, u_n_1 AS scnd FROM expected$$, 'directed => false, cap => 1' ); diff --git a/pgtap/dijkstra/dijkstraNearCost/expected_results.pg b/pgtap/dijkstra/dijkstraNearCost/expected_results.pg index be457e7aad7..70fa8251f9d 100644 --- a/pgtap/dijkstra/dijkstraNearCost/expected_results.pg +++ b/pgtap/dijkstra/dijkstraNearCost/expected_results.pg @@ -21,7 +21,7 @@ BEGIN; SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(142) END; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; @@ -29,25 +29,25 @@ CREATE TABLE expected AS WITH a AS (SELECT start_vid, d_w_1, u_w_1, d_n_1, u_n_1, d_w_2, u_w_2, d_n_2, u_n_2 FROM (VALUES - (1::BIGINT, - ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], ARRAY[2]::BIGINT[], - ARRAY[2,5]::BIGINT[], ARRAY[2,3]::BIGINT[], ARRAY[2,5]::BIGINT[], ARRAY[2, 5]::BIGINT[]), - (2, ARRAY[ 1], ARRAY[ 1], ARRAY[ 5], ARRAY[ 1], ARRAY[1, 5], ARRAY[1, 3], ARRAY[5, 6], ARRAY[1, 5]), - (3, ARRAY[ 2], ARRAY[ 2], ARRAY[ 6], ARRAY[ 6], ARRAY[2, 6], ARRAY[2, 4], ARRAY[6, 9], ARRAY[5, 6]), - (4, ARRAY[ 3], ARRAY[ 3], ARRAY[ 9], ARRAY[ 9], ARRAY[3, 9], ARRAY[3, 9], ARRAY[9, 12], ARRAY[6, 9]), - (5, ARRAY[ 2], ARRAY[ 2], ARRAY[ 6], ARRAY[ 2], ARRAY[2, 8], ARRAY[2, 8], ARRAY[6, 10], ARRAY[2, 8]), - (6, ARRAY[ 5], ARRAY[ 3], ARRAY[ 9], ARRAY[ 3], ARRAY[5, 9], ARRAY[3, 5], ARRAY[9, 11], ARRAY[3, 5]), - (7, ARRAY[ 8], ARRAY[ 8], ARRAY[ 8], ARRAY[ 8], ARRAY[5, 8], ARRAY[5, 8], ARRAY[5, 8], ARRAY[5, 8]), - (8, ARRAY[ 7], ARRAY[ 7], ARRAY[ 5], ARRAY[ 7], ARRAY[5, 7], ARRAY[5, 7], ARRAY[5, 6], ARRAY[5, 7]), - (9, ARRAY[ 6], ARRAY[ 6], ARRAY[12], ARRAY[ 6], ARRAY[6,12], ARRAY[6, 12], ARRAY[12], ARRAY[6, 12]), - (10, ARRAY[ 5], ARRAY[ 5], ARRAY[11], ARRAY[ 5], ARRAY[5,11], ARRAY[5, 11], ARRAY[11, 13], ARRAY[5, 11]), - (11, ARRAY[12], ARRAY[ 6], ARRAY[12], ARRAY[ 6], ARRAY[9,12], ARRAY[6, 10], ARRAY[12], ARRAY[6, 10]), - (12, ARRAY[ 9], ARRAY[11], NULL, ARRAY[ 11], ARRAY[6, 9], ARRAY[9, 11], NULL, ARRAY[9, 11]), - (13, ARRAY[10], ARRAY[10], NULL, ARRAY[ 10], ARRAY[5,10], ARRAY[5, 10], NULL, ARRAY[5, 10]), - (14, ARRAY[15], ARRAY[15], ARRAY[15], ARRAY[ 15], ARRAY[15], ARRAY[15], ARRAY[15], ARRAY[15]), - (15, ARRAY[14], ARRAY[14], NULL, ARRAY[ 14], ARRAY[14], ARRAY[14], NULL, ARRAY[14]), - (16, ARRAY[17], ARRAY[17], ARRAY[17], ARRAY[ 17], ARRAY[17], ARRAY[17], ARRAY[17], ARRAY[17]), - (17, ARRAY[16], ARRAY[16], NULL, ARRAY[ 16], ARRAY[16], ARRAY[16], NULL, ARRAY[16]) + (5::BIGINT, + ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], ARRAY[6]::BIGINT[], + ARRAY[6,7]::BIGINT[], ARRAY[6,10]::BIGINT[], ARRAY[6,7]::BIGINT[], ARRAY[6, 7]::BIGINT[]), + (6, ARRAY[ 5], ARRAY[ 5], ARRAY[ 7], ARRAY[ 5], ARRAY[5, 7], ARRAY[5, 10], ARRAY[7,11], ARRAY[5, 7]), + (10, ARRAY[ 6], ARRAY[ 6], ARRAY[ 11], ARRAY[ 11], ARRAY[6, 11], ARRAY[6, 15], ARRAY[11, 16], ARRAY[7,11]), + (15, ARRAY[ 10], ARRAY[ 10], ARRAY[ 16], ARRAY[ 16], ARRAY[10, 16], ARRAY[10, 16], ARRAY[16, 17], ARRAY[11, 16]), + (7, ARRAY[ 6], ARRAY[ 6], ARRAY[ 11], ARRAY[ 6], ARRAY[3,6], ARRAY[3,6], ARRAY[8,11], ARRAY[3,6]), + (11, ARRAY[ 7], ARRAY[ 10], ARRAY[ 16], ARRAY[ 10], ARRAY[7,16], ARRAY[7,10], ARRAY[12,16], ARRAY[7,10]), + (1, ARRAY[ 3], ARRAY[ 3], ARRAY[ 3], ARRAY[ 3], ARRAY[3,7], ARRAY[3,7], ARRAY[3,7], ARRAY[3,7]), + (3, ARRAY[ 1], ARRAY[ 1], ARRAY[ 7], ARRAY[ 1], ARRAY[1,7], ARRAY[1,7], ARRAY[7,11], ARRAY[1,7]), + (16, ARRAY[ 11], ARRAY[ 11], ARRAY[17], ARRAY[ 11], ARRAY[11,17], ARRAY[11, 17], ARRAY[17], ARRAY[11, 17]), + (8, ARRAY[ 7], ARRAY[ 7], ARRAY[12], ARRAY[ 7], ARRAY[7,12], ARRAY[7,12], ARRAY[9,12], ARRAY[7,12]), + (12, ARRAY[17], ARRAY[ 11], ARRAY[17], ARRAY[ 11], ARRAY[16,17], ARRAY[8,11], ARRAY[17], ARRAY[8,11]), + (17, ARRAY[ 16], ARRAY[12], NULL, ARRAY[ 12], ARRAY[11, 16], ARRAY[12,16], NULL, ARRAY[12,16]), + (9, ARRAY[8], ARRAY[8], NULL, ARRAY[ 8], ARRAY[7,8], ARRAY[7, 8], NULL, ARRAY[7, 8]), + (2, ARRAY[4], ARRAY[4], ARRAY[4], ARRAY[ 4], ARRAY[4], ARRAY[4], ARRAY[4], ARRAY[4]), + (4, ARRAY[2], ARRAY[2], NULL, ARRAY[ 2], ARRAY[2], ARRAY[2], NULL, ARRAY[2]), + (13, ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[ 14], ARRAY[14], ARRAY[14], ARRAY[14], ARRAY[14]), + (14, ARRAY[13], ARRAY[13], NULL, ARRAY[ 13], ARRAY[13], ARRAY[13], NULL, ARRAY[13]) ) t(start_vid, d_w_1, u_w_1, d_n_1, u_n_1, d_w_2, u_w_2, d_n_2, u_n_2)) SELECT * from a; @@ -65,7 +65,7 @@ BEGIN FROM pgr_dijkstraNearCost( %1$L, %2$s, - (SELECT array_agg(id) FROM edge_table_vertices_pgr where id != %2$s), + (SELECT array_agg(id) FROM vertices where id != %2$s), %3$s) $$, edges_q, id, optionals); expected_query := format($$ @@ -96,44 +96,44 @@ END IF; -- Initial tables are good to work RETURN QUERY -SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table$$); +SELECT isnt_empty($$SELECT id, source, target, cost, reverse_cost FROM edges$$); RETURN QUERY -SELECT isnt_empty($$SELECT id FROM edge_table_vertices_pgr$$); +SELECT isnt_empty($$SELECT id FROM vertices$$); -- vertex id values that dont exist RETURN QUERY -SELECT is_empty($$SELECT id FROM edge_table_vertices_pgr WHERE id > 18$$); +SELECT is_empty($$SELECT id FROM vertices WHERE id > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE source > 18$$); +SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edges WHERE source > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE target > 18$$); +SELECT is_empty($$SELECT id, source, target, cost, reverse_cost FROM edges WHERE target > 18$$); RETURN QUERY -SELECT is_empty($$SELECT id FROM edge_table WHERE id > 18$$); +SELECT is_empty($$SELECT id FROM edges WHERE id > 18$$); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, d_w_1 AS scnd FROM expected$$, 'directed => true, cap => 1' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, u_w_1 AS scnd FROM expected$$, 'directed => false, cap => 1' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, d_n_1 AS scnd FROM expected$$, 'directed => true, cap => 1' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, u_n_1 AS scnd FROM expected$$, 'directed => false, cap => 1' ); @@ -141,28 +141,28 @@ SELECT * from check_expected( RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, d_w_2 AS scnd FROM expected$$, 'directed => true, cap => 2' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT start_vid AS frst, u_w_2 AS scnd FROM expected$$, 'directed => false, cap => 2' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, d_n_2 AS scnd FROM expected$$, 'directed => true, cap => 2' ); RETURN QUERY SELECT * from check_expected( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT start_vid AS frst, u_n_2 AS scnd FROM expected$$, 'directed => false, cap => 2' ); diff --git a/pgtap/dijkstra/dijkstraNearCost/inner_query.pg b/pgtap/dijkstra/dijkstraNearCost/inner_query.pg index 17d3f2f88c3..94593c70fa0 100644 --- a/pgtap/dijkstra/dijkstraNearCost/inner_query.pg +++ b/pgtap/dijkstra/dijkstraNearCost/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(228) ELSE plan(1) END; @@ -34,8 +34,8 @@ BEGIN -- MANY TO MANY RETURN QUERY SELECT style_dijkstra('pgr_dijkstraNearCost(', ', ARRAY[2], ARRAY[3], true)'); -- COMBINATIONS - RETURN QUERY SELECT style_dijkstra('pgr_dijkstraNearCost(', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_dijkstraNearCost($$SELECT * FROM edge_table$$,',', true)'); + RETURN QUERY SELECT style_dijkstra('pgr_dijkstraNearCost(', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_dijkstraNearCost($$SELECT * FROM edges$$,',', true)'); ELSE diff --git a/pgtap/dijkstra/dijkstraNearCost/no_crash_test.pg b/pgtap/dijkstra/dijkstraNearCost/no_crash_test.pg index d68287caeb4..f0d0b174854 100644 --- a/pgtap/dijkstra/dijkstraNearCost/no_crash_test.pg +++ b/pgtap/dijkstra/dijkstraNearCost/no_crash_test.pg @@ -21,7 +21,7 @@ BEGIN; SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(126) END; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE OR REPLACE FUNCTION no_crash() @@ -40,10 +40,10 @@ BEGIN END IF; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE combs AS -SELECT source, target FROM combinations_table; +SELECT source, target FROM combinations; RETURN QUERY SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -52,37 +52,37 @@ RETURN QUERY SELECT isnt_empty('combs', 'Should be not empty to tests be meaningful'); PREPARE null_id AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); RETURN QUERY SELECT is_empty('null_id', 'Should be empty to tests be meaningful'); PREPARE null_id_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); RETURN QUERY SELECT set_eq('null_id_arr', 'SELECT NULL::BIGINT[]', 'Should be empty to tests be meaningful'); PREPARE null_edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (-1); +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (-1); RETURN QUERY SELECT is_empty('null_edges', 'Should be empty to tests be meaningful'); PREPARE null_comb AS -SELECT source, target FROM combinations_table WHERE source IN (-1); +SELECT source, target FROM combinations WHERE source IN (-1); RETURN QUERY SELECT is_empty('null_comb', 'Should be empty to tests be meaningful'); -- one to many params1 = ARRAY['$$edges$$','1', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; - params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '(SELECT 1)', '(SELECT ARRAY[2,5]::BIGINT[])']::TEXT[]; subs1 = ARRAY[ '$$null_edges$$', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; subs2 = ARRAY[ 'NULL', @@ -98,13 +98,13 @@ SELECT is_empty('null_comb', 'Should be empty to tests be meaningful'); -- many to one params1 = ARRAY['$$edges$$', 'ARRAY[2,5]::BIGINT[]', '1']::TEXT[]; - params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '(SELECT ARRAY[2,5]::BIGINT[])', '(SELECT 1)']::TEXT[]; subs1 = ARRAY[ '$$null_edges$$', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; subs2 = ARRAY[ 'NULL', @@ -119,13 +119,13 @@ SELECT is_empty('null_comb', 'Should be empty to tests be meaningful'); -- many to many params1 = ARRAY['$$edges$$','ARRAY[1]::BIGINT[]', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; - params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '(SELECT ARRAY[2,5]::BIGINT[])', '(SELECT ARRAY[1]::BIGINT[])']::TEXT[]; subs1 = ARRAY[ '$$null_edges$$', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; subs2 = ARRAY[ 'NULL', @@ -140,8 +140,8 @@ SELECT is_empty('null_comb', 'Should be empty to tests be meaningful'); -- combinations params1 = ARRAY['$$edges$$','$$combs$$']::TEXT[]; - params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', - '$$SELECT source, target FROM edge_table$$']::TEXT[]; + params2 = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$', + '$$SELECT source, target FROM edges$$']::TEXT[]; subs1 = ARRAY[ '$$null_edges$$', '$$null_comb$$' diff --git a/pgtap/dijkstra/dijkstraVia/compare_dijkstra.pg b/pgtap/dijkstra/dijkstraVia/compare_dijkstra.pg index 0234892dafb..db7b16bf755 100644 --- a/pgtap/dijkstra/dijkstraVia/compare_dijkstra.pg +++ b/pgtap/dijkstra/dijkstraVia/compare_dijkstra.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(8); @@ -31,13 +31,13 @@ PREPARE q1 AS WITH union_data AS ( (SELECT 1 AS path_id,* FROM pgr_dijkstra( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1], ARRAY[3])) UNION (SELECT 2 AS path_id,* FROM pgr_dijkstra( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[3], ARRAY[11] ))), data AS (SELECT * FROM union_data ORDER BY path_id, path_seq) @@ -49,7 +49,7 @@ PREPARE q2 AS SELECT seq, path_id, path_seq, start_vid, end_vid, node, CASE WHEN edge = -2 THEN -1 ELSE edge END, cost, agg_cost FROM pgr_dijkstraVia( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', array[1, 3, 11] ); @@ -57,7 +57,7 @@ PREPARE q3 AS SELECT seq, path_id, path_seq, start_vid, end_vid, node, CASE WHEN edge = -2 THEN -1 ELSE edge END, cost, agg_cost FROM pgr_dijkstraVia( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', array[1, 3, 11], directed:=TRUE ); @@ -74,14 +74,14 @@ PREPARE q11 AS WITH union_data AS ( (SELECT 1 AS path_id, * FROM pgr_dijkstra( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[1], ARRAY[3], FALSE)) UNION (SELECT 2 AS path_id, * FROM pgr_dijkstra( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[3], ARRAY[11], FALSE))), data AS (SELECT * FROM union_data ORDER BY path_id, path_seq) @@ -94,7 +94,7 @@ PREPARE q12 AS SELECT seq, path_id, path_seq, start_vid, end_vid, node, CASE WHEN edge = -2 THEN -1 ELSE edge END, cost, agg_cost FROM pgr_dijkstraVia( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', array[1, 3, 11], directed:=FALSE ); @@ -109,12 +109,12 @@ PREPARE q21 AS WITH union_data AS ( (SELECT 1 AS path_id, * FROM pgr_dijkstra( - 'SELECT id, source, target, cost FROM edge_table', + 'SELECT id, source, target, cost FROM edges', ARRAY[1], ARRAY[3])) UNION (SELECT 2 AS path_id, * FROM pgr_dijkstra( - 'SELECT id, source, target, cost FROM edge_table', + 'SELECT id, source, target, cost FROM edges', ARRAY[3], ARRAY[11]))), data AS (SELECT * FROM union_data ORDER BY path_id, path_seq) @@ -127,7 +127,7 @@ PREPARE q22 AS SELECT seq, path_id, path_seq, start_vid, end_vid, node, CASE WHEN edge = -2 THEN -1 ELSE edge END, cost, agg_cost FROM pgr_dijkstraVia( - 'SELECT id, source, target, cost FROM edge_table', + 'SELECT id, source, target, cost FROM edges', array[1, 3, 11] ); @@ -135,7 +135,7 @@ PREPARE q23 AS SELECT seq, path_id, path_seq, start_vid, end_vid, node, CASE WHEN edge = -2 THEN -1 ELSE edge END, cost, agg_cost FROM pgr_dijkstraVia( - 'SELECT id, source, target, cost FROM edge_table', + 'SELECT id, source, target, cost FROM edges', array[1, 3, 11], directed:=TRUE ); @@ -152,14 +152,14 @@ PREPARE q31 AS WITH union_data AS ( (SELECT 1 AS path_id, * FROM pgr_dijkstra( - 'SELECT id, source, target, cost FROM edge_table', + 'SELECT id, source, target, cost FROM edges', ARRAY[1], ARRAY[3], FALSE)) UNION (SELECT 2 AS path_id, * FROM pgr_dijkstra( - 'SELECT id, source, target, cost FROM edge_table', + 'SELECT id, source, target, cost FROM edges', ARRAY[3], ARRAY[11], directed:=FALSE))), data AS (SELECT * FROM union_data ORDER BY path_id, path_seq) @@ -173,7 +173,7 @@ SELECT seq, path_id, path_seq, start_vid, end_vid, node, CASE WHEN edge = -2 THEN -1 ELSE edge END, cost, agg_cost FROM pgr_dijkstraVia( - 'SELECT id, source, target, cost FROM edge_table', + 'SELECT id, source, target, cost FROM edges', array[1, 3, 11], directed:=FALSE ); @@ -187,11 +187,11 @@ PREPARE q41 AS WITH union_data AS ( (SELECT 1 AS path_id, * FROM pgr_dijkstra( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', array[1], array[3])) UNION (SELECT 2 AS path_id, * FROM pgr_dijkstra( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', array[3], array[11] ))), data AS (SELECT * FROM union_data ORDER BY path_id, path_seq) @@ -204,7 +204,7 @@ SELECT seq, path_id, path_seq, start_vid, end_vid, node, CASE WHEN edge = -2 THEN -1 ELSE edge END, cost, agg_cost FROM pgr_dijkstraVia( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', array[1, 3, 11] ); @@ -213,7 +213,7 @@ SELECT seq, path_id, path_seq, start_vid, end_vid, node, CASE WHEN edge = -2 THEN -1 ELSE edge END, cost, agg_cost FROM pgr_dijkstraVia( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', array[1, 3, 11], directed:=TRUE ); diff --git a/pgtap/dijkstra/dijkstraVia/edge_cases/remaining_tests.pg b/pgtap/dijkstra/dijkstraVia/edge_cases/remaining_tests.pg index 3404d63a0c6..d3be03c2a8a 100644 --- a/pgtap/dijkstra/dijkstraVia/edge_cases/remaining_tests.pg +++ b/pgtap/dijkstra/dijkstraVia/edge_cases/remaining_tests.pg @@ -22,7 +22,7 @@ BEGIN; SET client_min_messages TO WARNING; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(30); @@ -35,7 +35,7 @@ SELECT pg_typeof(seq)::text AS t1, pg_typeof(path_id)::text AS path_id, pg_typeo pg_typeof(route_agg_cost)::TEXT AS t9 FROM ( SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edges', ARRAY[2,3,11]) ) AS a limit 1 ; @@ -54,11 +54,11 @@ SELECT set_eq('v21q30', 'v21q31','many to many: Expected returning, columns name PREPARE v20q1 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v20q3 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edges', ARRAY[2,3,11]); SELECT lives_ok('v20q1','with reverse cost 1'); @@ -66,12 +66,12 @@ SELECT lives_ok('v20q3','with reverse cost 3'); PREPARE v20q5 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v20q6 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT FROM edges', ARRAY[2,3,11]); @@ -87,23 +87,23 @@ SELECT lives_ok('v20q6','without reverse cost 2'); --id ANY-INTEGER PREPARE v200id1 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::SMALLINT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', + 'SELECT id::SMALLINT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v200id2 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::BIGINT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', + 'SELECT id::BIGINT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v200id3 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::FLOAT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', + 'SELECT id::FLOAT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v200id4 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::REAL, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', + 'SELECT id::REAL, source::INTEGER, target::INTEGER, cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v200id5 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::TEXT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table', + 'SELECT id::TEXT, source::INTEGER, target::INTEGER, cost::FLOAT FROM edges', ARRAY[2,3,11]); SELECT lives_ok('v200id1', @@ -123,23 +123,23 @@ SELECT throws_ok('v200id5', --source is only integer PREPARE v200s1 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::SMALLINT, target::INTEGER, cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::SMALLINT, target::INTEGER, cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v200s2 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::BIGINT, target::INTEGER, cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::BIGINT, target::INTEGER, cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v200s3 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::REAL, target::INTEGER, cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::REAL, target::INTEGER, cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v200s4 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::FLOAT, target::INTEGER, cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::FLOAT, target::INTEGER, cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v200s5 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::TEXT, target::INTEGER, cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::TEXT, target::INTEGER, cost::FLOAT FROM edges', ARRAY[2,3,11]); SELECT lives_ok('v200s1', @@ -160,23 +160,23 @@ SELECT throws_ok('v200s5', --target is only integer PREPARE v200t1 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::SMALLINT, cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::SMALLINT, cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v200t2 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::BIGINT, cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::BIGINT, cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v200t3 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::FLOAT, cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::FLOAT, cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v200t4 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::REAL, cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::REAL, cost::FLOAT FROM edges', ARRAY[2,3,11]); PREPARE v200t5 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::TEXT, cost::FLOAT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::TEXT, cost::FLOAT FROM edges', ARRAY[2,3,11]); SELECT lives_ok('v200t1', @@ -196,23 +196,23 @@ SELECT throws_ok('v200t5', -- cost PREPARE v200c1 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::SMALLINT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::SMALLINT FROM edges', ARRAY[2,3,11]); PREPARE v200c2 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER FROM edges', ARRAY[2,3,11]); PREPARE v200c3 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::BIGINT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::BIGINT FROM edges', ARRAY[2,3,11]); PREPARE v200c4 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::REAL FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::REAL FROM edges', ARRAY[2,3,11]); PREPARE v200c5 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::TEXT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::TEXT FROM edges', ARRAY[2,3,11]); SELECT lives_ok('v200c1', @@ -230,23 +230,23 @@ SELECT throws_ok('v200c5', -- reverse_cost PREPARE v200r1 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::SMALLINT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::SMALLINT FROM edges', ARRAY[2,3,11]); PREPARE v200r2 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::INTEGER FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::INTEGER FROM edges', ARRAY[2,3,11]); PREPARE v200r3 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::BIGINT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::BIGINT FROM edges', ARRAY[2,3,11]); PREPARE v200r4 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::REAL FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::REAL FROM edges', ARRAY[2,3,11]); PREPARE v200r5 AS SELECT * FROM pgr_dijkstravia( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::TEXT FROM edge_table', + 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::INTEGER, reverse_cost::TEXT FROM edges', ARRAY[2,3,11]); SELECT lives_ok('v200r1', diff --git a/pgtap/dijkstra/dijkstraVia/inner_query.pg b/pgtap/dijkstra/dijkstraVia/inner_query.pg index a883fbd8e82..4fb0c287343 100644 --- a/pgtap/dijkstra/dijkstraVia/inner_query.pg +++ b/pgtap/dijkstra/dijkstraVia/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); -- ONE VIA diff --git a/pgtap/dijkstra/dijkstraVia/no_crash_test.pg b/pgtap/dijkstra/dijkstraVia/no_crash_test.pg index e109e9c8eda..23f6be27f69 100644 --- a/pgtap/dijkstra/dijkstraVia/no_crash_test.pg +++ b/pgtap/dijkstra/dijkstraVia/no_crash_test.pg @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(15); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); @@ -44,12 +44,12 @@ params TEXT[]; subs TEXT[]; BEGIN -- one to many - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', - 'ARRAY[2,5]::BIGINT[]' + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$', + 'ARRAY[6,7]::BIGINT[]' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_dijkstraVia', params, subs); diff --git a/pgtap/dijkstra/driving_distance/edge_cases/issue_1152.pg b/pgtap/dijkstra/driving_distance/edge_cases/issue_1152.pg deleted file mode 100644 index 279342b9e25..00000000000 --- a/pgtap/dijkstra/driving_distance/edge_cases/issue_1152.pg +++ /dev/null @@ -1,159 +0,0 @@ - -/*PGR-GNU***************************************************************** - -Copyright (c) 2018 pgRouting developers -Mail: project@pgrouting.org - ------- -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - ********************************************************************PGR-GNU*/ -BEGIN; - - -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(71); - - -CREATE or REPLACE FUNCTION issue1154() -RETURNS SETOF TEXT AS -$BODY$ -DECLARE - dd_query TEXT; - dijkstra_sql TEXT; - astar_sql TEXT; - vids TEXT; - data INTEGER[]; - cant INTEGER; -BEGIN - data := ARRAY[ - 28143,37447,43401,50409,91800, - 98234,108908,1888,1897,85914, - 1898,112714,11851,31406, - 37961,43534,50994,57875,71749, - 77860,4424,4641,35309,53002, - 57762,75549,79856,80019,88626, - 89435,116859,37736,51812,97808]::INTEGER[]; - - RETURN QUERY - SELECT is_empty($$ - SELECT * FROM tmp_net WHERE target = 85930 - UNION - SELECT * FROM tmp_net WHERE target = 85930 - $$); - - cant := array_length(data, 1); - - FOR i IN 1.. cant LOOP - - dd_query := format($$ - SELECT - route.node AS node_id, - route.agg_cost - FROM pgr_drivingdistance( - 'SELECT * FROM tmp_net', - ARRAY[%1$s, %2$s]::INTEGER[], - 2680, equicost:=TRUE, directed:=TRUE) route; - $$, 85930, data[i]); - - - RETURN QUERY SELECT lives_ok(dd_query, 'i=' || data[i]); - - dd_query := format($$ - SELECT - route.node AS node_id, - route.agg_cost - FROM pgr_drivingdistance( - 'SELECT * FROM tmp_net', - ARRAY[%1$s, %2$s]::INTEGER[], - 2680, equicost:=TRUE, directed:=TRUE) route; - $$, data[i], 85930); - - - RETURN QUERY SELECT lives_ok(dd_query, 'i=' || data[i]); - - END LOOP; - -RETURN; -END -$BODY$ -language plpgsql; - -SELECT * FROM issue1154(); -SELECT lives_ok($$ - SELECT * - FROM pgr_drivingdistance( - 'SELECT * FROM tmp_net', - ARRAY[ - 28143,37447,43401,50409,91800, - 98234,108908,1888,1897,85914, - 1898,85930,112714,11851,31406, - 37961,43534,50994,57875,71749, - 77860,4424,4641,35309,53002, - 57762,75549,79856,80019,88626, - 89435,116859,37736,51812,97808]::INTEGER[], - 2680, - equicost:=TRUE, - directed:=TRUE - ) - $$); - -CREATE OR REPLACE FUNCTION test_function() RETURNS SETOF TEXT AS -$BODY$ -BEGIN - IF min_version('3.6.0') THEN - - RETURN QUERY SELECT bag_has($$ - SELECT start_vid, node, edge, cost, agg_cost - FROM pgr_drivingdistance( - 'SELECT * FROM tmp_net', - ARRAY[ - 28143,37447,43401,50409,91800, - 98234,108908,1888,1897,85914, - 1898,85930,112714,11851,31406, - 37961,43534,50994,57875,71749, - 77860,4424,4641,35309,53002, - 57762,75549,79856,80019,88626, - 89435,116859,37736,51812,97808]::INTEGER[], - 2680, - equicost:=TRUE, - directed:=TRUE - )$$, - $$ VALUES (85930, 85930, -1, 0, 0) $$ ); - - ELSE - - RETURN QUERY SELECT bag_has($$ - SELECT from_v, node, edge, cost, agg_cost - FROM pgr_drivingdistance( - 'SELECT * FROM tmp_net', - ARRAY[ - 28143,37447,43401,50409,91800, - 98234,108908,1888,1897,85914, - 1898,85930,112714,11851,31406, - 37961,43534,50994,57875,71749, - 77860,4424,4641,35309,53002, - 57762,75549,79856,80019,88626, - 89435,116859,37736,51812,97808]::INTEGER[], - 2680, - equicost:=TRUE, - directed:=TRUE - )$$, - $$ VALUES (85930, 85930, -1, 0, 0) $$ ); - END IF; -END; -$BODY$ -LANGUAGE plpgsql; - -SELECT * FROM test_function(); -SELECT finish(); -ROLLBACK; \ No newline at end of file diff --git a/pgtap/dijkstra/driving_distance/edge_cases/issue_519.pg b/pgtap/dijkstra/driving_distance/edge_cases/issue_519.pg index 1040a0440d3..16f4d6c9b45 100644 --- a/pgtap/dijkstra/driving_distance/edge_cases/issue_519.pg +++ b/pgtap/dijkstra/driving_distance/edge_cases/issue_519.pg @@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(3); CREATE OR REPLACE FUNCTION test_function() RETURNS SETOF TEXT AS @@ -26,32 +26,32 @@ $BODY$ BEGIN IF min_version('3.6.0') THEN PREPARE q1 AS - SELECT 1 AS start_vid, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edge_table', 1, 3.5); + SELECT 1 AS start_vid, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edges', 1, 3.5); PREPARE q2 AS - SELECT 5 AS start_vid, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edge_table', 5, 3.5); + SELECT 5 AS start_vid, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edges', 5, 3.5); PREPARE q3 AS - SELECT 25 AS start_vid, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edge_table', 25, 3.5); + SELECT 25 AS start_vid, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edges', 25, 3.5); PREPARE q4 AS - SELECT start_vid, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edge_table', ARRAY[1, 5, 25], 3.5); + SELECT start_vid, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edges', ARRAY[1, 5, 25], 3.5); RETURN QUERY SELECT bag_has('q4', 'q1', '1: DD from [1, 5, 25] should have results of DD from 1'); RETURN QUERY SELECT bag_has('q4', 'q2', '2: DD from [1, 5, 25] should have results of DD from 5'); RETURN QUERY SELECT bag_has('q4', 'q3', '3: DD from [1, 5, 25] should have results of DD from 25'); ELSE PREPARE q1 AS - SELECT 1 AS from_v, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edge_table', 1, 3.5); + SELECT 1 AS from_v, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edges', 1, 3.5); PREPARE q2 AS - SELECT 5 AS from_v, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edge_table', 5, 3.5); + SELECT 5 AS from_v, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edges', 5, 3.5); PREPARE q3 AS - SELECT 25 AS from_v, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edge_table', 25, 3.5); + SELECT 25 AS from_v, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edges', 25, 3.5); PREPARE q4 AS - SELECT from_v, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edge_table', ARRAY[1, 5, 25], 3.5); + SELECT from_v, node, edge, cost, agg_cost FROM pgr_drivingDistance('SELECT id, source, target, cost FROM edges', ARRAY[1, 5, 25], 3.5); RETURN QUERY SELECT bag_has('q4', 'q1', '1: DD from [1, 5, 25] should have results of DD from 1'); RETURN QUERY SELECT bag_has('q4', 'q2', '2: DD from [1, 5, 25] should have results of DD from 5'); diff --git a/pgtap/dijkstra/driving_distance/inner_query.pg b/pgtap/dijkstra/driving_distance/inner_query.pg index 9fa95222ba9..58b147ac008 100644 --- a/pgtap/dijkstra/driving_distance/inner_query.pg +++ b/pgtap/dijkstra/driving_distance/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(108); diff --git a/pgtap/dijkstra/driving_distance/no_crash_test.pg b/pgtap/dijkstra/driving_distance/no_crash_test.pg index ba713c2a4a9..ea2324d34d4 100644 --- a/pgtap/dijkstra/driving_distance/no_crash_test.pg +++ b/pgtap/dijkstra/driving_distance/no_crash_test.pg @@ -19,14 +19,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(34); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); SELECT set_eq('null_ret', 'SELECT NULL::BIGINT[]', 'Should be empty to tests be meaningful'); @@ -40,10 +40,10 @@ params TEXT[]; subs TEXT[]; BEGIN -- 1 to distance - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$','1', '1.3::FLOAT']::TEXT[]; + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$','1', '1.3::FLOAT']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_drivingDistance', params, subs); @@ -56,11 +56,11 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_drivingDistance', params, subs); -- many to distance - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[1]', '1.3::FLOAT']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_drivingDistance', params, subs); diff --git a/pgtap/dominator/lengauerTarjanDominatorTree/edge_cases.pg b/pgtap/dominator/lengauerTarjanDominatorTree/edge_cases.pg index 85a2b8f3ff0..bdfe9622585 100644 --- a/pgtap/dominator/lengauerTarjanDominatorTree/edge_cases.pg +++ b/pgtap/dominator/lengauerTarjanDominatorTree/edge_cases.pg @@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(11) END; CREATE OR REPLACE FUNCTION edge_cases() @@ -36,40 +36,51 @@ END IF; PREPARE q1 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id > 18; RETURN QUERY SELECT is_empty('q1', 'q1: Graph with 0 edge and 0 vertex'); -PREPARE LengauerTarjanDominatorTree_test1 AS +PREPARE ltd_test1 AS SELECT * FROM pgr_lengauerTarjanDominatorTree( 'q1',1 ); RETURN QUERY -SELECT is_empty('LengauerTarjanDominatorTree_test1', 'LengauerTarjanDominatorTree_test1: Graph with 0 edge and 0 vertex'); +SELECT is_empty('ltd_test1', 'test1: Graph with 0 edge and 0 vertex'); + -- single vertex test PREPARE q2 AS -SELECT id, source, 1 AS target, cost, reverse_cost -FROM edge_table +SELECT id, source, source AS target, cost, reverse_cost +FROM edges WHERE id = 1; RETURN QUERY -SELECT set_eq('q2', $$VALUES (1, 1, 1, 1, 1)$$, 'q2: Graph with only vertex 1'); +SELECT set_eq('q2', $$VALUES (1, 5, 5, 1, 1)$$, 'graph2: u<->u'); -PREPARE LengauerTarjanDominatorTree_test2 AS +/* +PERFORM todo('triggers an assertion when the vertex does not exist', 1); +PREPARE ltd_test2_1 AS SELECT * FROM pgr_lengauerTarjanDominatorTree( -'q2',1 +'q2',6 ); RETURN QUERY -SELECT set_eq('LengauerTarjanDominatorTree_test2', $$VALUES (1, 1, 0)$$, 'LengauerTarjanDominatorTree_test2: single vertex'); +SELECT lives_ok('ltd_test2_1', 'test2: Triggers an assertion'); +*/ +PREPARE ltd_test2 AS +SELECT * +FROM pgr_lengauerTarjanDominatorTree( +'q2',5 +); +RETURN QUERY +SELECT set_eq('ltd_test2', $$VALUES (1, 5, 0)$$, 'test2: u<->u'); @@ -77,20 +88,20 @@ SELECT set_eq('LengauerTarjanDominatorTree_test2', $$VALUES (1, 1, 0)$$, 'Lengau PREPARE q3 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id = 1; RETURN QUERY -SELECT set_eq('q3', $$VALUES (1, 1, 2, 1, 1)$$, 'q3: Graph with two connected vertices 1 and 2'); +SELECT set_eq('q3', $$VALUES (1, 5, 6, 1, 1)$$, 'q3: u<->v'); -PREPARE LengauerTarjanDominatorTree_test3 AS +PREPARE ltd_test3 AS SELECT * FROM pgr_lengauerTarjanDominatorTree( - 'q3',1 + 'q3',5 ); RETURN QUERY -SELECT set_eq('LengauerTarjanDominatorTree_test3', $$VALUES (1, 1, 0),(2, 2, 1)$$, 'LengauerTarjanDominatorTree_test3: two vertices test'); +SELECT set_eq('ltd_test3', $$VALUES (1, 5, 0),(2, 6, 1)$$, 'test3: u<->v'); @@ -98,58 +109,58 @@ SELECT set_eq('LengauerTarjanDominatorTree_test3', $$VALUES (1, 1, 0),(2, 2, 1)$ PREPARE q4 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id <= 2; RETURN QUERY -SELECT set_eq('q4', $$VALUES (1, 1, 2, 1, 1), (2, 2, 3, -1, 1)$$, 'q4: Graph with three vertices 1, 2 and 3'); +SELECT set_eq('q4', $$VALUES (1, 5, 6, 1, 1), (2, 6, 10, -1, 1)$$, 'graph4: u<->v<-w'); -PREPARE LengauerTarjanDominatorTree_test4 AS +PREPARE ltd_test4 AS SELECT * FROM pgr_lengauerTarjanDominatorTree( -'q4',1 +'q4',5 ); RETURN QUERY -SELECT set_eq('LengauerTarjanDominatorTree_test4', $$VALUES (1, 1, 0),(2, 2, 1),(3, 3, 0)$$, 'LengauerTarjanDominatorTree_test3:three vertices test'); +SELECT set_eq('ltd_test4', $$VALUES (1, 5, 0),(2, 6, 1),(3, 10, 0)$$, 'test3: u<->v<-w'); -- 4 vertices test PREPARE q5 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id <= 3; RETURN QUERY SELECT set_eq('q5', $$VALUES - (1, 1, 2, 1, 1), - (2, 2, 3, -1, 1), - (3, 3, 4, -1, 1) + (1, 5, 6, 1, 1), + (2, 6, 10, -1, 1), + (3, 10, 15, -1, 1) $$, - 'q5: Graph with four vertices 1, 2, 3 and 4' + 'graph5: u<->v<-w<-z' ); -PREPARE LengauerTarjanDominatorTree_test5 AS +PREPARE ltd_test5 AS SELECT * FROM pgr_lengauerTarjanDominatorTree( -'q5',1 +'q5',5 ); RETURN QUERY -SELECT set_eq('LengauerTarjanDominatorTree_test5', $$VALUES (1, 1, 0),(2, 2, 1),(3, 3, 0), (4, 4, 0)$$, 'LengauerTarjanDominatorTree_test5: four vertices test root as 1'); +SELECT set_eq('ltd_test5', $$VALUES (1, 10, 0),(2, 15, 0),(3, 5, 0), (4, 6, 3)$$, 'test5: u<->v<-w<-z root 5'); -PREPARE LengauerTarjanDominatorTree_test6 AS +PREPARE ltd_test6 AS SELECT * FROM pgr_lengauerTarjanDominatorTree( -'q5',4 +'q5',15 ); RETURN QUERY -SELECT set_eq('LengauerTarjanDominatorTree_test6', $$VALUES (1, 1, 2),(2,2,3),(3, 3, 4),(4, 4, 0)$$, 'LengauerTarjanDominatorTree_test6:four vertices test root as 4'); +SELECT set_eq('ltd_test6', $$VALUES (1, 10, 2),(2,15,0),(3, 5, 4),(4, 6, 1)$$, 'test6: u<->v<-w<-z root 15'); END; $BODY$ diff --git a/pgtap/dominator/lengauerTarjanDominatorTree/inner_query.pg b/pgtap/dominator/lengauerTarjanDominatorTree/inner_query.pg index 6304ae1c960..8c5e3bbc1e8 100644 --- a/pgtap/dominator/lengauerTarjanDominatorTree/inner_query.pg +++ b/pgtap/dominator/lengauerTarjanDominatorTree/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(54) END; diff --git a/pgtap/dominator/lengauerTarjanDominatorTree/no_crash_test.pg b/pgtap/dominator/lengauerTarjanDominatorTree/no_crash_test.pg index 113f0e65bc7..7e43449f557 100644 --- a/pgtap/dominator/lengauerTarjanDominatorTree/no_crash_test.pg +++ b/pgtap/dominator/lengauerTarjanDominatorTree/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(7) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; CREATE OR REPLACE FUNCTION no_crash() @@ -43,12 +43,12 @@ RETURN QUERY SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '1::BIGINT' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_lengauerTarjanDominatorTree', params, subs); diff --git a/pgtap/dominator/lengauerTarjanDominatorTree/types_check.pg b/pgtap/dominator/lengauerTarjanDominatorTree/types_check.pg index 00f8cee0ce0..891ffad12f4 100644 --- a/pgtap/dominator/lengauerTarjanDominatorTree/types_check.pg +++ b/pgtap/dominator/lengauerTarjanDominatorTree/types_check.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(5) END; CREATE OR REPLACE FUNCTION types_check() diff --git a/pgtap/ksp/ksp/edge_cases/issue_1010.pg b/pgtap/ksp/ksp/edge_cases/issue_1010.pg index 988fd797351..da62f9fbe71 100644 --- a/pgtap/ksp/ksp/edge_cases/issue_1010.pg +++ b/pgtap/ksp/ksp/edge_cases/issue_1010.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(6); diff --git a/pgtap/ksp/ksp/edge_cases/issue_285_v2.pg b/pgtap/ksp/ksp/edge_cases/issue_285_v2.pg deleted file mode 100644 index 50a4357fbea..00000000000 --- a/pgtap/ksp/ksp/edge_cases/issue_285_v2.pg +++ /dev/null @@ -1,125 +0,0 @@ - -/*PGR-GNU***************************************************************** - -Copyright (c) 2018 pgRouting developers -Mail: project@pgrouting.org - ------- -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - ********************************************************************PGR-GNU*/ -BEGIN; -SET client_min_messages=WARNING; - - --- SAMPLE DATA FROM THE ISSUE 285 - -drop table if exists parallel; -CREATE TABLE parallel ( - id serial, - source integer, - target integer, - cost double precision, - reverse_cost double precision, - x1 double precision, - y1 double precision, - x2 double precision, - y2 double precision, - the_geom geometry -); - -INSERT INTO parallel (x1,y1,x2,y2) -VALUES (1,0,1,1),(1,1,1,3),(1,1,1,3),(1,1,1,3),(1,3,1,4); - -UPDATE parallel SET the_geom = ST_makeline(ST_point(x1,y1),ST_point(x2,y2)); -UPDATE parallel SET the_geom = ST_makeline(ARRAY[ST_point(1,1),ST_point(0,2),ST_point(1,3)]) WHERE id = 3; -UPDATE parallel SET the_geom = ST_makeline(ARRAY[ST_point(1,1),ST_point(2,1),ST_point(2,3),ST_point(1,3)]) WHERE id = 4; -UPDATE parallel SET cost = ST_length(the_geom), reverse_cost = ST_length(the_geom); -SELECT pgr_createTopology('parallel',0.001); - -SELECT PLAN(7); - -PREPARE q1 AS -SELECT * -FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM parallel', - 2, 3, 1, true -); - -PREPARE q2 AS -SELECT * -FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM parallel', - 2, 3, 2, true -); - -PREPARE q3 AS -SELECT * -FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM parallel', - 2, 3, 3, true -); - -PREPARE q4 AS -SELECT * -FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM parallel', - 2, 3, 4, true -); - - -PREPARE q5 AS -SELECT * -FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM parallel', - 2, 3, 100, true -); - -SELECT set_eq('q1', 'q2'); -SELECT set_eq('q1', 'q3'); -SELECT set_eq('q1', 'q4'); -SELECT set_eq('q1', 'q5'); - -PREPARE q6 AS -SELECT * -FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM parallel', - 1, 4, 1, true -); - -PREPARE q7 AS -SELECT * -FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM parallel', - 1, 4, 2, true -); - -PREPARE q8 AS -SELECT * -FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM parallel', - 1, 4, 3, true -); - -PREPARE q9 AS -SELECT * -FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM parallel', - 1, 4, 100, true -); - -SELECT set_eq('q6', 'q7'); -SELECT set_eq('q6', 'q8'); -SELECT set_eq('q6', 'q9'); - -SELECT finish(); -ROLLBACK; diff --git a/pgtap/ksp/ksp/inner_query.pg b/pgtap/ksp/ksp/inner_query.pg index 05c50956617..f92a25351aa 100644 --- a/pgtap/ksp/ksp/inner_query.pg +++ b/pgtap/ksp/ksp/inner_query.pg @@ -19,33 +19,29 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.6.0') THEN plan(282) ELSE plan(54) END; CREATE OR REPLACE FUNCTION KSP_inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN - IF min_version('3.6.0') THEN - -- ONE TO ONE - RETURN QUERY SELECT style_dijkstra('pgr_ksp(', ', 2, 3, 2, true)'); + -- ONE TO ONE + RETURN QUERY SELECT style_dijkstra('pgr_ksp(', ', 6, 10, 2, true)'); + IF min_version('3.6.0') THEN -- ONE TO MANY - RETURN QUERY SELECT style_dijkstra('pgr_ksp(', ', 2, ARRAY[3], 2, true)'); + RETURN QUERY SELECT style_dijkstra('pgr_ksp(', ', 6, ARRAY[10], 2, true)'); -- MANY TO ONE - RETURN QUERY SELECT style_dijkstra('pgr_ksp(', ', ARRAY[2], 3, 2, true)'); + RETURN QUERY SELECT style_dijkstra('pgr_ksp(', ', ARRAY[6], 10, 2, true)'); -- MANY TO MANY - RETURN QUERY SELECT style_dijkstra('pgr_ksp(', ', ARRAY[2], ARRAY[3], 2, true)'); + RETURN QUERY SELECT style_dijkstra('pgr_ksp(', ', ARRAY[6], ARRAY[10], 2, true)'); -- Combinations - RETURN QUERY SELECT style_dijkstra('pgr_ksp(', ', $$SELECT * FROM combinations_table$$, 2, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_ksp($$SELECT * FROM edge_table$$,',', 2, true)'); - - ELSE - -- ONE TO ONE - RETURN QUERY SELECT style_dijkstra('pgr_ksp(', ', 2, 3, 2, true)'); + RETURN QUERY SELECT style_dijkstra('pgr_ksp(', ', $$SELECT * FROM combinations$$, 2, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_ksp($$SELECT * FROM edges$$,',', 2, true)'); END IF; END $BODY$ diff --git a/pgtap/ksp/ksp/no_crash_test.pg b/pgtap/ksp/ksp/no_crash_test.pg index 2011cb4c366..d0b81f8559a 100644 --- a/pgtap/ksp/ksp/no_crash_test.pg +++ b/pgtap/ksp/ksp/no_crash_test.pg @@ -19,23 +19,23 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.6.0') THEN plan (101) ELSE plan(23) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); PREPARE combinations AS -SELECT source, target FROM combinations_table WHERE target > 2; +SELECT source, target FROM combinations; PREPARE null_combinations AS -SELECT source, target FROM combinations_table WHERE source IN (-1); +SELECT source, target FROM combinations WHERE source IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); @@ -49,18 +49,17 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - IF min_version('3.6.0') THEN -- one to one params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', - '1::BIGINT', - '2::BIGINT', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', + '5::BIGINT', + '6::BIGINT', '3' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; @@ -74,17 +73,18 @@ BEGIN ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_ksp', params, subs); + IF min_version('3.6.0') THEN -- one to many params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', - '1::BIGINT', - 'ARRAY[2, 5]::BIGINT[]', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', + '5::BIGINT', + 'ARRAY[6, 7]::BIGINT[]', '2' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; @@ -100,15 +100,15 @@ BEGIN -- many to one params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', - 'ARRAY[2, 5]::BIGINT[]', - '1', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', + 'ARRAY[6, 7]::BIGINT[]', + '5', '2' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; @@ -124,15 +124,15 @@ BEGIN -- many to many params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', - 'ARRAY[1]::BIGINT[]', - 'ARRAY[2, 5]::BIGINT[]', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', + 'ARRAY[5]::BIGINT[]', + 'ARRAY[6, 7]::BIGINT[]', '1' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; @@ -153,13 +153,13 @@ BEGIN SELECT is_empty('null_combinations', 'Should be empty to tests be meaningful'); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$combinations$$', '1' ]::TEXT[]; subs = ARRAY[ 'NULL', - '$$(SELECT source, target FROM combinations_table WHERE source IN (-1))$$', + '$$(SELECT source, target FROM combinations WHERE source IN (-1))$$', 'NULL::INTEGER' ]::TEXT[]; @@ -171,30 +171,6 @@ BEGIN 'NULL::INTEGER' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_ksp', params, subs); - ELSE - -- one to one - params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$' - ,'1::BIGINT', - '2::BIGINT', - '3' - ]::TEXT[]; - subs = ARRAY[ - 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - 'NULL::INTEGER' - ]::TEXT[]; - - RETURN query SELECT * FROM no_crash_test('pgr_ksp', params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::BIGINT', - 'NULL::BIGINT', - 'NULL::INTEGER' - ]::TEXT[]; - RETURN query SELECT * FROM no_crash_test('pgr_ksp', params, subs); END IF; END $BODY$ diff --git a/pgtap/ksp/ksp/one_route.pg b/pgtap/ksp/ksp/one_route.pg index cea4de8e064..917aebf8e01 100644 --- a/pgtap/ksp/ksp/one_route.pg +++ b/pgtap/ksp/ksp/one_route.pg @@ -20,21 +20,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +SET extra_float_digits = -3; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT plan(7); PREPARE q2 AS SELECT * FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - 2, 12, 1, + 'SELECT id, source, target, cost, reverse_cost FROM edges', + 6, 17, 1, directed:=true -- takes the new signature ); PREPARE q3 AS SELECT * FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - 2, 12, 1 + 'SELECT id, source, target, cost, reverse_cost FROM edges', + 6, 17, 1 ); SELECT set_eq('q2','q3','1: With and with out directed flag gives the same result'); @@ -43,45 +44,45 @@ SELECT set_eq('q2','q3','1: With and with out directed flag gives the same resul PREPARE q4 AS SELECT * FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - 2, 12, 1 + 'SELECT id, source, target, cost, reverse_cost FROM edges', + 6, 17, 1 ); PREPARE q5 AS SELECT * FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - 2, 12, 1, heap_paths:=true + 'SELECT id, source, target, cost, reverse_cost FROM edges', + 6, 17, 1, heap_paths:=true ); PREPARE q6 AS SELECT * FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - 2, 12, 1, true, true + 'SELECT id, source, target, cost, reverse_cost FROM edges', + 6, 17, 1, true, false ); SELECT set_eq('q4','q5','2: no flags vs with heap paths, gives the same result'); -SELECT set_eq('q4','q6','3: no flags vs true true gives the same result'); +SELECT set_eq('q5','q6','3: no flags vs true true gives the same result'); ------------------------------------------------------------------------------- PREPARE q7 AS SELECT * FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - 2, 12, 1, directed:=false + 'SELECT id, source, target, cost, reverse_cost FROM edges', + 6, 17, 1, directed:=false ); PREPARE q8 AS SELECT * FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - 2, 12, 1, directed:=false, heap_paths:=true + 'SELECT id, source, target, cost, reverse_cost FROM edges', + 6, 17, 1, directed:=false, heap_paths:=true ); PREPARE q9 AS SELECT * FROM pgr_ksp( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', - 2, 12, 1, false, true + 'SELECT id, source, target, cost, reverse_cost FROM edges', + 6, 17, 1, false, true ); SELECT set_eq('q7','q8','4: Undirected vs directed heappaths gives the same result'); @@ -94,14 +95,14 @@ SELECT set_eq('q7','q9','5: Unirected vs 2 flags gives the same result'); PREPARE q12 AS SELECT * FROM pgr_ksp( - 'SELECT id, source, target, cost FROM edge_table', - 2, 12, 1, heap_paths:=true + 'SELECT id, source, target, cost FROM edges', + 6, 17, 1, heap_paths:=true ); PREPARE q13 AS SELECT * FROM pgr_ksp( - 'SELECT id, source, target, cost FROM edge_table', - 2, 12, 1, true, true + 'SELECT id, source, target, cost FROM edges', + 6, 17, 1, true, true ); SELECT set_eq('q12','q13','6: (No rev_costs) noflags vs 2 flags gives the same result'); @@ -113,14 +114,14 @@ SELECT set_eq('q12','q13','6: (No rev_costs) noflags vs 2 flags gives the same r PREPARE q15 AS SELECT * FROM pgr_ksp( - 'SELECT id, source, target, cost FROM edge_table', - 2, 12, 1, directed:=false, heap_paths:=true + 'SELECT id, source, target, cost FROM edges', + 6, 17, 1, directed:=false, heap_paths:=true ); PREPARE q16 AS SELECT * FROM pgr_ksp( - 'SELECT id, source, target, cost FROM edge_table', - 2, 12, 1, false, true + 'SELECT id, source, target, cost FROM edges', + 6, 17, 1, false, true ); SELECT set_eq('q15','q16','7:(No rev_costs) undirected vs 2 flags gives the same result'); diff --git a/pgtap/ksp/turnRestrictedPath/compare_dijkstra.pg b/pgtap/ksp/turnRestrictedPath/compare_dijkstra.pg index f15340cb068..260020d175e 100644 --- a/pgtap/ksp/turnRestrictedPath/compare_dijkstra.pg +++ b/pgtap/ksp/turnRestrictedPath/compare_dijkstra.pg @@ -21,7 +21,7 @@ BEGIN; SELECT plan(1156); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION turnrestricted_compare_dijkstra() RETURNS SETOF TEXT AS diff --git a/pgtap/ksp/turnRestrictedPath/edge_cases/custom.pg b/pgtap/ksp/turnRestrictedPath/edge_cases/custom.pg index b7ce48a62b8..eb8520f199e 100644 --- a/pgtap/ksp/turnRestrictedPath/edge_cases/custom.pg +++ b/pgtap/ksp/turnRestrictedPath/edge_cases/custom.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(9); SET client_min_messages TO WARNING; @@ -30,19 +30,19 @@ SET client_min_messages TO WARNING; PREPARE r1 AS SELECT path_seq, node::BIGINT, edge::BIGINT, agg_cost FROM ( VALUES - (1, 2, 4, 0), - (2, 5, 8, 1), - (3, 6, 9, 2), - (4, 9, 15, 3), - (5, 12, -1, 4)) + (1, 6, 4, 0), + (2, 7, 8, 1), + (3, 11, 9, 2), + (4, 16, 15, 3), + (5, 17, -1, 4)) AS t(path_seq, node, edge, agg_cost); PREPARE q1 AS SELECT path_seq, node, edge, agg_cost FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT * FROM restrictions WHERE id < 3', - 2, 12, + 6, 17, 1 ); @@ -50,9 +50,9 @@ FROM pgr_turnRestrictedPath( PREPARE q2 AS SELECT path_seq, node, edge, agg_cost FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT * FROM restrictions WHERE id < 3', - 2, 12, + 6, 17, 1, stop_on_first:=false ); @@ -65,24 +65,24 @@ SELECT set_eq('q2', 'r1', 'Should return r1 result (one cycle, Dont stop_on_firs PREPARE r2 AS SELECT path_seq, node::BIGINT, edge::BIGINT, agg_cost FROM ( VALUES - (1, 2, 4, 0), - (2, 5, 8, 1), - (3, 6, 9, 2), - (4, 9, 15, 3), - (5, 12, -1, 4), - (1, 2, 4, 0), - (2, 5, 10, 1), - (3, 10, 12, 2), - (4, 11, 13, 3), - (5, 12, -1, 4)) + (1, 6, 4, 0), + (2, 7, 8, 1), + (3, 11, 9, 2), + (4, 16, 15, 3), + (5, 17, -1, 4), + (1, 6, 4, 0), + (2, 7, 10, 1), + (3, 8, 12, 2), + (4, 12, 13, 3), + (5, 17, -1, 4)) AS t(path_seq, node, edge, agg_cost); PREPARE q3 AS SELECT path_seq, node, edge, agg_cost FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT * FROM restrictions WHERE id < 3', - 2, 12, + 6, 17, 3, stop_on_first:=false ); @@ -94,25 +94,25 @@ SELECT set_eq('q3', 'r2', 'Should return r2 result (3 cycle, Dont stop_on_first) PREPARE r3 AS SELECT path_seq, node::BIGINT, edge::BIGINT FROM (VALUES - (2, 8, 7)) + (2, 3, 7)) AS t(path_seq, node, edge); PREPARE q4 AS SELECT path_seq, node, edge FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT * FROM restrictions', - 7, 10, + 1, 8, 1 ) WHERE agg_cost = FLOAT8 '+infinity'; PREPARE q7 AS SELECT path_seq, node, edge FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT * FROM restrictions', - 7, 10, + 1, 8, 1, heap_paths:=true ) WHERE agg_cost = FLOAT8 '+infinity'; @@ -125,15 +125,15 @@ SELECT set_eq('q7', 'r3', 'Should return r3 result (1 cycle, Heap paths)'); PREPARE r4 AS SELECT path_seq, node::BIGINT, edge::BIGINT FROM ( VALUES - (2, 8, 7)) + (2, 3, 7)) AS t(path_seq, node, edge); PREPARE q5 AS SELECT path_seq, node, edge FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT * FROM restrictions', - 7,10, + 1, 8, 2, stop_on_first:=false ) WHERE agg_cost = FLOAT8 '+infinity'; @@ -143,9 +143,9 @@ FROM pgr_turnRestrictedPath( PREPARE q6 AS SELECT path_seq, node, edge FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT * FROM restrictions', - 7, 10, + 1, 8, 3, stop_on_first:=false ) WHERE agg_cost = FLOAT8 '+infinity'; @@ -159,15 +159,15 @@ SELECT set_eq('q6', 'r4', 'q6 Should return r4 result (2 cycle, Dont stop_on_fir PREPARE r5 AS SELECT path_seq, node::BIGINT, edge::BIGINT FROM ( VALUES - (2, 8, 7)) + (2, 3, 7)) AS t(path_seq, node, edge); PREPARE q8 AS SELECT path_seq, node, edge FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT * FROM restrictions', - 7, 10, + 1, 8, 2, heap_paths:=true, stop_on_first:=false @@ -176,16 +176,16 @@ FROM pgr_turnRestrictedPath( PREPARE q9 AS SELECT path_seq, node, edge FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT * FROM restrictions', - 7, 10, + 1, 8, 3, heap_paths:=true, stop_on_first:=false ) WHERE agg_cost = FLOAT8 '+infinity'; -SELECT set_eq('q8', 'r5', 'Should return r4 result (2 cycle, Dont stop_on_first, heap paths)'); -SELECT set_eq('q9', 'r5', 'Should return r4 result (3 cycle, Dont stop_on_first, heap paths)'); +SELECT set_eq('q8', 'r5', 'Should return r5 result (2 cycle, Dont stop_on_first, heap paths)'); +SELECT set_eq('q9', 'r5', 'Should return r5 result (3 cycle, Dont stop_on_first, heap paths)'); SELECT finish(); diff --git a/pgtap/ksp/turnRestrictedPath/edge_cases/empty_set_default_strict.pg b/pgtap/ksp/turnRestrictedPath/edge_cases/empty_set_default_strict.pg index d0393301f18..3d4f1204b3c 100644 --- a/pgtap/ksp/turnRestrictedPath/edge_cases/empty_set_default_strict.pg +++ b/pgtap/ksp/turnRestrictedPath/edge_cases/empty_set_default_strict.pg @@ -19,8 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(16); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); +SELECT plan(20); ---------------------------------------------------------------------------------------------------------------- -- testing from an existing starting vertex to a non-existing destination @@ -30,9 +30,9 @@ SELECT plan(16); -- with restrictions PREPARE q1 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 2, 3, + 6, 10, 3 ); @@ -40,9 +40,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- with restrictions PREPARE q2 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 2, 3, + 6, 10, 3, FALSE ); @@ -51,9 +51,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q3 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 2, 3, + 6, 10, 3 ); @@ -61,9 +61,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q4 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 2, 3, + 6, 10, 3, FALSE ); @@ -80,7 +80,7 @@ SELECT is_empty('q4'); -- with restrictions PREPARE q5 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', 6, 8, 3 @@ -90,7 +90,7 @@ SELECT * FROM pgr_turnRestrictedPath( -- with restrictions PREPARE q6 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', 6, 8, 3, @@ -101,7 +101,7 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q7 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', 6, 8, 3 @@ -111,7 +111,7 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q8 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', 6, 8, 3, @@ -130,9 +130,9 @@ SELECT is_empty('q8'); -- with restrictions PREPARE q9 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 1, 17, + 5, 14, 3 ); @@ -140,9 +140,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- with restrictions PREPARE q10 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 1, 17, + 5, 14, 3, FALSE ); @@ -151,9 +151,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q11 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 1, 17, + 5, 14, 3 ); @@ -161,9 +161,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q12 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 1, 17, + 5, 14, 3, FALSE ); @@ -180,9 +180,9 @@ SELECT is_empty('q12'); -- with restrictions PREPARE q13 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 2, 2, + 6, 6, 3 ); @@ -190,9 +190,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- with restrictions PREPARE q14 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 2, 2, + 6, 6, 3, FALSE ); @@ -201,9 +201,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q15 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 2, 2, + 6, 6, 3 ); @@ -211,9 +211,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q16 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 2, 2, + 6, 6, 3, FALSE ); @@ -229,9 +229,9 @@ SELECT is_empty('q16'); -- with restrictions PREPARE q17 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (4, 7, 17)', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (4, 7, 17)', 'SELECT * FROM restrictions WHERE id IN (1)', - 2, 14, + 6, 2, 3 ); @@ -239,9 +239,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- with restrictions PREPARE q18 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (4, 7, 17)', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (4, 7, 17)', 'SELECT * FROM restrictions WHERE id IN (1)', - 2, 14, + 6, 2, 3, FALSE ); @@ -250,9 +250,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q19 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (4, 7, 17)', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (4, 7, 17)', 'SELECT * FROM restrictions where id > 10', - 2, 14, + 6, 2, 3 ); @@ -260,19 +260,18 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q20 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (4, 7, 17)', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (4, 7, 17)', 'SELECT * FROM restrictions where id > 10', - 2, 14, + 6, 2, 3, FALSE ); -/* + SELECT is_empty('q17'); SELECT is_empty('q18'); SELECT is_empty('q19'); SELECT is_empty('q20'); ---------------------------------------------------------------------------------------------------------------- -*/ SELECT * FROM finish(); ROLLBACK; diff --git a/pgtap/ksp/turnRestrictedPath/edge_cases/empty_set_no_default_strict.pg b/pgtap/ksp/turnRestrictedPath/edge_cases/empty_set_no_default_strict.pg index dafc2067799..d27e5822288 100644 --- a/pgtap/ksp/turnRestrictedPath/edge_cases/empty_set_no_default_strict.pg +++ b/pgtap/ksp/turnRestrictedPath/edge_cases/empty_set_no_default_strict.pg @@ -19,8 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT plan(16); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); +SELECT plan(20); ---------------------------------------------------------------------------------------------------------------- -- testing from an existing starting vertex to a non-existing destination @@ -30,9 +30,9 @@ SELECT plan(16); -- with restrictions PREPARE q1 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 2, 3, + 6, 10, 3, strict := false ); @@ -42,9 +42,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- with restrictions PREPARE q2 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 2, 3, + 6, 10, 3, FALSE, strict := false @@ -54,9 +54,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q3 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 2, 3, + 6, 10, 3, strict := false ); @@ -65,9 +65,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q4 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 2, 3, + 6, 10, 3, FALSE, strict := false @@ -86,9 +86,9 @@ SELECT is_empty('q4'); -- with restrictions PREPARE q5 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 6, 8, + 11, 3, 3, strict := false ); @@ -97,9 +97,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- with restrictions PREPARE q6 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 6, 8, + 11, 3, 3, FALSE, strict := false @@ -109,9 +109,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q7 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 6, 8, + 11, 3, 3, strict := false ); @@ -120,9 +120,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q8 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 6, 8, + 11, 3, 3, FALSE, strict := false @@ -141,9 +141,9 @@ SELECT is_empty('q8'); -- with restrictions PREPARE q9 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 1, 17, + 5, 14, 3, strict := false ); @@ -152,9 +152,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- with restrictions PREPARE q10 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 1, 17, + 5, 14, 3, FALSE, strict := false @@ -164,9 +164,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q11 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 1, 17, + 5, 14, 3, strict := false ); @@ -175,9 +175,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q12 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 1, 17, + 5, 14, 3, FALSE, strict := false @@ -196,9 +196,9 @@ SELECT is_empty('q12'); -- with restrictions PREPARE q13 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 2, 2, + 6, 6, 3, strict := false ); @@ -207,9 +207,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- with restrictions PREPARE q14 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions WHERE id IN (1)', - 2, 2, + 6, 6, 3, FALSE, strict := false @@ -219,9 +219,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q15 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 2, 2, + 6, 6, 3, strict := false ); @@ -230,9 +230,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q16 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 4 OR id = 7', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 4 OR id = 7', 'SELECT * FROM restrictions where id > 10', - 2, 2, + 6, 6, 3, FALSE, strict := false @@ -250,9 +250,9 @@ SELECT is_empty('q16'); -- with restrictions PREPARE q17 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (4, 7, 17)', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (4, 7, 17)', 'SELECT * FROM restrictions WHERE id IN (1)', - 2, 14, + 6, 2, 3, strict := false ); @@ -261,9 +261,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- with restrictions PREPARE q18 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (4, 7, 17)', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (4, 7, 17)', 'SELECT * FROM restrictions WHERE id IN (1)', - 2, 14, + 6, 2, 3, FALSE, strict := false @@ -273,9 +273,9 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q19 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (4, 7, 17)', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (4, 7, 17)', 'SELECT * FROM restrictions where id > 10', - 2, 14, + 6, 2, 3, strict := false ); @@ -284,21 +284,19 @@ SELECT * FROM pgr_turnRestrictedPath( -- without restrictions PREPARE q20 AS SELECT * FROM pgr_turnRestrictedPath( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id IN (4, 7, 17)', + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (4, 7, 17)', 'SELECT * FROM restrictions where id > 10', - 2, 14, + 6, 2, 3, FALSE, strict := false ); -/* + SELECT is_empty('q17'); SELECT is_empty('q18'); SELECT is_empty('q19'); SELECT is_empty('q20'); ----------------------------------------------------------------------------------------------------------------- -*/ SELECT * FROM finish(); ROLLBACK; diff --git a/pgtap/ksp/turnRestrictedPath/inner_query.pg b/pgtap/ksp/turnRestrictedPath/inner_query.pg index 05e68eb792b..31a8b90da24 100644 --- a/pgtap/ksp/turnRestrictedPath/inner_query.pg +++ b/pgtap/ksp/turnRestrictedPath/inner_query.pg @@ -19,12 +19,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(66); -- ONE TO ONE -SELECT style_dijkstra('pgr_turnRestrictedPath(', ', $$SELECT * FROM restrictions$$, 2, 3, 2, true)'); -SELECT innerquery_restrictions('pgr_turnRestrictedPath($$SELECT * FROM edge_table$$, ', ', 2, 3, 2, true)'); +SELECT style_dijkstra('pgr_turnRestrictedPath(', ', $$SELECT * FROM restrictions$$, 6, 10, 2, true)'); +SELECT innerquery_restrictions('pgr_turnRestrictedPath($$SELECT * FROM edges$$, ', ', 6, 10, 2, true)'); SELECT finish(); ROLLBACK; diff --git a/pgtap/ksp/turnRestrictedPath/types_check.pg b/pgtap/ksp/turnRestrictedPath/types_check.pg index e9a05a1a157..f8c6b8c5ee0 100644 --- a/pgtap/ksp/turnRestrictedPath/types_check.pg +++ b/pgtap/ksp/turnRestrictedPath/types_check.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); SELECT has_function('pgr_turnrestrictedpath'); diff --git a/pgtap/ksp/withPointsKSP/inner_query.pg b/pgtap/ksp/withPointsKSP/inner_query.pg index 63813274b2e..463f56749b6 100644 --- a/pgtap/ksp/withPointsKSP/inner_query.pg +++ b/pgtap/ksp/withPointsKSP/inner_query.pg @@ -19,39 +19,40 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT CASE WHEN min_version('3.6.0') THEN plan(516) ELSE plan(84) END; +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); +SELECT CASE WHEN min_version('3.6.0') THEN plan(684) ELSE plan(252) END; CREATE OR REPLACE FUNCTION withPointsKSP_inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.6.0') THEN -- ONE TO ONE - RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, 2, 3, 1, $$r$$,true)'); - RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edge_table$$,', ', 2, 3, 1, $$l$$, true)'); + RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, 6, 10, 1, $$r$$,true)'); + RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edges$$,', ', 6, 10, 1, $$l$$, true)'); -- ONE TO MANY - RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, 2, ARRAY[3], 1, $$r$$, true)'); - RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edge_table$$,', ', 2, ARRAY[3], 1, $$l$$, true)'); + RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, 6, ARRAY[10], 1, $$r$$, true)'); + RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edges$$,', ', 6, ARRAY[10], 1, $$l$$, true)'); -- MANY TO ONE - RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, ARRAY[2], 3, 2, $$r$$, true)'); - RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edge_table$$,', ', ARRAY[2], 3, 2, $$l$$, true)'); + RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, ARRAY[6], 10, 2, $$r$$, true)'); + RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edges$$,', ', ARRAY[6], 10, 2, $$l$$, true)'); -- MANY TO MANY - RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, ARRAY[2], ARRAY[3], 2, $$l$$, true)'); - RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edge_table$$,', ', ARRAY[2], ARRAY[3], 2, $$l$$, true)'); + RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, ARRAY[6], ARRAY[10], 2, $$l$$, true)'); + RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edges$$,', ', ARRAY[6], ARRAY[10], 2, $$l$$, true)'); -- COMBINATIONS - RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, $$SELECT * FROM combinations_table$$, 2, $$r$$, true)'); - RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edge_table$$,', ', $$SELECT * FROM combinations_table$$, 2, $$r$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_withPointsKSP($$SELECT * FROM edge_table$$, $$SELECT * from pointsOfInterest$$,',', 2, $$r$$, true)'); - /* TODO Remove on v4*/ - -- ONE TO ONE - RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, 2, 3, 2, true)'); - RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edge_table$$,', ', 2, 3, 2, true)'); - ELSE - /* TODO Remove on v4*/ - -- ONE TO ONE - RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, 2, 3, 2, true)'); - RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edge_table$$,', ', 2, 3, 2, true)'); + RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, $$SELECT * FROM combinations$$, 2, $$r$$, true)'); + RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edges$$,', ', $$SELECT * FROM combinations$$, 2, $$r$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_withPointsKSP($$SELECT * FROM edges$$, $$SELECT * from pointsOfInterest$$,',', 2, $$r$$, true)'); END IF; + /* TODO Remove on v4*/ + -- ONE TO ONE + SET client_min_messages TO ERROR; + RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, 5, 10, 2, driving_side => $$r$$, directed => true)'); + RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edges$$,', ', 6, 10, 2, driving_side => $$r$$, directed => true)'); + RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, 5, 10, 2, true, true, $$r$$)'); + RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edges$$,', ', 6, 10, 2, true, true, $$r$$)'); + RETURN QUERY SELECT style_dijkstra('pgr_withPointsKSP(', ', $$SELECT * from pointsOfInterest$$, 5, 10, 2, true)'); + RETURN QUERY SELECT innerquery_points('pgr_withPointsKSP($$SELECT * FROM edges$$,', ', 6, 10, 2, true)'); + SET client_min_messages TO NOTICE; END $BODY$ LANGUAGE plpgsql VOLATILE; diff --git a/pgtap/ksp/withPointsKSP/no_crash_test.pg b/pgtap/ksp/withPointsKSP/no_crash_test.pg index 141860dc851..56a7629acfa 100644 --- a/pgtap/ksp/withPointsKSP/no_crash_test.pg +++ b/pgtap/ksp/withPointsKSP/no_crash_test.pg @@ -18,20 +18,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.6.0') THEN plan(164) ELSE plan(26) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE pois AS SELECT pid, edge_id, fraction from pointsOfInterest; PREPARE null_ret AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); SELECT set_eq('null_ret', 'SELECT NULL::BIGINT[]', 'Should be empty to tests be meaningful'); @@ -48,16 +48,16 @@ IF min_version('3.6.0') THEN params = ARRAY[ '$$edges$$', '$$SELECT pid, edge_id, fraction from pointsOfInterest$$', - '1::BIGINT', - '2::BIGINT', + '5::BIGINT', + '6::BIGINT', '3', '$$r$$' ]::TEXT[]; subs = ARRAY[ 'NULL', 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL', 'NULL' ]::TEXT[]; @@ -77,16 +77,16 @@ IF min_version('3.6.0') THEN -- one to many params = ARRAY['$$edges$$', '$$SELECT pid, edge_id, fraction from pointsOfInterest$$', - '1::BIGINT', - 'ARRAY[2,5]::BIGINT[]', + '5::BIGINT', + 'ARRAY[6,7]::BIGINT[]', '2', '$$l$$' ]::TEXT[]; subs = ARRAY[ 'NULL', 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL', 'NULL' ]::TEXT[]; @@ -106,16 +106,16 @@ IF min_version('3.6.0') THEN -- many to one params = ARRAY['$$edges$$', '$$SELECT pid, edge_id, fraction from pointsOfInterest$$', - 'ARRAY[2,5]::BIGINT[]', - '1', + 'ARRAY[6,7]::BIGINT[]', + '5', '2', '$$r$$' ]::TEXT[]; subs = ARRAY[ 'NULL', 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL', 'NULL' ]::TEXT[]; @@ -135,15 +135,15 @@ IF min_version('3.6.0') THEN -- many to many params = ARRAY['$$edges$$', '$$SELECT pid, edge_id, fraction from pointsOfInterest$$', - 'ARRAY[1]::BIGINT[]', 'ARRAY[2,5]::BIGINT[]', + 'ARRAY[5]::BIGINT[]', 'ARRAY[6,7]::BIGINT[]', '1', '$$l$$' ]::TEXT[]; subs = ARRAY[ 'NULL', 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL', 'NULL' ]::TEXT[]; @@ -163,10 +163,10 @@ IF min_version('3.6.0') THEN -- Combinations SQL PREPARE null_combinations AS - SELECT source, target FROM combinations_table WHERE source IN (-1); + SELECT source, target FROM combinations WHERE source IN (-1); PREPARE combinations AS - SELECT source, target FROM combinations_table WHERE target > 2; + SELECT source, target FROM combinations; RETURN QUERY SELECT isnt_empty('combinations', 'Should be not empty to tests be meaningful'); @@ -182,7 +182,7 @@ IF min_version('3.6.0') THEN subs = ARRAY[ 'NULL', 'NULL', - '$$(SELECT source, target FROM combinations_table WHERE source IN (-1))$$', + '$$(SELECT source, target FROM combinations WHERE source IN (-1))$$', 'NULL', 'NULL' ]::TEXT[]; @@ -202,17 +202,17 @@ END IF; /* TODO remove tests on v4*/ -- 1 to distance params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT pid, edge_id, fraction from pointsOfInterest$$', - '1', - '2', + '5', + '6', '2' ]::TEXT[]; subs = ARRAY[ 'NULL', 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; diff --git a/pgtap/lineGraph/lineGraph/inner_query.pg b/pgtap/lineGraph/lineGraph/inner_query.pg index bb50d59d62c..db3709816ea 100644 --- a/pgtap/lineGraph/lineGraph/inner_query.pg +++ b/pgtap/lineGraph/lineGraph/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_linegraph(', ')'); diff --git a/pgtap/lineGraph/lineGraph/no_crash_test.pg b/pgtap/lineGraph/lineGraph/no_crash_test.pg index 6019345a5f8..e61e5a1e9dd 100644 --- a/pgtap/lineGraph/lineGraph/no_crash_test.pg +++ b/pgtap/lineGraph/lineGraph/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(9); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -35,7 +35,7 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$']::TEXT[]; + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$']::TEXT[]; subs = ARRAY[ 'NULL' ]::TEXT[]; diff --git a/pgtap/lineGraph/lineGraphFull/compare_dijkstra.pg b/pgtap/lineGraph/lineGraphFull/compare_dijkstra.pg index 290201e0d6e..b3526f81ceb 100644 --- a/pgtap/lineGraph/lineGraphFull/compare_dijkstra.pg +++ b/pgtap/lineGraph/lineGraphFull/compare_dijkstra.pg @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(1); DROP TABLE IF EXISTS result2; @@ -49,7 +49,7 @@ BEGIN INSERT INTO result2 SELECT * FROM pgr_lineGraphFull( $$SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id$$ + FROM edges ORDER BY id$$ ); WITH foo AS (SELECT source AS id FROM result2 @@ -60,7 +60,7 @@ BEGIN ORDER BY id; UPDATE result2_vertices_pgr AS r SET original_id = v.id - FROM edge_table_vertices_pgr AS v WHERE v.id = r.id; + FROM vertices AS v WHERE v.id = r.id; WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL), b AS (SELECT * FROM result2 WHERE cost = 0 and source IN (SELECT id FROM a)), @@ -78,12 +78,12 @@ BEGIN WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL), b AS (SELECT source,edge FROM result2 WHERE source IN (SELECT id FROM a)), - c AS (SELECT id,source FROM edge_table WHERE id IN (SELECT edge FROM b)) + c AS (SELECT id,source FROM edges WHERE id IN (SELECT edge FROM b)) UPDATE result2_vertices_pgr AS d SET original_id = (SELECT source FROM c WHERE c.id = (SELECT edge FROM b WHERE b.source = d.id)) WHERE id IN (SELECT id FROM a); WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL), b AS (SELECT target,edge FROM result2 WHERE target IN (SELECT id FROM a)), - c AS (SELECT id,target FROM edge_table WHERE id IN (SELECT edge FROM b)) + c AS (SELECT id,target FROM edges WHERE id IN (SELECT edge FROM b)) UPDATE result2_vertices_pgr AS d SET original_id = (SELECT target FROM c WHERE c.id = (SELECT edge FROM b WHERE b.target = d.id)) WHERE id IN (SELECT id FROM a); ALTER TABLE result2 ADD COLUMN original_source_vertex BIGINT; @@ -129,7 +129,7 @@ BEGIN SELECT agg_cost FROM a'; original_sql := - 'SELECT agg_cost from pgr_dijkstra($$SELECT id, * FROM edge_table$$, ARRAY[2], ARRAY[3])'; + 'SELECT agg_cost from pgr_dijkstra($$SELECT id, * FROM edges$$, ARRAY[2], ARRAY[3])'; RETURN query SELECT set_eq(original_sql, turnpenalty_sql, original_sql); diff --git a/pgtap/lineGraph/lineGraphFull/edge_cases/original_edge_check.pg b/pgtap/lineGraph/lineGraphFull/edge_cases/original_edge_check.pg index 5c131a9c527..52069183032 100644 --- a/pgtap/lineGraph/lineGraphFull/edge_cases/original_edge_check.pg +++ b/pgtap/lineGraph/lineGraphFull/edge_cases/original_edge_check.pg @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(1); CREATE or REPLACE FUNCTION lineGraphFullOriginalEdgeCheck(cant INTEGER default 17) @@ -35,9 +35,9 @@ original_sql TEXT; inner_sql TEXT; BEGIN - original_sql := 'WITH going_edges AS (SELECT count(*) FROM edge_table WHERE cost > 0), coming_edges AS (SELECT count(*) FROM edge_table WHERE reverse_cost > 0) SELECT a.count + b.count FROM going_edges AS a, coming_edges AS b'; + original_sql := 'WITH going_edges AS (SELECT count(*) FROM edges WHERE cost > 0), coming_edges AS (SELECT count(*) FROM edges WHERE reverse_cost > 0) SELECT a.count + b.count FROM going_edges AS a, coming_edges AS b'; - inner_sql := 'SELECT id AS id, source AS source, target AS target, cost, reverse_cost FROM edge_table'; + inner_sql := 'SELECT id AS id, source AS source, target AS target, cost, reverse_cost FROM edges'; turnpenalty_sql := 'SELECT count(*) FROM pgr_lineGraphFull($$'||inner_sql||'$$) where cost = 1'; diff --git a/pgtap/lineGraph/lineGraphFull/edge_cases/original_vertex_mapping.pg b/pgtap/lineGraph/lineGraphFull/edge_cases/original_vertex_mapping.pg index b23757c5567..47aaf55cdd1 100644 --- a/pgtap/lineGraph/lineGraphFull/edge_cases/original_vertex_mapping.pg +++ b/pgtap/lineGraph/lineGraphFull/edge_cases/original_vertex_mapping.pg @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(1); DROP TABLE IF EXISTS result2; @@ -48,7 +48,7 @@ BEGIN INSERT INTO result2 SELECT * FROM pgr_lineGraphFull( $$SELECT id, source, target, cost - FROM edge_table$$ + FROM edges$$ ); WITH foo AS (SELECT source AS id FROM result2 @@ -59,7 +59,7 @@ BEGIN ORDER BY id; UPDATE result2_vertices_pgr AS r SET original_id = v.id - FROM edge_table_vertices_pgr AS v WHERE v.id = r.id; + FROM vertices AS v WHERE v.id = r.id; WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL), b AS (SELECT * FROM result2 WHERE cost = 0 and source IN (SELECT id FROM a)), @@ -77,12 +77,12 @@ BEGIN WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL), b AS (SELECT source,edge FROM result2 WHERE source IN (SELECT id FROM a)), - c AS (SELECT id,source FROM edge_table WHERE id IN (SELECT edge FROM b)) + c AS (SELECT id,source FROM edges WHERE id IN (SELECT edge FROM b)) UPDATE result2_vertices_pgr AS d SET original_id = (SELECT source FROM c WHERE c.id = (SELECT edge FROM b WHERE b.source = d.id)) WHERE id IN (SELECT id FROM a); WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL), b AS (SELECT target,edge FROM result2 WHERE target IN (SELECT id FROM a)), - c AS (SELECT id,target FROM edge_table WHERE id IN (SELECT edge FROM b)) + c AS (SELECT id,target FROM edges WHERE id IN (SELECT edge FROM b)) UPDATE result2_vertices_pgr AS d SET original_id = (SELECT target FROM c WHERE c.id = (SELECT edge FROM b WHERE b.target = d.id)) WHERE id IN (SELECT id FROM a); original_sql := 'SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL'; diff --git a/pgtap/lineGraph/lineGraphFull/edge_cases/reverse_cost_equivalence.pg b/pgtap/lineGraph/lineGraphFull/edge_cases/reverse_cost_equivalence.pg index 065467c3641..cf5ff8660ef 100644 --- a/pgtap/lineGraph/lineGraphFull/edge_cases/reverse_cost_equivalence.pg +++ b/pgtap/lineGraph/lineGraphFull/edge_cases/reverse_cost_equivalence.pg @@ -19,15 +19,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(1); SELECT bag_has( - $$SELECT * FROM pgr_lineGraphFull('select id, source, target, cost, reverse_cost from edge_table where id =1')$$, + $$SELECT * FROM pgr_lineGraphFull('select id, source, target, cost, reverse_cost from edges where id =1')$$, $$SELECT * FROM pgr_lineGraphFull( - 'select id, source, target, cost from edge_table where id = 1 + 'select id, source, target, cost from edges where id = 1 UNION ALL - select -1*id, target AS source, source AS target, reverse_cost AS cost from edge_table where id = 1')$$ + select -1*id, target AS source, source AS target, reverse_cost AS cost from edges where id = 1')$$ ); SELECT finish(); ROLLBACK; diff --git a/pgtap/lineGraph/lineGraphFull/inner_query.pg b/pgtap/lineGraph/lineGraphFull/inner_query.pg index 78b4e88ce7b..2517812adc7 100644 --- a/pgtap/lineGraph/lineGraphFull/inner_query.pg +++ b/pgtap/lineGraph/lineGraphFull/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_linegraphfull(', ')'); diff --git a/pgtap/lineGraph/lineGraphFull/no_crash_test.pg b/pgtap/lineGraph/lineGraphFull/no_crash_test.pg index 0ee95d1eb1a..e0eae19b7ed 100644 --- a/pgtap/lineGraph/lineGraphFull/no_crash_test.pg +++ b/pgtap/lineGraph/lineGraphFull/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(9); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -35,7 +35,7 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$']::TEXT[]; + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$']::TEXT[]; subs = ARRAY[ 'NULL' ]::TEXT[]; diff --git a/pgtap/max_flow/boykovKolmogorov/edge_cases.pg b/pgtap/max_flow/boykovKolmogorov/edge_cases.pg index d3b986c90da..0875bf10bea 100644 --- a/pgtap/max_flow/boykovKolmogorov/edge_cases.pg +++ b/pgtap/max_flow/boykovKolmogorov/edge_cases.pg @@ -23,19 +23,19 @@ SELECT plan(4); PREPARE t1 AS SELECT * FROM pgr_boykovKolmogorov( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', 3, 5); PREPARE t2 AS SELECT * FROM pgr_boykovKolmogorov( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', 3, ARRAY[5]); PREPARE t3 AS SELECT * FROM pgr_boykovKolmogorov( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', ARRAY[3], 5); PREPARE t4 AS SELECT * FROM pgr_boykovKolmogorov( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', 3, ARRAY[5]); SELECT lives_ok('t1','pgr_boykovKolmogorov(one to One)'); diff --git a/pgtap/max_flow/boykovKolmogorov/inner_query.pg b/pgtap/max_flow/boykovKolmogorov/inner_query.pg index 9514e7ff6c7..85c31337a4b 100644 --- a/pgtap/max_flow/boykovKolmogorov/inner_query.pg +++ b/pgtap/max_flow/boykovKolmogorov/inner_query.pg @@ -19,27 +19,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT CASE WHEN min_version('3.2.0') THEN plan(282) ELSE plan(218) END; +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); +SELECT CASE WHEN min_version('3.2.0') THEN plan(282) ELSE plan(221) END; -- ONE TO ONE -SELECT style_max_flow('pgr_boykovkolmogorov(', ', 2, 3)'); +SELECT style_max_flow('pgr_boykovkolmogorov(', ', 6, 10)'); -- ONE TO MANY -SELECT style_max_flow('pgr_boykovkolmogorov(', ', 2, ARRAY[3])'); +SELECT style_max_flow('pgr_boykovkolmogorov(', ', 6, ARRAY[10])'); -- MANY TO ONE -SELECT style_max_flow('pgr_boykovkolmogorov(', ', ARRAY[2], 3)'); +SELECT style_max_flow('pgr_boykovkolmogorov(', ', ARRAY[6], 10)'); -- MANY TO MANY -SELECT style_max_flow('pgr_boykovkolmogorov(', ', ARRAY[2], ARRAY[3])'); +SELECT style_max_flow('pgr_boykovkolmogorov(', ', ARRAY[6], ARRAY[10])'); -- COMBINATIONS CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_max_flow('pgr_boykovkolmogorov(', ', $$SELECT * FROM combinations_table WHERE target NOT IN (1,2)$$)'); - RETURN QUERY SELECT innerquery_combinations('pgr_boykovkolmogorov($$SELECT * FROM edge_table$$,',')'); + RETURN QUERY SELECT style_max_flow('pgr_boykovkolmogorov(', ', $$SELECT * FROM combinations WHERE target NOT IN (5,6)$$)'); + RETURN QUERY SELECT innerquery_combinations('pgr_boykovkolmogorov($$SELECT * FROM edges$$,',')'); ELSE - RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); + RETURN QUERY SELECT skip( 5, 'Combinations signature added on 3.2.0'); END IF; END $BODY$ diff --git a/pgtap/max_flow/boykovKolmogorov/no_crash_test.pg b/pgtap/max_flow/boykovKolmogorov/no_crash_test.pg index 79b39199c47..0080c989ced 100644 --- a/pgtap/max_flow/boykovKolmogorov/no_crash_test.pg +++ b/pgtap/max_flow/boykovKolmogorov/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(68) ELSE plan(81) END; diff --git a/pgtap/max_flow/edge_cases/empty_combinations_empty_result.pg b/pgtap/max_flow/edge_cases/empty_combinations_empty_result.pg index 46c9927e0c6..5d6add70d42 100644 --- a/pgtap/max_flow/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/max_flow/edge_cases/empty_combinations_empty_result.pg @@ -35,17 +35,17 @@ BEGIN IF TestFunction = 'pgr_maxFlow' THEN RETURN query SELECT set_eq( 'SELECT * FROM ' || TestFunction || '( $$' || sql_EdgesQuery || '$$, - $$SELECT * FROM combinations_table WHERE source IN (-1)$$ ) ', + $$SELECT * FROM combinations WHERE source IN (-1)$$ ) ', 'SELECT NULL::BIGINT' ); ELSIF TestFunction = 'pgr_maxFlowMinCost_Cost' THEN RETURN query SELECT set_eq( 'SELECT * FROM ' || TestFunction || '( $$' || sql_EdgesQuery || '$$, - $$SELECT * FROM combinations_table WHERE source IN (-1)$$ ) ', + $$SELECT * FROM combinations WHERE source IN (-1)$$ ) ', 'SELECT NULL::FLOAT' ); ELSE RETURN query SELECT is_empty( 'SELECT * FROM ' || TestFunction || '( $$' || sql_EdgesQuery || '$$, - $$SELECT * FROM combinations_table WHERE source IN (-1)$$ ) ' + $$SELECT * FROM combinations WHERE source IN (-1)$$ ) ' ); END IF; RETURN; @@ -56,43 +56,43 @@ language plpgsql; -- test pgr_maxFlow SELECT * FROM foo( 'pgr_maxFlow', - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table' + 'SELECT id, source, target, capacity, reverse_capacity FROM edges' ); -- test pgr_boykovKolmogorov SELECT * FROM foo( 'pgr_boykovKolmogorov', - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table' + 'SELECT id, source, target, capacity, reverse_capacity FROM edges' ); -- test pgr_edmondsKarp SELECT * FROM foo( 'pgr_edmondsKarp', - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table' + 'SELECT id, source, target, capacity, reverse_capacity FROM edges' ); -- test pgr_pushRelabel SELECT * FROM foo( 'pgr_pushRelabel', - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table' + 'SELECT id, source, target, capacity, reverse_capacity FROM edges' ); -- test pgr_edgeDisjointPaths SELECT * FROM foo( 'pgr_edgeDisjointPaths', - 'SELECT id, source, target, cost, reverse_cost FROM edge_table' + 'SELECT id, source, target, cost, reverse_cost FROM edges' ); -- test pgr_maxFlowMinCost SELECT * FROM foo( 'pgr_maxFlowMinCost', - 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edge_table' + 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edges' ); -- test pgr_maxFlowMinCost_Cost SELECT * FROM foo( 'pgr_maxFlowMinCost_Cost', - 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edge_table' + 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edges' ); -- Finish the tests and clean up. diff --git a/pgtap/max_flow/edge_cases/internet_example.pg b/pgtap/max_flow/edge_cases/internet_example.pg index 6954da998f6..675bac56b3f 100644 --- a/pgtap/max_flow/edge_cases/internet_example.pg +++ b/pgtap/max_flow/edge_cases/internet_example.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(3); diff --git a/pgtap/max_flow/edge_cases/many_to_many_eq_combinations.pg b/pgtap/max_flow/edge_cases/many_to_many_eq_combinations.pg index 76fa9545735..e3d33079e99 100644 --- a/pgtap/max_flow/edge_cases/many_to_many_eq_combinations.pg +++ b/pgtap/max_flow/edge_cases/many_to_many_eq_combinations.pg @@ -85,49 +85,49 @@ BEGIN RETURN QUERY SELECT * FROM flow_combinations_eq_test( 'pgr_maxFlow', - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table' + 'SELECT id, source, target, capacity, reverse_capacity FROM edges' ); -- test pgr_boykovKolmogorov RETURN QUERY SELECT * FROM flow_combinations_eq_test( 'pgr_boykovKolmogorov', - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table' + 'SELECT id, source, target, capacity, reverse_capacity FROM edges' ); -- test pgr_edmondsKarp RETURN QUERY SELECT * FROM flow_combinations_eq_test( 'pgr_edmondsKarp', - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table' + 'SELECT id, source, target, capacity, reverse_capacity FROM edges' ); -- test pgr_pushRelabel RETURN QUERY SELECT * FROM flow_combinations_eq_test( 'pgr_pushRelabel', - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table' + 'SELECT id, source, target, capacity, reverse_capacity FROM edges' ); -- test pgr_edgeDisjointPaths RETURN QUERY SELECT * FROM flow_combinations_eq_test( 'pgr_edgeDisjointPaths', - 'SELECT id, source, target, cost, reverse_cost FROM edge_table' + 'SELECT id, source, target, cost, reverse_cost FROM edges' ); -- test pgr_maxFlowMinCost RETURN QUERY SELECT * FROM flow_combinations_eq_test( 'pgr_maxFlowMinCost', - 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edge_table' + 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edges' ); -- test pgr_maxFlowMinCost_Cost RETURN QUERY SELECT * FROM flow_combinations_eq_test( 'pgr_maxFlowMinCost_Cost', - 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edge_table' + 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edges' ); END; diff --git a/pgtap/max_flow/edgedisjointpaths/edge_cases.pg b/pgtap/max_flow/edgedisjointpaths/edge_cases.pg index 084364d352b..2b486a9ea4e 100644 --- a/pgtap/max_flow/edgedisjointpaths/edge_cases.pg +++ b/pgtap/max_flow/edgedisjointpaths/edge_cases.pg @@ -19,18 +19,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(2); PREPARE edp_dir AS SELECT * FROM pgr_edgeDisjointPaths( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', 3, 5 ); PREPARE edp_undir AS SELECT * FROM pgr_edgeDisjointPaths( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', 3, 5, directed := false ); diff --git a/pgtap/max_flow/edgedisjointpaths/inner_query.pg b/pgtap/max_flow/edgedisjointpaths/inner_query.pg index 656ca0b9744..eb557ff61a5 100644 --- a/pgtap/max_flow/edgedisjointpaths/inner_query.pg +++ b/pgtap/max_flow/edgedisjointpaths/inner_query.pg @@ -19,27 +19,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); -SELECT CASE WHEN min_version('3.2.0') THEN plan(282) ELSE plan(218) END; +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); +SELECT CASE WHEN min_version('3.2.0') THEN plan(282) ELSE plan(221) END; -- ONE TO ONE -SELECT style_dijkstra('pgr_edgedisjointpaths(', ', 2, 3)'); +SELECT style_dijkstra('pgr_edgedisjointpaths(', ', 5, 10)'); -- ONE TO MANY -SELECT style_dijkstra('pgr_edgedisjointpaths(', ', 2, ARRAY[3])'); +SELECT style_dijkstra('pgr_edgedisjointpaths(', ', 5, ARRAY[10])'); -- MANY TO ONE -SELECT style_dijkstra('pgr_edgedisjointpaths(', ', ARRAY[2], 3)'); +SELECT style_dijkstra('pgr_edgedisjointpaths(', ', ARRAY[5], 10)'); -- MANY TO MANY -SELECT style_dijkstra('pgr_edgedisjointpaths(', ', ARRAY[2], ARRAY[3])'); +SELECT style_dijkstra('pgr_edgedisjointpaths(', ', ARRAY[5], ARRAY[10])'); -- COMBINATIONS CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_dijkstra('pgr_edgedisjointpaths(', ', $$SELECT * FROM combinations_table WHERE target NOT IN (1,2)$$)'); - RETURN QUERY SELECT innerquery_combinations('pgr_edgedisjointpaths($$SELECT * FROM edge_table$$,',')'); + RETURN QUERY SELECT style_dijkstra('pgr_edgedisjointpaths(', ', $$SELECT * FROM combinations WHERE target NOT IN (6,10)$$)'); + RETURN QUERY SELECT innerquery_combinations('pgr_edgedisjointpaths($$SELECT * FROM edges$$,',')'); ELSE - RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); + RETURN QUERY SELECT skip(5, 'Combinations signature added on 3.2.0'); END IF; END $BODY$ diff --git a/pgtap/max_flow/edgedisjointpaths/no_crash_test.pg b/pgtap/max_flow/edgedisjointpaths/no_crash_test.pg index d2644ebb847..4ddf306cbc4 100644 --- a/pgtap/max_flow/edgedisjointpaths/no_crash_test.pg +++ b/pgtap/max_flow/edgedisjointpaths/no_crash_test.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(68) ELSE plan(81) END; @@ -31,13 +31,13 @@ params TEXT[]; subs TEXT[]; BEGIN PREPARE edges AS - SELECT id, source, target, cost, reverse_cost FROM edge_table; + SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS - SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); + SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS - SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); + SELECT array_agg(id) FROM vertices WHERE id IN (-1); RETURN QUERY @@ -50,13 +50,13 @@ BEGIN -- one to one params = ARRAY[ '$$edges$$' - ,'1::BIGINT', - '2::BIGINT' + ,'5::BIGINT', + '6::BIGINT' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_edgeDisjointPaths', params, subs); @@ -72,8 +72,8 @@ BEGIN params = ARRAY['$$edges$$','1', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_edgeDisjointPaths', params, subs); @@ -89,8 +89,8 @@ BEGIN params = ARRAY['$$edges$$', 'ARRAY[2,5]::BIGINT[]', '1']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_edgeDisjointPaths', params, subs); @@ -104,12 +104,12 @@ BEGIN -- many to many params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[1]::BIGINT[]', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_edgeDisjointPaths', params, subs); @@ -128,10 +128,13 @@ BEGIN RETURN; END IF; + /* TODO when target > 2 the server crashes, dont know why */ PREPARE combinations AS - SELECT source, target FROM combinations_table WHERE target > 2; + SELECT source, target FROM combinations WHERE target NOT IN (6,10); + + PREPARE null_combinations AS - SELECT source, target FROM combinations_table WHERE source IN (-1); + SELECT source, target FROM combinations WHERE source IN (-1); RETURN QUERY SELECT isnt_empty('combinations', 'Should be not empty to tests be meaningful'); RETURN QUERY @@ -139,7 +142,7 @@ BEGIN params = ARRAY['$$edges$$', '$$combinations$$']::TEXT[]; subs = ARRAY[ 'NULL', - '$$(SELECT source, target FROM combinations_table WHERE source IN (-1))$$' + '$$(SELECT source, target FROM combinations WHERE source IN (-1))$$' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_edgeDisjointPaths', params, subs); diff --git a/pgtap/max_flow/edmondsKarp/edge_cases.pg b/pgtap/max_flow/edmondsKarp/edge_cases.pg index b01a215e7ab..436d222d1a9 100644 --- a/pgtap/max_flow/edmondsKarp/edge_cases.pg +++ b/pgtap/max_flow/edmondsKarp/edge_cases.pg @@ -23,22 +23,22 @@ SELECT plan(4); PREPARE t1 AS SELECT * FROM pgr_edmondskarp( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', 3, 5 ); PREPARE t2 AS SELECT * FROM pgr_edmondskarp( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', 3, ARRAY[5] ); PREPARE t3 AS SELECT * FROM pgr_edmondskarp( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', ARRAY[3], 5 ); PREPARE t4 AS SELECT * FROM pgr_edmondskarp( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', ARRAY[3], ARRAY[5] ); diff --git a/pgtap/max_flow/edmondsKarp/inner_query.pg b/pgtap/max_flow/edmondsKarp/inner_query.pg index 7318eb4da9b..57b85a9a895 100644 --- a/pgtap/max_flow/edmondsKarp/inner_query.pg +++ b/pgtap/max_flow/edmondsKarp/inner_query.pg @@ -19,25 +19,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(282) ELSE plan(218) END; -- ONE TO ONE -SELECT style_max_flow('pgr_edmondskarp(', ', 2, 3)'); +SELECT style_max_flow('pgr_edmondskarp(', ', 6, 10)'); -- ONE TO MANY -SELECT style_max_flow('pgr_edmondskarp(', ', 2, ARRAY[3])'); +SELECT style_max_flow('pgr_edmondskarp(', ', 6, ARRAY[10])'); -- MANY TO ONE -SELECT style_max_flow('pgr_edmondskarp(', ', ARRAY[2], 3)'); +SELECT style_max_flow('pgr_edmondskarp(', ', ARRAY[6], 10)'); -- MANY TO MANY -SELECT style_max_flow('pgr_edmondskarp(', ', ARRAY[2], ARRAY[3])'); +SELECT style_max_flow('pgr_edmondskarp(', ', ARRAY[6], ARRAY[10])'); -- COMBINATIONS CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_max_flow('pgr_edmondskarp(', ', $$SELECT * FROM combinations_table WHERE target NOT IN (1,2)$$)'); - RETURN QUERY SELECT innerquery_combinations('pgr_edmondskarp($$SELECT * FROM edge_table$$,',')'); + RETURN QUERY SELECT style_max_flow('pgr_edmondskarp(', ', $$SELECT * FROM combinations WHERE target NOT IN (6,10)$$)'); + RETURN QUERY SELECT innerquery_combinations('pgr_edmondskarp($$SELECT * FROM edges$$,',')'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/max_flow/edmondsKarp/no_crash_test.pg b/pgtap/max_flow/edmondsKarp/no_crash_test.pg index 66bfc5b3ef5..c0f0fbd86b3 100644 --- a/pgtap/max_flow/edmondsKarp/no_crash_test.pg +++ b/pgtap/max_flow/edmondsKarp/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(68) ELSE plan(81) END; diff --git a/pgtap/max_flow/maxCardinalityMatch/edge_cases.pg b/pgtap/max_flow/maxCardinalityMatch/edge_cases.pg index 7e95bfb5f4f..6b28c8b6462 100644 --- a/pgtap/max_flow/maxCardinalityMatch/edge_cases.pg +++ b/pgtap/max_flow/maxCardinalityMatch/edge_cases.pg @@ -19,38 +19,38 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(6); PREPARE noflag AS SELECT * FROM pgr_maxCardinalityMatch( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table' + 'SELECT id, source, target, cost, reverse_cost FROM edges' ); PREPARE mcm_dir AS SELECT * FROM pgr_maxCardinalityMatch( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', directed := true ); PREPARE mcm_undir AS SELECT * FROM pgr_maxCardinalityMatch( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', directed := false ); PREPARE mcm_noflag AS SELECT * FROM pgr_maxCardinalityMatch( - 'SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edge_table' + 'SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edges' ); PREPARE mcm_dir1 AS SELECT * FROM pgr_maxCardinalityMatch( - 'SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edge_table', + 'SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edges', directed := true ); PREPARE mcm_undir1 AS SELECT * FROM pgr_maxCardinalityMatch( - 'SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edge_table', + 'SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edges', directed := false ); diff --git a/pgtap/max_flow/maxCardinalityMatch/inner_query.pg b/pgtap/max_flow/maxCardinalityMatch/inner_query.pg index bfe8c1a5e4d..e4537035f3c 100644 --- a/pgtap/max_flow/maxCardinalityMatch/inner_query.pg +++ b/pgtap/max_flow/maxCardinalityMatch/inner_query.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SET client_min_messages TO ERROR; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_lib_version('3.4.0') THEN plan(324) ELSE PLAN(163) END; diff --git a/pgtap/max_flow/maxCardinalityMatch/no_crash_test.pg b/pgtap/max_flow/maxCardinalityMatch/no_crash_test.pg index 134d4fd1556..5adfad5896d 100644 --- a/pgtap/max_flow/maxCardinalityMatch/no_crash_test.pg +++ b/pgtap/max_flow/maxCardinalityMatch/no_crash_test.pg @@ -19,22 +19,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_lib_version('3.4.0') THEN plan(36) ELSE PLAN(5) END; PREPARE edges1 AS -SELECT id, source, target, cost FROM edge_table; +SELECT id, source, target, cost FROM edges; PREPARE edges2 AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; SELECT isnt_empty('edges1', 'Should not be empty true to tests be meaningful'); SELECT isnt_empty('edges2', 'Should not be empty true to tests be meaningful'); -- TODO v4 going & coming are to be removed, remove these prepares PREPARE edges_1 AS -SELECT id, source, target, cost AS going FROM edge_table; +SELECT id, source, target, cost AS going FROM edges; PREPARE edges_2 AS -SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edge_table; +SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edges; SELECT isnt_empty('edges_1', 'Should not be empty true to tests be meaningful'); SELECT isnt_empty('edges_2', 'Should not be empty true to tests be meaningful'); @@ -52,11 +52,11 @@ BEGIN IF min_lib_version('3.4.0') THEN params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$' + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_maxCardinalityMatch', params, subs); - params[1] := '$$SELECT id, source, target, cost FROM edge_table$$'; + params[1] := '$$SELECT id, source, target, cost FROM edges$$'; RETURN query SELECT * FROM no_crash_test('pgr_maxCardinalityMatch', params, subs); params[1] := '$$edges1$$'; @@ -69,9 +69,9 @@ BEGIN END IF; -- TODO v4 going & coming are to be removed, remove these tests - params[1] := '$$SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edge_table$$'; + params[1] := '$$SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edges$$'; RETURN query SELECT * FROM no_crash_test('pgr_maxCardinalityMatch', params, subs); - params[1] := '$$SELECT id, source, target, cost AS going FROM edge_table$$'; + params[1] := '$$SELECT id, source, target, cost AS going FROM edges$$'; RETURN query SELECT * FROM no_crash_test('pgr_maxCardinalityMatch', params, subs); params[1] := '$$edges_1$$'; RETURN query SELECT * FROM no_crash_test('pgr_maxCardinalityMatch', params, subs); diff --git a/pgtap/max_flow/maxFlow/edge_cases.pg b/pgtap/max_flow/maxFlow/edge_cases.pg index 9310da55134..30c42cd9a5e 100644 --- a/pgtap/max_flow/maxFlow/edge_cases.pg +++ b/pgtap/max_flow/maxFlow/edge_cases.pg @@ -19,27 +19,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(4); PREPARE t1 AS SELECT * FROM pgr_maxflow( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', 3, 5 ); PREPARE t2 AS SELECT * FROM pgr_maxflow( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', 3, ARRAY[5] ); PREPARE t3 AS SELECT * FROM pgr_maxflow( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', ARRAY[3], 5 ); PREPARE t4 AS SELECT * FROM pgr_maxflow( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', ARRAY[3], ARRAY[5] ); diff --git a/pgtap/max_flow/maxFlow/inner_query.pg b/pgtap/max_flow/maxFlow/inner_query.pg index a264db1755f..16ac0bfb774 100644 --- a/pgtap/max_flow/maxFlow/inner_query.pg +++ b/pgtap/max_flow/maxFlow/inner_query.pg @@ -19,25 +19,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(282) ELSE plan(218) END; -- ONE TO ONE -SELECT style_max_flow('pgr_maxflow(', ', 2, 3)'); +SELECT style_max_flow('pgr_maxflow(', ', 6, 10)'); -- ONE TO MANY -SELECT style_max_flow('pgr_maxflow(', ', 2, ARRAY[3])'); +SELECT style_max_flow('pgr_maxflow(', ', 6, ARRAY[10])'); -- MANY TO ONE -SELECT style_max_flow('pgr_maxflow(', ', ARRAY[2], 3)'); +SELECT style_max_flow('pgr_maxflow(', ', ARRAY[6], 10)'); -- MANY TO MANY -SELECT style_max_flow('pgr_maxflow(', ', ARRAY[2], ARRAY[3])'); +SELECT style_max_flow('pgr_maxflow(', ', ARRAY[6], ARRAY[10])'); -- COMBINATIONS CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_max_flow('pgr_maxflow(', ', $$SELECT * FROM combinations_table WHERE target NOT IN (1,2)$$)'); - RETURN QUERY SELECT innerquery_combinations('pgr_maxflow($$SELECT * FROM edge_table$$,',')'); + RETURN QUERY SELECT style_max_flow('pgr_maxflow(', ', $$SELECT * FROM combinations WHERE target NOT IN (5,6)$$)'); + RETURN QUERY SELECT innerquery_combinations('pgr_maxflow($$SELECT * FROM edges$$,',')'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/max_flow/maxFlow/no_crash_test.pg b/pgtap/max_flow/maxFlow/no_crash_test.pg index e3716ec0c42..9352520bd68 100644 --- a/pgtap/max_flow/maxFlow/no_crash_test.pg +++ b/pgtap/max_flow/maxFlow/no_crash_test.pg @@ -19,194 +19,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (81) ELSE plan(68) END; -PREPARE edges AS -SELECT id, - source, - target, - capacity, - reverse_capacity -FROM edge_table -ORDER BY id; - - -CREATE OR REPLACE FUNCTION test(params TEXT[], subs TEXT[]) -RETURNS SETOF TEXT AS -$BODY$ -DECLARE -mp TEXT[]; -q1 TEXT; -q TEXT; -separator TEXT; -BEGIN - FOR i IN 0..array_length(params, 1) LOOP - separator = ' '; - mp := params; - IF i != 0 THEN - mp[i] = subs[i]; - END IF; - - q1 := 'SELECT * FROM pgr_maxFlow ('; - - FOR i IN 1..array_length(mp, 1) LOOP - q1 := q1 || separator || mp[i]; - separator := ','; - END LOOP; - - q1 := q1 || ')'; - - RETURN query SELECT * FROM lives_ok(q1); - IF i = 0 THEN - RETURN query SELECT * FROM isnt_empty(q1); - ELSE - RETURN query SELECT * FROM set_eq(q1, 'SELECT NULL::BIGINT'); - END IF; - END LOOP; - -END -$BODY$ -LANGUAGE plpgsql VOLATILE; - -CREATE OR REPLACE FUNCTION test_function() -RETURNS SETOF TEXT AS -$BODY$ -DECLARE -params TEXT[]; -subs TEXT[]; -BEGIN - - -- A source should not be a sink - PREPARE combinations AS - SELECT source, target FROM combinations_table WHERE target > 2; - - PREPARE null_ret AS - SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); - - PREPARE null_ret_arr AS - SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); - - PREPARE null_combinations AS - SELECT source, target FROM combinations_table WHERE source IN (-1); - - RETURN QUERY - SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); - RETURN QUERY - SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); - - RETURN QUERY - SELECT set_eq('null_ret_arr', 'SELECT NULL::BIGINT[]', 'Should be empty to tests be meaningful'); - - -- one to one - params = ARRAY['$$edges$$', - '1::BIGINT', - '2::BIGINT' - ]::TEXT[]; - subs = ARRAY[ - 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' - ]::TEXT[]; - - RETURN query SELECT * FROM test(params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::BIGINT', - 'NULL::BIGINT' - ]::TEXT[]; - RETURN query SELECT * FROM test(params, subs); - -- one to many - - params = ARRAY['$$edges$$', - '1::BIGINT', - 'ARRAY[2,5]::BIGINT[]' - ]::TEXT[]; - subs = ARRAY[ - 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' - ]::TEXT[]; - RETURN query SELECT * FROM test(params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::BIGINT', - 'NULL::BIGINT[]' - ]::TEXT[]; - RETURN query SELECT * FROM test(params, subs); - - -- many to one - params = ARRAY['$$edges$$', - 'ARRAY[2,5]::BIGINT[]', - '1' - ]::TEXT[]; - subs = ARRAY[ - 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' - ]::TEXT[]; - RETURN query SELECT * FROM test(params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::BIGINT[]', - 'NULL::BIGINT' - ]::TEXT[]; - RETURN query SELECT * FROM test(params, subs); - - -- many to many - params = ARRAY['$$edges$$', - 'ARRAY[1]::BIGINT[]', - 'ARRAY[2,5]::BIGINT[]' - ]::TEXT[]; - subs = ARRAY[ - 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' - ]::TEXT[]; - RETURN query SELECT * FROM test(params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::BIGINT[]', - 'NULL::BIGINT[]' - ]::TEXT[]; - RETURN query SELECT * FROM test(params, subs); - - -- Combinations SQL - IF NOT min_version('3.2.0') THEN - RETURN QUERY - SELECT skip(1, 'Combinations functionality is new on 3.2.0'); - RETURN; - END IF; - - RETURN QUERY - SELECT isnt_empty('combinations', 'Should be not empty to tests be meaningful'); - RETURN QUERY - SELECT is_empty('null_combinations', 'Should be empty to tests be meaningful'); - - params = ARRAY['$$edges$$', '$$combinations$$']::TEXT[]; - subs = ARRAY[ - 'NULL', - '$$(SELECT source, target FROM combinations_table WHERE source IN (-1))$$' - ]::TEXT[]; - - RETURN query SELECT * FROM test(params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::TEXT' - ]::TEXT[]; - RETURN query SELECT * FROM test(params, subs); - -END -$BODY$ -LANGUAGE plpgsql VOLATILE; - - -SELECT * FROM test_function(); +SELECT * FROM flow_no_crash('pgr_maxFlow'); SELECT finish(); ROLLBACK; diff --git a/pgtap/max_flow/maxFlow/types_check.pg b/pgtap/max_flow/maxFlow/types_check.pg index b3c83570468..b41c10b1cfe 100644 --- a/pgtap/max_flow/maxFlow/types_check.pg +++ b/pgtap/max_flow/maxFlow/types_check.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(14); SELECT has_function('pgr_maxflow'); diff --git a/pgtap/max_flow/maxFlowMinCost/edge_cases.pg b/pgtap/max_flow/maxFlowMinCost/edge_cases.pg index e8c875a266c..c63bee58478 100644 --- a/pgtap/max_flow/maxFlowMinCost/edge_cases.pg +++ b/pgtap/max_flow/maxFlowMinCost/edge_cases.pg @@ -19,27 +19,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(4); PREPARE t1 AS SELECT * FROM pgr_maxflowmincost( - 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edges', 2, 3 ); PREPARE t2 AS SELECT * FROM pgr_maxflowmincost( - 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edges', ARRAY[2], 3 ); PREPARE t3 AS SELECT * FROM pgr_maxflowmincost( - 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edges', 2, ARRAY[3] ); PREPARE t4 AS SELECT * FROM pgr_maxflowmincost( - 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edges', ARRAY[2], ARRAY[3] ); diff --git a/pgtap/max_flow/maxFlowMinCost/inner_query.pg b/pgtap/max_flow/maxFlowMinCost/inner_query.pg index 6c6b14c9c06..8b54855b653 100644 --- a/pgtap/max_flow/maxFlowMinCost/inner_query.pg +++ b/pgtap/max_flow/maxFlowMinCost/inner_query.pg @@ -19,25 +19,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(732) ELSE plan(577) END; -- ONE TO ONE -SELECT style_cost_flow('pgr_maxflowmincost(', ', 2, 3)'); +SELECT style_cost_flow('pgr_maxflowmincost(', ', 6, 10)'); -- ONE TO MANY -SELECT style_cost_flow('pgr_maxflowmincost(', ', 2, ARRAY[3])'); +SELECT style_cost_flow('pgr_maxflowmincost(', ', 6, ARRAY[10])'); -- MANY TO ONE -SELECT style_cost_flow('pgr_maxflowmincost(', ', ARRAY[2], 3)'); +SELECT style_cost_flow('pgr_maxflowmincost(', ', ARRAY[6], 10)'); -- MANY TO MANY -SELECT style_cost_flow('pgr_maxflowmincost(', ', ARRAY[2], ARRAY[3])'); +SELECT style_cost_flow('pgr_maxflowmincost(', ', ARRAY[6], ARRAY[10])'); CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN -- COMBINATIONS - RETURN QUERY SELECT style_cost_flow('pgr_maxflowmincost(', ', $$SELECT * FROM combinations_table WHERE target NOT IN (1,2)$$)'); - RETURN QUERY SELECT innerquery_combinations('pgr_maxflowmincost($$SELECT * FROM edge_table$$,',')'); + RETURN QUERY SELECT style_cost_flow('pgr_maxflowmincost(', ', $$SELECT * FROM combinations WHERE target NOT IN (5,6)$$)'); + RETURN QUERY SELECT innerquery_combinations('pgr_maxflowmincost($$SELECT * FROM edges$$,',')'); ELSE RETURN QUERY SELECT skip(1, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/max_flow/maxFlowMinCost/no_crash_test.pg b/pgtap/max_flow/maxFlowMinCost/no_crash_test.pg index eb7e543faab..c0b3b851f89 100644 --- a/pgtap/max_flow/maxFlowMinCost/no_crash_test.pg +++ b/pgtap/max_flow/maxFlowMinCost/no_crash_test.pg @@ -19,159 +19,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(81) END; -PREPARE edges AS -SELECT id, - source, - target, - capacity, - reverse_capacity, - cost, - reverse_cost -FROM edge_table -ORDER BY id; +SELECT * FROM flow_no_crash('pgr_maxFlowMinCost'); - -CREATE OR REPLACE FUNCTION no_crash() -RETURNS SETOF TEXT AS -$BODY$ -DECLARE -params TEXT[]; -subs TEXT[]; -BEGIN - IF NOT min_version('3.2.0') THEN - RETURN QUERY - SELECT skip(1, 'STATIC added on 3.2.0'); - RETURN; - END IF; - - PREPARE null_ret AS - SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); - - PREPARE null_ret_arr AS - SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); - - RETURN QUERY - SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); - RETURN QUERY - SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); - RETURN QUERY - SELECT set_eq('null_ret_arr', 'SELECT NULL::BIGINT[]', 'Should be empty to tests be meaningful'); - - -- one to one - params = ARRAY[ - '$$edges$$', - '1::BIGINT', - '2::BIGINT' - ]::TEXT[]; - - subs = ARRAY[ - 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' - ]::TEXT[]; - RETURN query SELECT * FROM no_crash_test('pgr_maxFlowMinCost',params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::BIGINT', - 'NULL::BIGINT' - ]::TEXT[]; - RETURN query SELECT * FROM no_crash_test('pgr_maxFlowMinCost',params, subs); - -- one to many - - params = ARRAY['$$edges$$', - '1::BIGINT', - 'ARRAY[2,5]::BIGINT[]' - ]::TEXT[]; - subs = ARRAY[ - 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' - ]::TEXT[]; - - RETURN query SELECT * FROM no_crash_test('pgr_maxFlowMinCost',params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::BIGINT', - 'NULL::BIGINT[]' - ]::TEXT[]; - RETURN query SELECT * FROM no_crash_test('pgr_maxFlowMinCost',params, subs); - - -- many to one - params = ARRAY['$$edges$$', - 'ARRAY[2,5]::BIGINT[]', - '1' - ]::TEXT[]; - subs = ARRAY[ - 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' - ]::TEXT[]; - - RETURN query SELECT * FROM no_crash_test('pgr_maxFlowMinCost',params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::BIGINT[]', - 'NULL::BIGINT' - ]::TEXT[]; - RETURN query SELECT * FROM no_crash_test('pgr_maxFlowMinCost',params, subs); - - -- many to many - params = ARRAY['$$edges$$', - 'ARRAY[1]::BIGINT[]', - 'ARRAY[2,5]::BIGINT[]' - ]::TEXT[]; - subs = ARRAY[ - 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' - ]::TEXT[]; - - RETURN query SELECT * FROM no_crash_test('pgr_maxFlowMinCost',params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::BIGINT[]', - 'NULL::BIGINT[]' - ]::TEXT[]; - RETURN query SELECT * FROM no_crash_test('pgr_maxFlowMinCost',params, subs); - - -- Combinations SQL - PREPARE combinations AS - SELECT source, target FROM combinations_table WHERE target > 2; - - PREPARE null_combinations AS - SELECT source, target FROM combinations_table WHERE source IN (-1); - - RETURN QUERY - SELECT isnt_empty('combinations', 'Should be not empty to tests be meaningful'); - RETURN QUERY - SELECT is_empty('null_combinations', 'Should be empty to tests be meaningful'); - - params = ARRAY['$$edges$$', '$$combinations$$']::TEXT[]; - subs = ARRAY[ - 'NULL', - '$$(SELECT source, target FROM combinations_table WHERE source IN (-1))$$' - ]::TEXT[]; - - RETURN query SELECT * FROM no_crash_test('pgr_maxFlowMinCost', params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::TEXT' - ]::TEXT[]; - RETURN query SELECT * FROM no_crash_test('pgr_maxFlowMinCost', params, subs); -END -$BODY$ -LANGUAGE plpgsql VOLATILE; - - -SELECT no_crash(); SELECT finish(); - ROLLBACK; diff --git a/pgtap/max_flow/maxFlowMinCost_Cost/edge_cases.pg b/pgtap/max_flow/maxFlowMinCost_Cost/edge_cases.pg index b01426566c9..bfcc327c76c 100644 --- a/pgtap/max_flow/maxFlowMinCost_Cost/edge_cases.pg +++ b/pgtap/max_flow/maxFlowMinCost_Cost/edge_cases.pg @@ -19,27 +19,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(4); PREPARE t1 AS SELECT * FROM pgr_maxflowmincost_cost( - 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edges', 2, 3 ); PREPARE t2 AS SELECT * FROM pgr_maxflowmincost_cost( - 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edges', ARRAY[2], 3 ); PREPARE t3 AS SELECT * FROM pgr_maxflowmincost_cost( - 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edges', 2, ARRAY[3] ); PREPARE t4 AS SELECT * FROM pgr_maxflowmincost_cost( - 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity, cost, reverse_cost FROM edges', ARRAY[2], ARRAY[3] ); diff --git a/pgtap/max_flow/maxFlowMinCost_Cost/inner_query.pg b/pgtap/max_flow/maxFlowMinCost_Cost/inner_query.pg index 1635a917985..5fac4ac4208 100644 --- a/pgtap/max_flow/maxFlowMinCost_Cost/inner_query.pg +++ b/pgtap/max_flow/maxFlowMinCost_Cost/inner_query.pg @@ -19,25 +19,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(732) ELSE plan(577) END; -- ONE TO ONE -SELECT style_cost_flow('pgr_maxflowmincost_cost(', ', 2, 3)'); +SELECT style_cost_flow('pgr_maxflowmincost_cost(', ', 6, 10)'); -- ONE TO MANY -SELECT style_cost_flow('pgr_maxflowmincost_cost(', ', 2, ARRAY[3])'); +SELECT style_cost_flow('pgr_maxflowmincost_cost(', ', 6, ARRAY[10])'); -- MANY TO ONE -SELECT style_cost_flow('pgr_maxflowmincost_cost(', ', ARRAY[2], 3)'); +SELECT style_cost_flow('pgr_maxflowmincost_cost(', ', ARRAY[6], 10)'); -- MANY TO MANY -SELECT style_cost_flow('pgr_maxflowmincost_cost(', ', ARRAY[2], ARRAY[3])'); +SELECT style_cost_flow('pgr_maxflowmincost_cost(', ', ARRAY[6], ARRAY[10])'); CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN -- COMBINATIONS - RETURN QUERY SELECT style_cost_flow('pgr_maxflowmincost_cost(', ', $$SELECT * FROM combinations_table WHERE target NOT IN (1,2)$$)'); - RETURN QUERY SELECT innerquery_combinations('pgr_maxflowmincost_cost($$SELECT * FROM edge_table$$,',')'); + RETURN QUERY SELECT style_cost_flow('pgr_maxflowmincost_cost(', ', $$SELECT * FROM combinations WHERE target NOT IN (5,6)$$)'); + RETURN QUERY SELECT innerquery_combinations('pgr_maxflowmincost_cost($$SELECT * FROM edges$$,',')'); ELSE RETURN QUERY SELECT skip(1, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/max_flow/maxFlowMinCost_Cost/no_crash_test.pg b/pgtap/max_flow/maxFlowMinCost_Cost/no_crash_test.pg index 9921868ab67..b4727c4ebfc 100644 --- a/pgtap/max_flow/maxFlowMinCost_Cost/no_crash_test.pg +++ b/pgtap/max_flow/maxFlowMinCost_Cost/no_crash_test.pg @@ -19,197 +19,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(81) END; -PREPARE edges AS -SELECT id, - source, - target, - capacity, - reverse_capacity, - cost, - reverse_cost -FROM edge_table -ORDER BY id; +SELECT * FROM flow_no_crash('pgr_maxFlowMinCost_Cost'); -CREATE OR REPLACE FUNCTION test(params TEXT[], subs TEXT[]) -RETURNS SETOF TEXT AS -$BODY$ -DECLARE -mp TEXT[]; -q1 TEXT; -q TEXT; -separator TEXT; -BEGIN - FOR i IN 0..array_length(params, 1) LOOP - separator = ' '; - mp := params; - IF i != 0 THEN - mp[i] = subs[i]; - END IF; - - q1 := 'SELECT * FROM pgr_maxFlowMinCost_Cost ('; - - FOR i IN 1..array_length(mp, 1) LOOP - q1 := q1 || separator || mp[i]; - separator := ','; - END LOOP; - - q1 := q1 || ')'; - - RETURN query SELECT * FROM lives_ok(q1); - IF i = 0 THEN - RETURN query SELECT * FROM isnt_empty(q1); - ELSE - RETURN query SELECT * FROM set_eq(q1, 'SELECT NULL::FLOAT'); - END IF; - END LOOP; - -END -$BODY$ -LANGUAGE plpgsql VOLATILE; - -CREATE OR REPLACE FUNCTION test_function() -RETURNS SETOF TEXT AS -$BODY$ -DECLARE -params TEXT[]; -subs TEXT[]; -BEGIN - IF NOT min_version('3.2.0') THEN - RETURN QUERY - SELECT skip(1, 'STATIC fixed on 3.2.0'); - RETURN; - END IF; - - PREPARE null_ret AS - SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); - - PREPARE null_ret_arr AS - SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); - - - RETURN QUERY - SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); - RETURN QUERY - SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); - RETURN QUERY - SELECT set_eq('null_ret_arr', 'SELECT NULL::BIGINT[]', 'Should be empty to tests be meaningful'); - - -- one to one - params = ARRAY['$$edges$$', - '1::BIGINT', - '2::BIGINT' - ]::TEXT[]; - subs = ARRAY[ - 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' - ]::TEXT[]; - - RETURN query SELECT * FROM test(params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::BIGINT', - 'NULL::BIGINT' - ]::TEXT[]; - RETURN query SELECT * FROM test(params, subs); - -- one to many - - params = ARRAY['$$edges$$', - '1::BIGINT', - 'ARRAY[2,5]::BIGINT[]' - ]::TEXT[]; - subs = ARRAY[ - 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' - ]::TEXT[]; - - RETURN query SELECT * FROM test(params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::BIGINT', - 'NULL::BIGINT[]' - ]::TEXT[]; - RETURN query SELECT * FROM test(params, subs); - - -- many to one - params = ARRAY['$$edges$$', - 'ARRAY[2,5]::BIGINT[]', - '1' - ]::TEXT[]; - subs = ARRAY[ - 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' - ]::TEXT[]; - - RETURN query SELECT * FROM test(params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::BIGINT[]', - 'NULL::BIGINT' - ]::TEXT[]; - RETURN query SELECT * FROM test(params, subs); - - -- many to many - params = ARRAY['$$edges$$', - 'ARRAY[1]::BIGINT[]', - 'ARRAY[2,5]::BIGINT[]' - ]::TEXT[]; - subs = ARRAY[ - 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' - ]::TEXT[]; - - RETURN query SELECT * FROM test(params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::BIGINT[]', - 'NULL::BIGINT[]' - ]::TEXT[]; - RETURN query SELECT * FROM test(params, subs); - - -- Combinations SQL - PREPARE combinations AS - SELECT source, target FROM combinations_table WHERE target > 2; - - PREPARE null_combinations AS - SELECT source, target FROM combinations_table WHERE source IN (-1); - - RETURN QUERY - SELECT isnt_empty('combinations', 'Should be not empty to tests be meaningful'); - - RETURN QUERY - SELECT is_empty('null_combinations', 'Should be empty to tests be meaningful'); - - params = ARRAY['$$edges$$', '$$combinations$$']::TEXT[]; - subs = ARRAY[ - 'NULL', - '$$(SELECT source, target FROM combinations_table WHERE source IN (-1))$$' - ]::TEXT[]; - - RETURN query SELECT * FROM test(params, subs); - - subs = ARRAY[ - 'NULL', - 'NULL::TEXT' - ]::TEXT[]; - RETURN query SELECT * FROM test(params, subs); - -END -$BODY$ -LANGUAGE plpgsql VOLATILE; - - -SELECT test_function(); SELECT finish(); - ROLLBACK; diff --git a/pgtap/max_flow/pushRelabel/edge_cases.pg b/pgtap/max_flow/pushRelabel/edge_cases.pg index 98c21ed8051..0f173c39123 100644 --- a/pgtap/max_flow/pushRelabel/edge_cases.pg +++ b/pgtap/max_flow/pushRelabel/edge_cases.pg @@ -23,22 +23,22 @@ SELECT plan(4); PREPARE t1 AS SELECT * FROM pgr_pushrelabel( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', 3, 5 ); PREPARE t2 AS SELECT * FROM pgr_pushrelabel( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', 3, ARRAY[5] ); PREPARE t3 AS SELECT * FROM pgr_pushrelabel( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', ARRAY[3], 5 ); PREPARE t4 AS SELECT * FROM pgr_pushrelabel( - 'SELECT id, source, target, capacity, reverse_capacity FROM edge_table', + 'SELECT id, source, target, capacity, reverse_capacity FROM edges', ARRAY[3], ARRAY[5] ); diff --git a/pgtap/max_flow/pushRelabel/inner_query.pg b/pgtap/max_flow/pushRelabel/inner_query.pg index 38ad3b1c56c..3eaef991868 100644 --- a/pgtap/max_flow/pushRelabel/inner_query.pg +++ b/pgtap/max_flow/pushRelabel/inner_query.pg @@ -19,25 +19,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(282) ELSE plan(218) END; -- ONE TO ONE -SELECT style_max_flow('pgr_pushrelabel(', ', 2, 3)'); +SELECT style_max_flow('pgr_pushrelabel(', ', 6, 10)'); -- ONE TO MANY -SELECT style_max_flow('pgr_pushrelabel(', ', 2, ARRAY[3])'); +SELECT style_max_flow('pgr_pushrelabel(', ', 6, ARRAY[10])'); -- MANY TO ONE -SELECT style_max_flow('pgr_pushrelabel(', ', ARRAY[2], 3)'); +SELECT style_max_flow('pgr_pushrelabel(', ', ARRAY[6], 10)'); -- MANY TO MANY -SELECT style_max_flow('pgr_pushrelabel(', ', ARRAY[2], ARRAY[3])'); +SELECT style_max_flow('pgr_pushrelabel(', ', ARRAY[6], ARRAY[10])'); -- COMBINATIONS CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_max_flow('pgr_pushrelabel(', ', $$SELECT * FROM combinations_table WHERE target NOT IN (1,2)$$)'); - RETURN QUERY SELECT innerquery_combinations('pgr_pushrelabel($$SELECT * FROM edge_table$$,',')'); + RETURN QUERY SELECT style_max_flow('pgr_pushrelabel(', ', $$SELECT * FROM combinations WHERE target NOT IN (5,6)$$)'); + RETURN QUERY SELECT innerquery_combinations('pgr_pushrelabel($$SELECT * FROM edges$$,',')'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/max_flow/pushRelabel/no_crash_test.pg b/pgtap/max_flow/pushRelabel/no_crash_test.pg index aca7451b698..4c6b894b2ed 100644 --- a/pgtap/max_flow/pushRelabel/no_crash_test.pg +++ b/pgtap/max_flow/pushRelabel/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(68) ELSE plan(81) END; SELECT * FROM flow_no_crash('pgr_pushRelabel'); diff --git a/pgtap/mincut/stoerWagner/compare_components.pg b/pgtap/mincut/stoerWagner/compare_components.pg index 80bb734c6ce..e62a0e058e1 100644 --- a/pgtap/mincut/stoerWagner/compare_components.pg +++ b/pgtap/mincut/stoerWagner/compare_components.pg @@ -19,44 +19,44 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(6); PREPARE stoerWagner1 AS SELECT * FROM pgr_stoerWagner( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id' + FROM edges ORDER BY id' ); PREPARE stoerWagner2 AS SELECT * FROM pgr_stoerWagner( - 'SELECT id, source, target, cost - FROM edge_table WHERE id > 18 ORDER BY id' + 'SELECT id, source, target, cost + FROM edges WHERE id > 18 ORDER BY id' ); PREPARE stoerWagner3 AS SELECT * FROM pgr_stoerWagner( - 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id' + 'SELECT id, source, target, cost, reverse_cost + FROM edges ORDER BY id' ) WHERE cost < 0; PREPARE stoerWagner4 AS SELECT * FROM pgr_stoerWagner( -$$ - SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE source = ANY (ARRAY(SELECT node FROM pgr_connectedComponents( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ') - WHERE component = 2) - ) - OR - target = ANY (ARRAY(SELECT node FROM pgr_connectedComponents( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ') - WHERE component = 2) - ) -$$ - ); + $$ + SELECT id, source, target, cost, reverse_cost FROM edges + WHERE source = ANY (ARRAY(SELECT node FROM pgr_connectedComponents( + 'SELECT id, source, target, cost, reverse_cost FROM edges ') + WHERE component = 6) + ) + OR + target = ANY (ARRAY(SELECT node FROM pgr_connectedComponents( + 'SELECT id, source, target, cost, reverse_cost FROM edges ') + WHERE component = 6) + ) + $$ +); SELECT is_empty('stoerWagner1', '1: Disconnected graph'); SELECT is_empty('stoerWagner2', '2: No edge'); @@ -66,31 +66,31 @@ SELECT is_empty('stoerWagner4', '4: Wrong component'); PREPARE stoerWagner5 AS SELECT * FROM pgr_stoerWagner( - 'SELECT id, source, target, cost, reverse_cost - FROM edge_table where id = 17 ORDER BY id' + 'SELECT id, source, target, cost, reverse_cost + FROM edges where id = 17 ORDER BY id' ); PREPARE stoerWagner6 AS SELECT * FROM pgr_stoerWagner( -$$ - SELECT id, source, target, cost, reverse_cost FROM edge_table - WHERE source = ANY (ARRAY(SELECT node FROM pgr_connectedComponents( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ') - WHERE component = 14) - ) - OR - target = ANY (ARRAY(SELECT node FROM pgr_connectedComponents( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ') - WHERE component = 14) - ) -$$ - ); + $$ + SELECT id, source, target, cost, reverse_cost FROM edges + WHERE source = ANY (ARRAY(SELECT node FROM pgr_connectedComponents( + 'SELECT id, source, target, cost, reverse_cost FROM edges ') + WHERE component = 2) + ) + OR + target = ANY (ARRAY(SELECT node FROM pgr_connectedComponents( + 'SELECT id, source, target, cost, reverse_cost FROM edges ') + WHERE component = 2) + ) + $$ +); PREPARE stoerWagner7 AS SELECT * FROM pgr_stoerWagner( - 'SELECT id, source, target, cost, reverse_cost - FROM edge_table WHERE id < 17 ORDER BY id' + 'SELECT id, source, target, cost, reverse_cost + FROM edges WHERE id < 17 ORDER BY id' ); SELECT set_eq('stoerWagner5', 'stoerWagner6', '5: Mincut of edge 17'); diff --git a/pgtap/mincut/stoerWagner/edge_cases.pg b/pgtap/mincut/stoerWagner/edge_cases.pg index e68d2cc4029..577731e7679 100644 --- a/pgtap/mincut/stoerWagner/edge_cases.pg +++ b/pgtap/mincut/stoerWagner/edge_cases.pg @@ -19,18 +19,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(2); SELECT lives_ok( 'SELECT * FROM pgr_stoerWagner( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'' + ''SELECT id, source, target, cost, reverse_cost FROM edges'' )', '4: Documentation says works with no flags'); SELECT throws_ok( 'SELECT * FROM pgr_stoerWagner( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table id < 17'', + ''SELECT id, source, target, cost, reverse_cost FROM edges id < 17'', 3 )','42883','function pgr_stoerwagner(unknown, integer) does not exist', '6: Documentation says it does not work with 1 flags'); diff --git a/pgtap/mincut/stoerWagner/inner_query.pg b/pgtap/mincut/stoerWagner/inner_query.pg index b545a4b4c09..a36976fc06e 100644 --- a/pgtap/mincut/stoerWagner/inner_query.pg +++ b/pgtap/mincut/stoerWagner/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_stoerwagner(', ')'); diff --git a/pgtap/mincut/stoerWagner/types_check.pg b/pgtap/mincut/stoerWagner/types_check.pg index 7820fc45765..5be2ceec020 100644 --- a/pgtap/mincut/stoerWagner/types_check.pg +++ b/pgtap/mincut/stoerWagner/types_check.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); SELECT has_function('pgr_stoerwagner'); diff --git a/pgtap/ordering/cuthillMckeeOrdering/edge_cases.pg b/pgtap/ordering/cuthillMckeeOrdering/edge_cases.pg index 82bbb0ad987..ebdac8ed69f 100644 --- a/pgtap/ordering/cuthillMckeeOrdering/edge_cases.pg +++ b/pgtap/ordering/cuthillMckeeOrdering/edge_cases.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.4.0') THEN plan(1) ELSE plan(11) END; @@ -38,7 +38,7 @@ END IF; PREPARE q1 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id > 18; RETURN QUERY @@ -53,37 +53,37 @@ SELECT is_empty('r2', 'Graph with 0 edge and 0 vertex -> Empty row is returned') -- 1 vertex test PREPARE q3 AS -SELECT id, source, 2 AS target, cost, reverse_cost -FROM edge_table +SELECT id, source, 6 AS target, cost, reverse_cost +FROM edges WHERE id = 2; RETURN QUERY -SELECT set_eq('q3', $$VALUES (2, 2, 2, -1, 1)$$, 'q3: Graph with only vertex 2'); +SELECT set_eq('q3', $$VALUES (2, 6, 6, -1, 1)$$, 'q3: Graph with one vertex'); PREPARE r4 AS SELECT * FROM pgr_cuthillMckeeOrdering('q3'); RETURN QUERY -SELECT set_eq('r4', $$VALUES (1, 2)$$, '4: Same node returned'); +SELECT set_eq('r4', $$VALUES (1, 6)$$, '4: Same node returned'); -- 2 vertices test (connected) PREPARE q5 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id = 7; RETURN QUERY -SELECT set_eq('q5', $$VALUES (7, 8, 5, 1, 1)$$, 'q5: Graph with two connected vertices 8 and 5'); +SELECT set_eq('q5', $$VALUES (7, 3, 7, 1, 1)$$, 'q5: 3->7'); PREPARE r6 AS SELECT * FROM pgr_cuthillMckeeOrdering('q5'); RETURN QUERY -SELECT set_eq('r6', $$VALUES (1,8), (2,5)$$, 'Does not matter if 8 comes first or 5'); +SELECT set_eq('r6', $$VALUES (1,3), (2,7)$$, 'Does not matter if 8 comes first or 5'); -- 2 vertices test (isolated) @@ -117,18 +117,18 @@ SELECT set_eq('r8', $$VALUES (1, 1), (2, 2)$$, 'Showing both vertex of disconnec PREPARE q9 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id <= 2; RETURN QUERY -SELECT set_eq('q9', $$VALUES (1, 1, 2, 1, 1), (2, 2, 3, -1, 1)$$, 'q9: Graph with three vertices 1, 2 and 3'); +SELECT set_eq('q9', $$VALUES (2, 6, 10, -1, 1), (1, 5, 6, 1, 1)$$, 'q9: Graph with three vertices 1, 2 and 3'); PREPARE r10 AS SELECT * FROM pgr_cuthillMckeeOrdering('q9'); RETURN QUERY -SELECT set_eq('r10', $$VALUES (1, 1), (2, 2), (3, 3)$$, 'Basic test'); +SELECT set_eq('r10', $$VALUES (1, 5), (2, 6), (3, 10)$$, 'Basic test'); -- pgRouting sample data @@ -138,27 +138,27 @@ CREATE TABLE expected_result ( node BIGINT); INSERT INTO expected_result (seq, node) VALUES -(1, 16), -(2, 17), -(3, 14), -(4, 15), +(1, 13), +(2, 14), +(3, 2), +(4, 4), (5, 1), -(6, 7), -(7, 2), +(6, 9), +(7, 3), (8, 8), -(9, 3), -(10, 5), -(11, 13), -(12, 4), -(13, 6), -(14, 10), -(15, 9), -(16, 11), -(17, 12); +(9, 5), +(10, 7), +(11, 12), +(12, 6), +(13, 11), +(14, 17), +(15, 10), +(16, 16), +(17, 15); PREPARE q11 AS SELECT * FROM pgr_cuthillMckeeOrdering( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table'); + 'SELECT id, source, target, cost, reverse_cost FROM edges'); PREPARE r11 AS SELECT * FROM expected_result; diff --git a/pgtap/ordering/cuthillMckeeOrdering/inner_query.pg b/pgtap/ordering/cuthillMckeeOrdering/inner_query.pg index eb713c3d8b5..f94b5abbf69 100644 --- a/pgtap/ordering/cuthillMckeeOrdering/inner_query.pg +++ b/pgtap/ordering/cuthillMckeeOrdering/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.4.0') THEN plan(1) ELSE plan(54) END; CREATE OR REPLACE FUNCTION inner_query() diff --git a/pgtap/ordering/cuthillMckeeOrdering/no_crash_test.pg b/pgtap/ordering/cuthillMckeeOrdering/no_crash_test.pg index edd1d59a309..9f9ef52ea80 100644 --- a/pgtap/ordering/cuthillMckeeOrdering/no_crash_test.pg +++ b/pgtap/ordering/cuthillMckeeOrdering/no_crash_test.pg @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN NOT min_version('3.4.0') THEN plan(1) ELSE plan(7) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); @@ -55,7 +55,7 @@ BEGIN -- pgr_cuthillMckeeOrdering params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$' + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$' ]::TEXT[]; subs = ARRAY[ 'NULL' diff --git a/pgtap/pickDeliver/edge_cases/pickDeliver_vs_pickDeliverEuclidean.pg b/pgtap/pickDeliver/edge_cases/pickDeliver_vs_pickDeliverEuclidean.pg index a0138cecab5..351481a0476 100644 --- a/pgtap/pickDeliver/edge_cases/pickDeliver_vs_pickDeliverEuclidean.pg +++ b/pgtap/pickDeliver/edge_cases/pickDeliver_vs_pickDeliverEuclidean.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(1); SET client_min_messages TO ERROR; diff --git a/pgtap/pickDeliver/pickDeliver/edge_cases/issue_1725.pg b/pgtap/pickDeliver/pickDeliver/edge_cases/issue_1725.pg index ca2384896ee..732121a375d 100644 --- a/pgtap/pickDeliver/pickDeliver/edge_cases/issue_1725.pg +++ b/pgtap/pickDeliver/pickDeliver/edge_cases/issue_1725.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(1); CREATE OR REPLACE FUNCTION issue() @@ -37,7 +37,7 @@ SELECT * FROM pgr_pickDeliver( $$ SELECT * FROM orders ORDER BY id $$, $$ SELECT * FROM vehicles $$, $$ SELECT * from pgr_dijkstraCostMatrix( - ' SELECT * FROM edge_table ', ARRAY[3, 4, 5, 8, 9, 11]) + ' SELECT * FROM edges ', ARRAY[3, 4, 5, 8, 9, 11]) $$ ); diff --git a/pgtap/pickDeliver/pickDeliver/edge_cases/many_calls.pg b/pgtap/pickDeliver/pickDeliver/edge_cases/many_calls.pg index ac6f18f25cb..0786c4f2399 100644 --- a/pgtap/pickDeliver/pickDeliver/edge_cases/many_calls.pg +++ b/pgtap/pickDeliver/pickDeliver/edge_cases/many_calls.pg @@ -27,7 +27,7 @@ SELECT * FROM pgr_pickDeliver( $$ SELECT * FROM orders ORDER BY id $$, $$ SELECT * FROM vehicles ORDER BY id$$, $$ SELECT * from pgr_dijkstraCostMatrix( - 'SELECT * FROM edge_table ', + 'SELECT * FROM edges ', (SELECT array_agg(id) FROM (SELECT p_node_id AS id FROM orders UNION SELECT d_node_id FROM orders diff --git a/pgtap/pickDeliver/pickDeliver/inner_query.pg b/pgtap/pickDeliver/pickDeliver/inner_query.pg index 3f917960ea6..3d7de31ef0e 100644 --- a/pgtap/pickDeliver/pickDeliver/inner_query.pg +++ b/pgtap/pickDeliver/pickDeliver/inner_query.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(145); CREATE TABLE matrix AS -SELECT * from pgr_dijkstraCostMatrix($$SELECT * FROM edge_table$$, +SELECT * from pgr_dijkstraCostMatrix($$SELECT * FROM edges$$, (SELECT array_agg(id) FROM (SELECT p_node_id AS id FROM orders UNION SELECT d_node_id FROM orders diff --git a/pgtap/pickDeliver/pickDeliverEuclidean/edge_cases/order_id_is_neg1.pg b/pgtap/pickDeliver/pickDeliverEuclidean/edge_cases/order_id_is_neg1.pg index 6d68881e441..2d32e7db131 100644 --- a/pgtap/pickDeliver/pickDeliverEuclidean/edge_cases/order_id_is_neg1.pg +++ b/pgtap/pickDeliver/pickDeliverEuclidean/edge_cases/order_id_is_neg1.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(2); SELECT * INTO results diff --git a/pgtap/pickDeliver/pickDeliverEuclidean/edge_cases/wrong_data.pg b/pgtap/pickDeliver/pickDeliverEuclidean/edge_cases/wrong_data.pg index 0272f7d32c4..ff988cac042 100644 --- a/pgtap/pickDeliver/pickDeliverEuclidean/edge_cases/wrong_data.pg +++ b/pgtap/pickDeliver/pickDeliverEuclidean/edge_cases/wrong_data.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(23); ALTER TABLE vehicles ADD start_service FLOAT DEFAULT 0.0, diff --git a/pgtap/pickDeliver/pickDeliverEuclidean/inner_query.pg b/pgtap/pickDeliver/pickDeliverEuclidean/inner_query.pg index cdc9d49bb40..842f8fc7089 100644 --- a/pgtap/pickDeliver/pickDeliverEuclidean/inner_query.pg +++ b/pgtap/pickDeliver/pickDeliverEuclidean/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(139); ALTER TABLE vehicles ADD start_service FLOAT DEFAULT 0.0, diff --git a/pgtap/planar/isPlanar/edge_cases.pg b/pgtap/planar/isPlanar/edge_cases.pg index 98a882b317a..5c768663b13 100644 --- a/pgtap/planar/isPlanar/edge_cases.pg +++ b/pgtap/planar/isPlanar/edge_cases.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (16) ELSE plan(1) END; CREATE OR REPLACE FUNCTION edge_cases() @@ -37,7 +37,7 @@ END IF; PREPARE q1 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id > 18; -- Graph is empty - it has 0 edge and 0 vertex @@ -58,7 +58,7 @@ SELECT set_eq('zeroEdgeTest2',$$VALUES('f'::bool) $$, '2: False, since vertex do PREPARE q3 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table WHERE source = 50; +FROM edges WHERE source = 50; RETURN QUERY SELECT is_empty('q3','3: Vertex 50 does not exist in sample data'); @@ -73,36 +73,36 @@ SELECT set_eq('vertexNotPresent4',$$VALUES('f'::bool) $$, '4:False, Vertex not p -- 1 vertex test PREPARE q5 AS -SELECT id, source, 6 AS target, cost, reverse_cost -FROM edge_table +SELECT id, source, source AS target, cost, reverse_cost +FROM edges WHERE id = 9; -- Graph with only vertex 9 RETURN QUERY -SELECT set_eq('q5', $$VALUES (9, 6, 6, 1, 1)$$, 'q5: Graph with only vertex 6'); +SELECT set_eq('q5', $$VALUES (9, 11, 11, 1, 1)$$, 'q5: source<->source'); PREPARE oneVertexTest6 AS SELECT * FROM pgr_isPlanar('q5'); RETURN QUERY -SELECT set_eq('oneVertexTest6',$$VALUES('t'::bool) $$, '6:Planar Graph with only vertex 6'); +SELECT set_eq('oneVertexTest6',$$VALUES('t'::bool) $$, 'true: source->source'); PREPARE q7 AS -SELECT id, source, 3 AS target, cost, reverse_cost -FROM edge_table +SELECT id, source, source AS target, cost, reverse_cost +FROM edges WHERE id = 3; -- Graph with only vertex 3 RETURN QUERY -SELECT set_eq('q7', $$VALUES (3, 3, 3, -1, 1)$$, 'q7: Graph with only vertex 3'); +SELECT set_eq('q7', $$VALUES (3, 10, 10, -1, 1)$$, 'q7: source<-source'); PREPARE oneVertexTest8 AS SELECT * FROM pgr_isPlanar('q7'); RETURN QUERY -SELECT set_eq('oneVertexTest8',$$VALUES('t'::bool) $$, '8:Planar Graph with only vertex 3'); +SELECT set_eq('oneVertexTest8',$$VALUES('t'::bool) $$, 'true: source<-source'); @@ -111,29 +111,29 @@ SELECT set_eq('oneVertexTest8',$$VALUES('t'::bool) $$, '8:Planar Graph with only PREPARE q9 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id = 1; RETURN QUERY -SELECT set_eq('q9', $$VALUES (1, 1, 2, 1, 1)$$, 'q9: Graph with two vertices 1 and 2'); +SELECT set_eq('q9', $$VALUES (1, 5, 6, 1, 1)$$, 'q9: u<->v'); PREPARE twoVerticesTest10 AS SELECT * FROM pgr_isPlanar('q9'); RETURN QUERY -SELECT set_eq('twoVerticesTest10', $$VALUES('t'::bool) $$, '10:Planar Graph with two vertices 1 and 2'); +SELECT set_eq('twoVerticesTest10', $$VALUES('t'::bool) $$, 'true: u<->v'); -- 3 vertices test PREPARE q11 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id IN (1,2); RETURN QUERY -SELECT set_eq('q11', $$VALUES (1, 1, 2, 1, 1), (2, 2, 3, -1, 1)$$, 'q11: Graph with three vertices 1, 2 and 3'); +SELECT set_eq('q11', $$VALUES (1, 5, 6, 1, 1), (2, 6, 10, -1, 1)$$, 'q11: u<->v<-w'); PREPARE threeVerticesTest12 AS SELECT * @@ -142,22 +142,22 @@ FROM pgr_isPlanar( ); RETURN QUERY -SELECT set_eq('threeVerticesTest12', $$VALUES('t'::bool) $$, '12: Planar graph with 3 vertices'); +SELECT set_eq('threeVerticesTest12', $$VALUES('t'::bool) $$, 'true: u<->v<-w'); -- 4 vertices test PREPARE q13 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id IN (1,2,3); RETURN QUERY SELECT set_eq('q13', - $$VALUES (1, 1, 2, 1, 1), - (2, 2, 3, -1, 1), - (3, 3, 4, -1, 1) + $$VALUES (1, 5, 6, 1, 1), + (2, 6, 10, -1, 1), + (3, 10, 15, -1, 1) $$, - 'q13: Graph with three vertices 1, 2 and 3'); + 'q13: u<->v<-w<-z'); PREPARE fourVerticesTest14 AS SELECT * @@ -166,24 +166,24 @@ FROM pgr_isPlanar( ); RETURN QUERY -SELECT set_eq('fourVerticesTest14', $$VALUES('t'::bool) $$, '14: Planar graph with 4 vertices'); +SELECT set_eq('fourVerticesTest14', $$VALUES('t'::bool) $$, 'true: u<->v<-w<-z'); -- 4 vertices test (cyclic) PREPARE q15 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id IN (8, 10, 11, 12); RETURN QUERY SELECT set_eq('q15', $$VALUES - (8, 5, 6, 1, 1), - (10, 5, 10, 1, 1), - (11, 6, 11, 1, -1), - (12, 10, 11, 1, -1) + (8, 7, 11, 1, 1), + (10, 7, 8, 1, 1), + (11, 11, 12, 1, -1), + (12, 8, 12, 1, -1) $$, - 'q15: Graph with four vertices 5, 6, 10 and 11 (cyclic)' + 'q15: 8<->7<->11->12->8' ); PREPARE fourVerticesCyclicTest16 AS @@ -193,7 +193,7 @@ FROM pgr_isPlanar( ); RETURN QUERY -SELECT set_eq('fourVerticesCyclicTest16', $$VALUES('t'::bool) $$, '16: Planar cyclic graph with 4 vertices'); +SELECT set_eq('fourVerticesCyclicTest16', $$VALUES('t'::bool) $$, 'true: cyclic 8<->7<->11->12->8'); END; $BODY$ diff --git a/pgtap/planar/isPlanar/inner_query.pg b/pgtap/planar/isPlanar/inner_query.pg index be746dbd5c7..c4f0bd9554a 100644 --- a/pgtap/planar/isPlanar/inner_query.pg +++ b/pgtap/planar/isPlanar/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (54) ELSE plan(1) END; CREATE OR REPLACE FUNCTION inner_query() diff --git a/pgtap/planar/isPlanar/no_crash_test.pg b/pgtap/planar/isPlanar/no_crash_test.pg index d8484e9d9b9..d60050befdb 100644 --- a/pgtap/planar/isPlanar/no_crash_test.pg +++ b/pgtap/planar/isPlanar/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (5) ELSE plan(1) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; CREATE OR REPLACE FUNCTION test_function() RETURNS SETOF TEXT AS @@ -41,7 +41,7 @@ BEGIN RETURN QUERY SELECT isnt_empty('edges', 'Should not be empty true to tests be meaningful'); - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$']::TEXT[]; + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$']::TEXT[]; subs = ARRAY[ 'NULL' ]::TEXT[]; diff --git a/pgtap/spanningTree/edge_cases/compare_primBFS_kruskalBFS.pg b/pgtap/spanningTree/edge_cases/compare_primBFS_kruskalBFS.pg index 0ceb65f2701..67b41af468a 100644 --- a/pgtap/spanningTree/edge_cases/compare_primBFS_kruskalBFS.pg +++ b/pgtap/spanningTree/edge_cases/compare_primBFS_kruskalBFS.pg @@ -25,7 +25,7 @@ BEGIN; SELECT plan(28); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION ComparePrimBFSKruskalBFS() RETURNS SETOF TEXT AS @@ -38,8 +38,8 @@ kruskal_sql TEXT; vids TEXT; data TEXT; BEGIN - inner1_sql := 'SELECT id, source, target, cost, reverse_cost FROM edge_table'; - inner2_sql := 'SELECT id, source, target, cost FROM edge_table'; + inner1_sql := 'SELECT id, source, target, cost, reverse_cost FROM edges'; + inner2_sql := 'SELECT id, source, target, cost FROM edges'; data := ' seq, depth, start_vid, node, edge, cost::text, agg_cost::text '; vids := ' ARRAY[2, 5] '; @@ -93,8 +93,8 @@ kruskal_sql TEXT; vids TEXT; data TEXT; BEGIN - inner1_sql := 'SELECT id, source, target, cost, reverse_cost FROM edge_table'; - inner2_sql := 'SELECT id, source, target, cost FROM edge_table'; + inner1_sql := 'SELECT id, source, target, cost, reverse_cost FROM edges'; + inner2_sql := 'SELECT id, source, target, cost FROM edges'; data := ' seq, depth, start_vid, node, edge, cost::text, agg_cost::text '; vids := ' ARRAY[2, 5] '; diff --git a/pgtap/spanningTree/edge_cases/compare_primDD_kruskalDD.pg b/pgtap/spanningTree/edge_cases/compare_primDD_kruskalDD.pg index 4aa9dc658f0..249cb2104b6 100644 --- a/pgtap/spanningTree/edge_cases/compare_primDD_kruskalDD.pg +++ b/pgtap/spanningTree/edge_cases/compare_primDD_kruskalDD.pg @@ -25,7 +25,7 @@ BEGIN; SELECT plan(24); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION ComparePrimDDKruskalDD(distance FLOAT) RETURNS SETOF TEXT AS @@ -38,8 +38,8 @@ kruskal_sql TEXT; vids TEXT; data TEXT; BEGIN - inner1_sql := 'SELECT id, source, target, cost, reverse_cost FROM edge_table'; - inner2_sql := 'SELECT id, source, target, cost FROM edge_table'; + inner1_sql := 'SELECT id, source, target, cost, reverse_cost FROM edges'; + inner2_sql := 'SELECT id, source, target, cost FROM edges'; data := ' seq, depth, start_vid, node, edge, cost::text, agg_cost::text '; vids := ' ARRAY[2, 5] '; diff --git a/pgtap/spanningTree/edge_cases/compare_primDFS_kruskalDFS.pg b/pgtap/spanningTree/edge_cases/compare_primDFS_kruskalDFS.pg index 41acc0bd6ee..4eff23a9ed4 100644 --- a/pgtap/spanningTree/edge_cases/compare_primDFS_kruskalDFS.pg +++ b/pgtap/spanningTree/edge_cases/compare_primDFS_kruskalDFS.pg @@ -25,7 +25,7 @@ BEGIN; SELECT plan(28); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION ComparePrimDFSKruskalDFS() RETURNS SETOF TEXT AS @@ -38,8 +38,8 @@ kruskal_sql TEXT; vids TEXT; data TEXT; BEGIN - inner1_sql := 'SELECT id, source, target, cost, reverse_cost FROM edge_table'; - inner2_sql := 'SELECT id, source, target, cost FROM edge_table'; + inner1_sql := 'SELECT id, source, target, cost, reverse_cost FROM edges'; + inner2_sql := 'SELECT id, source, target, cost FROM edges'; data := ' seq, depth, start_vid, node, edge, cost::text, agg_cost::text '; vids := ' ARRAY[2, 5] '; @@ -93,8 +93,8 @@ kruskal_sql TEXT; vids TEXT; data TEXT; BEGIN - inner1_sql := 'SELECT id, source, target, cost, reverse_cost FROM edge_table'; - inner2_sql := 'SELECT id, source, target, cost FROM edge_table'; + inner1_sql := 'SELECT id, source, target, cost, reverse_cost FROM edges'; + inner2_sql := 'SELECT id, source, target, cost FROM edges'; data := ' seq, depth, start_vid, node, edge, cost::text, agg_cost::text '; vids := ' ARRAY[2, 5] '; diff --git a/pgtap/spanningTree/edge_cases/compare_prim_kruskal.pg b/pgtap/spanningTree/edge_cases/compare_prim_kruskal.pg index 498fd3018b2..164ae25e773 100644 --- a/pgtap/spanningTree/edge_cases/compare_prim_kruskal.pg +++ b/pgtap/spanningTree/edge_cases/compare_prim_kruskal.pg @@ -21,19 +21,19 @@ BEGIN; SELECT plan(3); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -- PREPARE prim AS SELECT edge, cost::TEXT FROM pgr_prim( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table' + 'SELECT id, source, target, cost, reverse_cost FROM edges' ); PREPARE kruskal AS SELECT edge, cost::TEXT FROM pgr_kruskal( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table' + 'SELECT id, source, target, cost, reverse_cost FROM edges' ); SELECT set_eq('prim', 'kruskal', '1: Prim & kruskal should return same values'); @@ -41,13 +41,13 @@ SELECT set_eq('prim', 'kruskal', '1: Prim & kruskal should return same values'); PREPARE kruskal1 AS SELECT edge, cost FROM pgr_kruskal( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table' + 'SELECT id, source, target, cost, reverse_cost FROM edges' ); PREPARE prim1 AS SELECT edge, cost FROM pgr_prim( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table' + 'SELECT id, source, target, cost, reverse_cost FROM edges' ); SELECT bag_has('kruskal1', diff --git a/pgtap/spanningTree/kruskal/kruskal/edge_cases.pg b/pgtap/spanningTree/kruskal/kruskal/edge_cases.pg index cf437a9c495..8c7dee5635c 100644 --- a/pgtap/spanningTree/kruskal/kruskal/edge_cases.pg +++ b/pgtap/spanningTree/kruskal/kruskal/edge_cases.pg @@ -21,20 +21,20 @@ BEGIN; SELECT plan(4); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -- PREPARE kruskal1 AS SELECT * FROM pgr_kruskal( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table WHERE id > 18 ORDER BY id' + FROM edges WHERE id > 18 ORDER BY id' ); PREPARE kruskal2 AS SELECT * FROM pgr_kruskal( 'SELECT id, source, target, cost - FROM edge_table WHERE cost < 0 ORDER BY id' + FROM edges WHERE cost < 0 ORDER BY id' ); SELECT is_empty('kruskal1', 'No_edge -> No answer'); @@ -46,7 +46,7 @@ PREPARE kruskal4 AS SELECT count(*) FROM pgr_kruskal( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id' + FROM edges ORDER BY id' ) WHERE edge < 0; SELECT set_eq('kruskal4', @@ -58,7 +58,7 @@ PREPARE kruskal5 AS SELECT edge, cost FROM pgr_kruskal( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id' + FROM edges ORDER BY id' ); SELECT bag_has('kruskal5', diff --git a/pgtap/spanningTree/kruskal/kruskal/inner_query.pg b/pgtap/spanningTree/kruskal/kruskal/inner_query.pg index aca17ec1b8b..7726c6dc001 100644 --- a/pgtap/spanningTree/kruskal/kruskal/inner_query.pg +++ b/pgtap/spanningTree/kruskal/kruskal/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_kruskal(', ')'); diff --git a/pgtap/spanningTree/kruskal/kruskal/no_crash_test.pg b/pgtap/spanningTree/kruskal/kruskal/no_crash_test.pg index e7109779ed6..ada8c2ac9cd 100644 --- a/pgtap/spanningTree/kruskal/kruskal/no_crash_test.pg +++ b/pgtap/spanningTree/kruskal/kruskal/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(9); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -37,7 +37,7 @@ subs TEXT[]; BEGIN -- kruskal with no root vertex params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$' + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$' ]::TEXT[]; subs = ARRAY[ diff --git a/pgtap/spanningTree/kruskal/kruskalBFS/edge_cases.pg b/pgtap/spanningTree/kruskal/kruskalBFS/edge_cases.pg index 485a49063f7..f05993ddf58 100644 --- a/pgtap/spanningTree/kruskal/kruskalBFS/edge_cases.pg +++ b/pgtap/spanningTree/kruskal/kruskalBFS/edge_cases.pg @@ -21,13 +21,13 @@ BEGIN; SELECT plan(10); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -- PREPARE kruskal1 AS SELECT * FROM pgr_kruskalBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table WHERE id > 18 ORDER BY id', + FROM edges WHERE id > 18 ORDER BY id', 21, 3 ); @@ -40,7 +40,7 @@ PREPARE kruskal2 AS SELECT * FROM pgr_kruskalBFS( 'SELECT id, source, target, cost - FROM edge_table WHERE id > 18 ORDER BY id', + FROM edges WHERE id > 18 ORDER BY id', ARRAY[21, 45], 3 ); @@ -58,7 +58,7 @@ PREPARE kruskal3 AS SELECT * FROM pgr_kruskalBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 21, 3 ); @@ -68,50 +68,47 @@ SELECT set_eq('kruskal3', -- PREPARE kruskal4 AS -SELECT seq, start_vid, depth, node, edge, agg_cost <= 3.5 +SELECT seq, start_vid, depth, edge, agg_cost <= 3.5 FROM pgr_kruskalBFS( 'SELECT id, source, target, cost - FROM edge_table ORDER BY id', - ARRAY[21, 4], + FROM edges ORDER BY id', + ARRAY[21, 15], 3 ); SELECT set_eq('kruskal4', $$VALUES - (1, 4, 0, 4, -1, true), - (2, 4, 1, 9, 16, true), - (3, 4, 2, 6, 9, true), - (4, 4, 3, 3, 5, true), - (5, 4, 3, 5, 8, true), - (6, 4, 3, 11, 11, true), - (7, 21, 0, 21, -1, true) + (1, 15, 0, -1, true), + (2, 15, 1, 16, true), + (3, 15, 2, 9, true), + (4, 15, 3, 5, true), + (5, 15, 3, 8, true), + (6, 15, 3, 11, true), + (7, 21, 0, -1, true) $$, '4: Root not in Graph -> Only root vertex is returned, Root in graph -> spanning tree is returned'); -- PREPARE kruskal5 AS -SELECT seq, start_vid, depth, node, edge, depth <= 3 +SELECT seq, start_vid, depth, edge, depth <= 3 FROM pgr_kruskalBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 0, 3 ); SELECT set_eq('kruskal5', $$VALUES - (1, 1, 0, 1, -1, true), - (2, 1, 1, 2, 1, true), - (3, 1, 2, 3, 2, true), - (4, 1, 2, 5, 4, true), - (5, 1, 3, 4, 3, true), - (6, 1, 3, 6, 5, true), - (7, 1, 3, 8, 7, true), - (8, 1, 3, 10, 10, true), - (9, 14, 0, 14, -1, true), - (10, 14, 1, 15, 17, true), - (11, 16, 0, 16, -1, true), - (12, 16, 1, 17, 18, true) + (8, 13, 0, -1, true), + (2, 1, 1, 6, true), + (3, 1, 2, 7, true), + (4, 1, 3, 4, true), + (5, 1, 3, 10, true), + (1, 1, 0, -1, true), + (7, 2, 1, 17, true), + (6, 2, 0, -1, true), + (9, 13, 1, 18, true) $$, '5: root = 0 -> forest (with random root vertices)'); @@ -120,8 +117,8 @@ PREPARE kruskal6 AS SELECT * FROM pgr_kruskalBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4, -3 + FROM edges ORDER BY id', + 15, -3 ); @@ -136,8 +133,8 @@ PREPARE kruskal7 AS SELECT * FROM pgr_kruskalBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - ARRAY[4, 10], -3 + FROM edges ORDER BY id', + ARRAY[15, 8], -3 ); SELECT throws_ok('kruskal7', @@ -150,69 +147,69 @@ PREPARE kruskal8 AS SELECT * FROM pgr_kruskalBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4, 0 + FROM edges ORDER BY id', + 15, 0 ); SELECT set_eq('kruskal8', - $$VALUES (1, 0, 4, 4, -1, 0, 0) $$, + $$VALUES (1, 0, 15, 15, -1, 0, 0) $$, '8: 0 max_depth -> Only root vertex is returned'); -- PREPARE kruskal9 AS -SELECT seq, depth, start_vid, node, edge, depth <= 9223372036854775807 +SELECT seq, depth, edge, depth <= 9223372036854775807 FROM pgr_kruskalBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4 + FROM edges ORDER BY id', + 15 ); SELECT set_eq('kruskal9', $$VALUES - (1, 0, 4, 4, -1, true), - (2, 1, 4, 3, 3, true), - (3, 2, 4, 2, 2, true), - (4, 2, 4, 6, 5, true), - (5, 3, 4, 1, 1, true), - (6, 3, 4, 5, 4, true), - (7, 3, 4, 9, 9, true), - (8, 3, 4, 11, 11, true), - (9, 4, 4, 8, 7, true), - (10, 4, 4, 10, 10, true), - (11, 4, 4, 12, 13, true), - (12, 5, 4, 7, 6, true), - (13, 5, 4, 13, 14, true) + (1, 0, -1, true), + (2, 1, 3, true), + (3, 2, 2, true), + (4, 2, 5, true), + (5, 3, 1, true), + (6, 3, 4, true), + (7, 3, 9, true), + (8, 3, 11, true), + (9, 4, 7, true), + (10, 4, 10, true), + (11, 4, 13, true), + (12, 5, 6, true), + (13, 5, 14, true) $$, '9: default max_depth -> complete tree from root'); -- PREPARE kruskal10 AS -SELECT seq, start_vid, depth, node, edge, depth <= 9223372036854775807 +SELECT seq, start_vid, depth, edge, depth <= 9223372036854775807 FROM pgr_kruskalBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 0 ); SELECT set_eq('kruskal10', $$VALUES - (1, 1, 0, 1,-1, true), - (2, 1, 1, 2, 1, true), - (3, 1, 2, 3, 2, true), - (4, 1, 2, 5, 4, true), - (5, 1, 3, 4, 3, true), - (6, 1, 3, 6, 5, true), - (7, 1, 3, 8, 7, true), - (8, 1, 3,10,10, true), - (9, 1, 4, 9, 9, true), - (10, 1, 4,11,11, true), - (11, 1, 4, 7, 6, true), - (12, 1, 4,13,14, true), - (13, 1, 5,12,13, true), - (14, 14, 0,14,-1, true), - (15, 14, 1,15,17, true), - (16, 16, 0,16,-1, true), - (17, 16, 1,17,18, true) + (1, 1, 0, -1, true), + (2, 1, 1, 6, true), + (3, 1, 2, 7, true), + (4, 1, 3, 4, true), + (5, 1, 3, 10, true), + (6, 1, 4, 1, true), + (7, 1, 4, 2, true), + (8, 1, 4,14, true), + (9, 1, 5, 3, true), + (10, 1, 5,5, true), + (11, 1, 6, 9, true), + (12, 1, 6,11, true), + (13, 1, 7,13, true), + (14, 2, 0,-1, true), + (15, 2, 1,17, true), + (16, 13, 0,-1, true), + (17, 13, 1,18, true) $$, '10: root = 0 -> forest (with random root vertices)'); diff --git a/pgtap/spanningTree/kruskal/kruskalBFS/inner_query.pg b/pgtap/spanningTree/kruskal/kruskalBFS/inner_query.pg index 8ce6028e777..88bb69fddf4 100644 --- a/pgtap/spanningTree/kruskal/kruskalBFS/inner_query.pg +++ b/pgtap/spanningTree/kruskal/kruskalBFS/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_kruskalBFS(', ', 5)'); diff --git a/pgtap/spanningTree/kruskal/kruskalBFS/no_crash_test.pg b/pgtap/spanningTree/kruskal/kruskalBFS/no_crash_test.pg index 51bb8333f40..50a957897ce 100644 --- a/pgtap/spanningTree/kruskal/kruskalBFS/no_crash_test.pg +++ b/pgtap/spanningTree/kruskal/kruskalBFS/no_crash_test.pg @@ -19,14 +19,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(86); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_vertex AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -42,12 +42,12 @@ subs TEXT[]; BEGIN -- kruskalBFS params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_kruskalBFS', params, subs); @@ -60,13 +60,13 @@ BEGIN -- kruskalBFS with depth params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5', '3' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; @@ -80,12 +80,12 @@ BEGIN -- kruskalBFS Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_kruskalBFS', params, subs); @@ -98,13 +98,13 @@ BEGIN -- kruskalBFS with depth Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]', '3' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; diff --git a/pgtap/spanningTree/kruskal/kruskalDD/edge_cases.pg b/pgtap/spanningTree/kruskal/kruskalDD/edge_cases.pg index 56000ab7387..4eab3962deb 100644 --- a/pgtap/spanningTree/kruskal/kruskalDD/edge_cases.pg +++ b/pgtap/spanningTree/kruskal/kruskalDD/edge_cases.pg @@ -21,14 +21,14 @@ BEGIN; SELECT plan(9); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -- PREPARE kruskal1 AS SELECT * FROM pgr_kruskalDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table WHERE id > 18 ORDER BY id', + FROM edges WHERE id > 18 ORDER BY id', 21, 3.5 ); @@ -41,7 +41,7 @@ PREPARE kruskal2 AS SELECT * FROM pgr_kruskalDD( 'SELECT id, source, target, cost - FROM edge_table WHERE id > 18 ORDER BY id', + FROM edges WHERE id > 18 ORDER BY id', ARRAY[21, 45], 3.5 ); @@ -59,7 +59,7 @@ PREPARE kruskal3 AS SELECT * FROM pgr_kruskalDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 21, 3 ); @@ -69,50 +69,50 @@ SELECT set_eq('kruskal3', -- PREPARE kruskal4 AS -SELECT seq, start_vid, depth, node, edge, agg_cost <= 3.5 +SELECT seq, start_vid, depth, edge, agg_cost <= 3.5 FROM pgr_kruskalDD( 'SELECT id, source, target, cost - FROM edge_table ORDER BY id', - ARRAY[21, 4], + FROM edges ORDER BY id', + ARRAY[21, 15], 3.5 ); SELECT set_eq('kruskal4', $$VALUES - (1,4,0,4,-1,true), - (2,4,1,9,16,true), - (3,4,2,6,9,true), - (4,4,3,3,5,true), - (5,4,3,5,8,true), - (6,4,3,11,11,true), - (7,21,0,21,-1,true) + (1,15,0,-1,true), + (2,15,1,16,true), + (3,15,2,9,true), + (4,15,3,5,true), + (5,15,3,8,true), + (6,15,3,11,true), + (7,21,0,-1,true) $$, '4: Root not in Graph -> Only root vertex is returned, Root in graph -> spanning tree is returned'); -- PREPARE kruskal5 AS -SELECT seq, start_vid, depth, node, edge, agg_cost <= 3.5 +SELECT seq, start_vid, depth, edge, agg_cost <= 3.5 FROM pgr_kruskalDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 0, 3.5 ); SELECT set_eq('kruskal5', $$VALUES - (1,1,0,1,-1,true), - (2,1,1,2,1,true), - (3,1,2,3,2,true), - (4,1,3,4,3,true), - (5,1,3,6,5,true), - (6,1,2,5,4,true), - (7,1,3,8,7,true), - (8,1,3,10,10,true), - (9,14,0,14,-1,true), - (10,14,1,15,17,true), - (11,16,0,16,-1,true), - (12,16,1,17,18,true) + (1,5,0,-1,true), + (2,5,1,1,true), + (3,5,2,2,true), + (4,5,3,3,true), + (5,5,3,5,true), + (6,5,2,4,true), + (7,5,3,7,true), + (8,5,3,10,true), + (9,2,0,-1,true), + (10,2,1,17,true), + (11,13,0,-1,true), + (12,13,1,18,true) $$, '5: root = 0 -> forset (with random root vertices)'); @@ -121,8 +121,8 @@ PREPARE kruskal6 AS SELECT * FROM pgr_kruskalDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4, -3 + FROM edges ORDER BY id', + 15, -3 ); SELECT throws_ok('kruskal6', @@ -136,8 +136,8 @@ PREPARE kruskal7 AS SELECT * FROM pgr_kruskalDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - ARRAY[4, 10], -3 + FROM edges ORDER BY id', + ARRAY[15, 8], -3 ); SELECT throws_ok('kruskal7', @@ -150,41 +150,41 @@ PREPARE kruskal8 AS SELECT * FROM pgr_kruskalDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4, 0 + FROM edges ORDER BY id', + 15, 0 ); SELECT set_eq('kruskal8', - $$VALUES (1,0,4,4,-1,0,0) $$, + $$VALUES (1,0,15,15,-1,0,0) $$, '8: 0 distance -> Only root vertex is returned'); -- PREPARE kruskal9 AS -SELECT seq, depth, start_vid, node, edge +SELECT seq, depth, edge FROM pgr_kruskalDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4, 'Infinity' + FROM edges ORDER BY id', + 15, 'Infinity' ); SELECT set_eq('kruskal9', $$VALUES - (1, 0, 4, 4,-1), - (2, 1, 4, 3, 3), - (3, 2, 4, 2, 2), - (4, 3, 4, 1, 1), - (5, 3, 4, 5, 4), - (6, 4, 4, 8, 7), - (7, 5, 4, 7, 6), - (8, 4, 4,10,10), - (9, 5, 4,13,14), - (10, 2, 4, 6, 5), - (11, 3, 4, 9, 9), - (12, 3, 4,11,11), - (13, 4, 4,12,13) + (1, 0,-1), + (2, 1, 3), + (3, 2, 2), + (4, 3, 1), + (5, 3, 4), + (6, 4, 7), + (7, 5, 6), + (8, 4,10), + (9, 5,14), + (10, 2, 5), + (11, 3, 9), + (12, 3,11), + (13, 4,13) $$, - '9: 0 distance -> Only root vertex is returned'); + '9: Infinity distance'); SELECT * FROM finish(); diff --git a/pgtap/spanningTree/kruskal/kruskalDD/inner_query.pg b/pgtap/spanningTree/kruskal/kruskalDD/inner_query.pg index 002e71b9bc9..18a0ec7aafc 100644 --- a/pgtap/spanningTree/kruskal/kruskalDD/inner_query.pg +++ b/pgtap/spanningTree/kruskal/kruskalDD/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_kruskalDD(', ', 5, 3.5)'); diff --git a/pgtap/spanningTree/kruskal/kruskalDD/no_crash_test.pg b/pgtap/spanningTree/kruskal/kruskalDD/no_crash_test.pg index d53f61f56a6..49837fa8422 100644 --- a/pgtap/spanningTree/kruskal/kruskalDD/no_crash_test.pg +++ b/pgtap/spanningTree/kruskal/kruskalDD/no_crash_test.pg @@ -19,14 +19,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(114); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_vertex AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -42,14 +42,14 @@ subs TEXT[]; BEGIN -- kruskalDD params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5', '3.5' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; @@ -60,14 +60,14 @@ BEGIN -- kruskalDD Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]', '3.5' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; @@ -81,14 +81,14 @@ BEGIN -- kruskalDD params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5', '3.5::numeric' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL::numeric' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_kruskalDD', params, subs); @@ -104,14 +104,14 @@ BEGIN -- kruskalDD Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]', '3.5::numeric' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL::numeric' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_kruskalDD', params, subs); diff --git a/pgtap/spanningTree/kruskal/kruskalDFS/edge_cases.pg b/pgtap/spanningTree/kruskal/kruskalDFS/edge_cases.pg index b851f6901dc..869d040d27e 100644 --- a/pgtap/spanningTree/kruskal/kruskalDFS/edge_cases.pg +++ b/pgtap/spanningTree/kruskal/kruskalDFS/edge_cases.pg @@ -21,13 +21,13 @@ BEGIN; SELECT plan(10); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -- PREPARE kruskal1 AS SELECT * FROM pgr_kruskalDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table WHERE id > 18 ORDER BY id', + FROM edges WHERE id > 18 ORDER BY id', 21, 3 ); @@ -40,7 +40,7 @@ PREPARE kruskal2 AS SELECT * FROM pgr_kruskalDFS( 'SELECT id, source, target, cost - FROM edge_table WHERE id > 18 ORDER BY id', + FROM edges WHERE id > 18 ORDER BY id', ARRAY[21, 45], 3 ); @@ -58,7 +58,7 @@ PREPARE kruskal3 AS SELECT * FROM pgr_kruskalDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 21, 3 ); @@ -68,50 +68,50 @@ SELECT set_eq('kruskal3', -- PREPARE kruskal4 AS -SELECT seq, start_vid, depth, node, edge, agg_cost <= 3.5 +SELECT seq, start_vid, depth, edge, agg_cost <= 3.5 FROM pgr_kruskalDFS( 'SELECT id, source, target, cost - FROM edge_table ORDER BY id', - ARRAY[21, 4], + FROM edges ORDER BY id', + ARRAY[21, 15], 3 ); SELECT set_eq('kruskal4', $$VALUES - (1, 4, 0, 4, -1, true), - (2, 4, 1, 9, 16, true), - (3, 4, 2, 6, 9, true), - (4, 4, 3, 3, 5, true), - (5, 4, 3, 5, 8, true), - (6, 4, 3, 11, 11, true), - (7, 21, 0, 21, -1, true) + (1, 15, 0, -1, true), + (2, 15, 1, 16, true), + (3, 15, 2, 9, true), + (4, 15, 3, 5, true), + (5, 15, 3, 8, true), + (6, 15, 3, 11, true), + (7, 21, 0, -1, true) $$, '4: Root not in Graph -> Only root vertex is returned, Root in graph -> spanning tree is returned'); -- PREPARE kruskal5 AS -SELECT seq, start_vid, depth, node, edge, depth <= 3 +SELECT seq, start_vid, depth, edge, depth <= 3 FROM pgr_kruskalDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 0, 3 ); SELECT set_eq('kruskal5', $$VALUES - (1, 1, 0, 1, -1, true), - (2, 1, 1, 2, 1, true), - (3, 1, 2, 3, 2, true), - (4, 1, 3, 4, 3, true), - (5, 1, 3, 6, 5, true), - (6, 1, 2, 5, 4, true), - (7, 1, 3, 8, 7, true), - (8, 1, 3, 10, 10, true), - (9, 14, 0, 14, -1, true), - (10, 14, 1, 15, 17, true), - (11, 16, 0, 16, -1, true), - (12, 16, 1, 17, 18, true) + (1, 5, 0, -1, true), + (2, 5, 1, 1, true), + (3, 5, 2, 2, true), + (4, 5, 3, 3, true), + (5, 5, 3, 5, true), + (6, 5, 2, 4, true), + (7, 5, 3, 7, true), + (8, 5, 3, 10, true), + (9, 2, 0, -1, true), + (10, 2, 1, 17, true), + (11, 13, 0, -1, true), + (12, 13, 1, 18, true) $$, '5: root = 0 -> forest (with random root vertices)'); @@ -120,8 +120,8 @@ PREPARE kruskal6 AS SELECT * FROM pgr_kruskalDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4, -3 + FROM edges ORDER BY id', + 15, -3 ); @@ -136,8 +136,8 @@ PREPARE kruskal7 AS SELECT * FROM pgr_kruskalDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table', - ARRAY[4, 10], -3 + FROM edges', + ARRAY[15, 8], -3 ); SELECT throws_ok('kruskal7', @@ -150,69 +150,69 @@ PREPARE kruskal8 AS SELECT * FROM pgr_kruskalDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4, 0 + FROM edges ORDER BY id', + 15, 0 ); SELECT set_eq('kruskal8', - $$VALUES (1, 0, 4, 4, -1, 0, 0) $$, + $$VALUES (1, 0, 15, 15, -1, 0, 0) $$, '8: 0 max_depth -> Only root vertex is returned'); -- PREPARE kruskal9 AS -SELECT seq, depth, start_vid, node, edge, depth <= 9223372036854775807 +SELECT seq, depth, edge, depth <= 9223372036854775807 FROM pgr_kruskalDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4 + FROM edges ORDER BY id', + 15 ); SELECT set_eq('kruskal9', $$VALUES - (1, 0, 4, 4, -1, true), - (2, 1, 4, 3, 3, true), - (3, 2, 4, 2, 2, true), - (4, 3, 4, 1, 1, true), - (5, 3, 4, 5, 4, true), - (6, 4, 4, 8, 7, true), - (7, 5, 4, 7, 6, true), - (8, 4, 4, 10, 10, true), - (9, 5, 4, 13, 14, true), - (10, 2, 4, 6, 5, true), - (11, 3, 4, 9, 9, true), - (12, 3, 4, 11, 11, true), - (13, 4, 4, 12, 13, true) + (1, 0, -1, true), + (2, 1, 3, true), + (3, 2, 2, true), + (4, 3, 1, true), + (5, 3, 4, true), + (6, 4, 7, true), + (7, 5, 6, true), + (8, 4, 10, true), + (9, 5, 14, true), + (10, 2, 5, true), + (11, 3, 9, true), + (12, 3, 11, true), + (13, 4, 13, true) $$, '9: default max_depth -> complete tree from root'); -- PREPARE kruskal10 AS -SELECT seq, start_vid, depth, node, edge, depth <= 9223372036854775807 +SELECT seq, start_vid, depth, edge, depth <= 9223372036854775807 FROM pgr_kruskalDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 0 ); SELECT set_eq('kruskal10', $$VALUES - (1, 1, 0, 1,-1, true), - (2, 1, 1, 2, 1, true), - (3, 1, 2, 3, 2, true), - (4, 1, 3, 4, 3, true), - (5, 1, 3, 6, 5, true), - (6, 1, 4, 9, 9, true), - (7, 1, 4,11,11, true), - (8, 1, 5,12,13, true), - (9, 1, 2, 5, 4, true), - (10, 1, 3, 8, 7, true), - (11, 1, 4, 7, 6, true), - (12, 1, 3,10,10, true), - (13, 1, 4,13,14, true), - (14, 14, 0,14,-1, true), - (15, 14, 1,15,17, true), - (16, 16, 0,16,-1, true), - (17, 16, 1,17,18, true) + (1, 5, 0,-1, true), + (2, 5, 1, 1, true), + (3, 5, 2, 2, true), + (4, 5, 3, 3, true), + (5, 5, 3, 5, true), + (6, 5, 4, 9, true), + (7, 5, 4,11, true), + (8, 5, 5,13, true), + (9, 5, 2, 4, true), + (10, 5, 3, 7, true), + (11, 5, 4, 6, true), + (12, 5, 3,10, true), + (13, 5, 4,14, true), + (14, 2, 0,-1, true), + (15, 2, 1,17, true), + (16, 13, 0,-1, true), + (17, 13, 1,18, true) $$, '10: root = 0 -> forest (with random root vertices)'); diff --git a/pgtap/spanningTree/kruskal/kruskalDFS/inner_query.pg b/pgtap/spanningTree/kruskal/kruskalDFS/inner_query.pg index f07f1adca43..a3ac00345d5 100644 --- a/pgtap/spanningTree/kruskal/kruskalDFS/inner_query.pg +++ b/pgtap/spanningTree/kruskal/kruskalDFS/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_kruskalDFS(', ', 5)'); diff --git a/pgtap/spanningTree/kruskal/kruskalDFS/no_crash_test.pg b/pgtap/spanningTree/kruskal/kruskalDFS/no_crash_test.pg index e0635867354..ae3429fe563 100644 --- a/pgtap/spanningTree/kruskal/kruskalDFS/no_crash_test.pg +++ b/pgtap/spanningTree/kruskal/kruskalDFS/no_crash_test.pg @@ -19,14 +19,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(86); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_vertex AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -42,12 +42,12 @@ subs TEXT[]; BEGIN -- kruskalDFS params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_kruskalDFS', params, subs); @@ -60,13 +60,13 @@ BEGIN -- kruskalDFS with depth params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5', '3' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; @@ -80,12 +80,12 @@ BEGIN -- kruskalDFS Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_kruskalDFS', params, subs); @@ -98,13 +98,13 @@ BEGIN -- kruskalDFS with depth Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]', '3' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; diff --git a/pgtap/spanningTree/prim/prim/edge_cases.pg b/pgtap/spanningTree/prim/prim/edge_cases.pg index f83ee6826ab..56b33f825c6 100644 --- a/pgtap/spanningTree/prim/prim/edge_cases.pg +++ b/pgtap/spanningTree/prim/prim/edge_cases.pg @@ -21,20 +21,20 @@ BEGIN; SELECT plan(5); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -- PREPARE prim1 AS SELECT * FROM pgr_prim( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table WHERE id > 18 ORDER BY id' + FROM edges WHERE id > 18 ORDER BY id' ); PREPARE prim2 AS SELECT * FROM pgr_prim( 'SELECT id, source, target, cost - FROM edge_table WHERE cost < 0 ORDER BY id' + FROM edges WHERE cost < 0 ORDER BY id' ); SELECT is_empty('prim1', 'No_edge -> No answer'); @@ -46,7 +46,7 @@ PREPARE prim4 AS SELECT count(*) FROM pgr_prim( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id' + FROM edges ORDER BY id' ) WHERE edge < 0; SELECT lives_ok('prim4', @@ -61,7 +61,7 @@ PREPARE prim5 AS SELECT edge, cost FROM pgr_prim( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id' + FROM edges ORDER BY id' ); SELECT bag_has('prim5', diff --git a/pgtap/spanningTree/prim/prim/inner_query.pg b/pgtap/spanningTree/prim/prim/inner_query.pg index db948802d06..eb4ef99b390 100644 --- a/pgtap/spanningTree/prim/prim/inner_query.pg +++ b/pgtap/spanningTree/prim/prim/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_prim(', ')'); diff --git a/pgtap/spanningTree/prim/prim/no_crash_test.pg b/pgtap/spanningTree/prim/prim/no_crash_test.pg index 1594fb6706c..441b1dddc1a 100644 --- a/pgtap/spanningTree/prim/prim/no_crash_test.pg +++ b/pgtap/spanningTree/prim/prim/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(9); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -37,7 +37,7 @@ subs TEXT[]; BEGIN -- prim with no root vertex params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$' + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$' ]::TEXT[]; subs = ARRAY[ diff --git a/pgtap/spanningTree/prim/primBFS/edge_cases.pg b/pgtap/spanningTree/prim/primBFS/edge_cases.pg index 9a831d5a757..31db46ffb69 100644 --- a/pgtap/spanningTree/prim/primBFS/edge_cases.pg +++ b/pgtap/spanningTree/prim/primBFS/edge_cases.pg @@ -21,13 +21,13 @@ BEGIN; SELECT plan(13); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -- PREPARE prim1 AS SELECT * FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table WHERE id > 18 ORDER BY id', + FROM edges WHERE id > 18 ORDER BY id', 21, 3 ); @@ -40,7 +40,7 @@ PREPARE prim2 AS SELECT * FROM pgr_primBFS( 'SELECT id, source, target, cost - FROM edge_table WHERE id > 18 ORDER BY id', + FROM edges WHERE id > 18 ORDER BY id', ARRAY[21, 45], 3 ); @@ -58,7 +58,7 @@ PREPARE prim3 AS SELECT * FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 21, 3 ); @@ -68,50 +68,47 @@ SELECT set_eq('prim3', -- PREPARE prim4 AS -SELECT seq, start_vid, depth, node, edge, agg_cost <= 3.5 +SELECT seq, start_vid, depth, edge, agg_cost <= 3.5 FROM pgr_primBFS( 'SELECT id, source, target, cost - FROM edge_table ORDER BY id', - ARRAY[21, 4], + FROM edges ORDER BY id', + ARRAY[21, 15], 3 ); SELECT set_eq('prim4', $$VALUES - (1, 4, 0, 4, -1, true), - (2, 4, 1, 9, 16, true), - (3, 4, 2, 6, 9, true), - (4, 4, 3, 3, 5, true), - (5, 4, 3, 5, 8, true), - (6, 4, 3, 11, 11, true), - (7, 21, 0, 21, -1, true) + (1, 15, 0, -1, true), + (2, 15, 1, 16, true), + (3, 15, 2, 9, true), + (4, 15, 3, 5, true), + (5, 15, 3, 8, true), + (6, 15, 3, 11, true), + (7, 21, 0, -1, true) $$, '4: Root not in Graph -> Only root vertex is returned, Root in graph -> spanning tree is returned'); -- PREPARE prim5 AS -SELECT seq, start_vid, depth, node, edge, depth <= 3 +SELECT seq, start_vid, depth, edge, depth <= 3 FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 0, 3 ); SELECT set_eq('prim5', $$VALUES - (1, 1, 0, 1, -1, true), - (2, 1, 1, 2, 1, true), - (3, 1, 2, 3, 2, true), - (4, 1, 2, 5, 4, true), - (5, 1, 3, 4, 3, true), - (6, 1, 3, 6, 5, true), - (7, 1, 3, 8, 7, true), - (8, 1, 3, 10, 10, true), - (9, 14, 0, 14, -1, true), - (10, 14, 1, 15, 17, true), - (11, 16, 0, 16, -1, true), - (12, 16, 1, 17, 18, true) + (1, 1, 0, -1, true), + (2, 1, 1, 6, true), + (3, 1, 2, 7, true), + (4, 1, 3, 4, true), + (5, 1, 3, 10, true), + (6, 2, 0, -1, true), + (7, 2, 1, 17, true), + (8, 13, 0, -1, true), + (9, 13, 1, 18, true) $$, '5: root = 0 -> forest (with random root vertices)'); @@ -120,7 +117,7 @@ PREPARE prim6 AS SELECT * FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 4, -3 ); @@ -136,8 +133,8 @@ PREPARE prim7 AS SELECT * FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - ARRAY[4, 10], -3 + FROM edges ORDER BY id', + ARRAY[15, 8], -3 ); SELECT throws_ok('prim7', @@ -150,69 +147,69 @@ PREPARE prim8 AS SELECT * FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4, 0 + FROM edges ORDER BY id', + 15, 0 ); SELECT set_eq('prim8', - $$VALUES (1, 0, 4, 4, -1, 0, 0) $$, + $$VALUES (1, 0, 15, 15, -1, 0, 0) $$, '8: 0 max_depth -> Only root vertex is returned'); -- PREPARE prim9 AS -SELECT seq, depth, start_vid, node, edge, depth <= 9223372036854775807 +SELECT seq, depth, edge, depth <= 9223372036854775807 FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4 + FROM edges ORDER BY id', + 15 ); SELECT set_eq('prim9', $$VALUES - (1, 0, 4, 4, -1, true), - (2, 1, 4, 3, 3, true), - (3, 2, 4, 2, 2, true), - (4, 2, 4, 6, 5, true), - (5, 3, 4, 1, 1, true), - (6, 3, 4, 5, 4, true), - (7, 3, 4, 9, 9, true), - (8, 3, 4, 11, 11, true), - (9, 4, 4, 8, 7, true), - (10, 4, 4, 10, 10, true), - (11, 4, 4, 12, 13, true), - (12, 5, 4, 7, 6, true), - (13, 5, 4, 13, 14, true) + (1, 0, -1, true), + (2, 1, 3, true), + (3, 2, 2, true), + (4, 2, 5, true), + (5, 3, 1, true), + (6, 3, 4, true), + (7, 3, 9, true), + (8, 3, 11, true), + (9, 4, 7, true), + (10, 4, 10, true), + (11, 4, 13, true), + (12, 5, 6, true), + (13, 5, 14, true) $$, '9: default max_depth -> complete tree from root'); -- PREPARE prim10 AS -SELECT seq, start_vid, depth, node, edge, depth <= 9223372036854775807 +SELECT seq, start_vid, depth, edge, depth <= 9223372036854775807 FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 0 ); SELECT set_eq('prim10', $$VALUES - (1, 1, 0, 1,-1, true), - (2, 1, 1, 2, 1, true), - (3, 1, 2, 3, 2, true), - (4, 1, 2, 5, 4, true), - (5, 1, 3, 4, 3, true), - (6, 1, 3, 6, 5, true), - (7, 1, 3, 8, 7, true), - (8, 1, 3,10,10, true), - (9, 1, 4, 9, 9, true), - (10, 1, 4,11,11, true), - (11, 1, 4, 7, 6, true), - (12, 1, 4,13,14, true), - (13, 1, 5,12,13, true), - (14, 14, 0,14,-1, true), - (15, 14, 1,15,17, true), - (16, 16, 0,16,-1, true), - (17, 16, 1,17,18, true) + (1, 1, 0, -1, true), + (2, 1, 1, 6, true), + (3, 1, 2, 7, true), + (4, 1, 3, 4, true), + (5, 1, 3,10, true), + (6, 1, 4, 1, true), + (7, 1, 4, 2, true), + (8, 1, 4,14, true), + (9, 1, 5, 3, true), + (10, 1, 5, 5, true), + (11, 1, 6, 9, true), + (12, 1, 6,11, true), + (13, 1, 7,13, true), + (14, 2, 0,-1, true), + (15, 2, 1,17, true), + (16, 13, 0,-1, true), + (17, 13, 1,18, true) $$, '10: root = 0 -> forest (with random root vertices)'); @@ -220,7 +217,7 @@ SELECT set_eq('prim10', PREPARE prim11 AS SELECT * FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table', 18 + FROM edges', 18 ); SELECT set_eq('prim11', 'VALUES (1, 0, 18, 18, -1, 0, 0)', 'Vertex 18 does not exist'); @@ -230,7 +227,7 @@ PREPARE prim12 AS SELECT * FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', 4) + FROM edges ORDER BY id', 4) WHERE cost < 0; SELECT is_empty('prim12', 'No cost can be negative'); @@ -240,10 +237,13 @@ PREPARE prim13 AS SELECT * FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ', 16 + FROM edges ', 13 ); -SELECT set_eq('prim13', 'VALUES (1, 0, 16, 16, -1, 0, 0), (2, 1, 16, 17, 18, 1.324, 1.324)' , 'Compare when node is 16 with expected result'); +SELECT set_eq('prim13', + 'VALUES + (1, 0, 13, 13, -1, 0, 0), + (2, 1, 13, 14, 18, 1.324, 1.324)' , 'Compare when node is 16 with expected result'); SELECT * FROM finish(); ROLLBACK; diff --git a/pgtap/spanningTree/prim/primBFS/inner_query.pg b/pgtap/spanningTree/prim/primBFS/inner_query.pg index f55de5fa7c8..cf2ec02e6e7 100644 --- a/pgtap/spanningTree/prim/primBFS/inner_query.pg +++ b/pgtap/spanningTree/prim/primBFS/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_primBFS(', ', 5)'); diff --git a/pgtap/spanningTree/prim/primBFS/no_crash_test.pg b/pgtap/spanningTree/prim/primBFS/no_crash_test.pg index e4f900db552..749f126022b 100644 --- a/pgtap/spanningTree/prim/primBFS/no_crash_test.pg +++ b/pgtap/spanningTree/prim/primBFS/no_crash_test.pg @@ -19,14 +19,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(86); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_vertex AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -42,12 +42,12 @@ subs TEXT[]; BEGIN -- primBFS params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_primBFS', params, subs); @@ -60,13 +60,13 @@ BEGIN -- primBFS with depth params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5', '3' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; @@ -80,12 +80,12 @@ BEGIN -- primBFS Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_primBFS', params, subs); @@ -98,13 +98,13 @@ BEGIN -- primBFS with depth Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]', '3' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; diff --git a/pgtap/spanningTree/prim/primDD/edge_cases.pg b/pgtap/spanningTree/prim/primDD/edge_cases.pg index a1788960c40..332a493c71f 100644 --- a/pgtap/spanningTree/prim/primDD/edge_cases.pg +++ b/pgtap/spanningTree/prim/primDD/edge_cases.pg @@ -21,14 +21,14 @@ BEGIN; SELECT plan(9); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -- PREPARE prim1 AS SELECT * FROM pgr_primDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table WHERE id > 18 ORDER BY id', + FROM edges WHERE id > 18 ORDER BY id', 21, 3.5 ); @@ -41,7 +41,7 @@ PREPARE prim2 AS SELECT * FROM pgr_primDD( 'SELECT id, source, target, cost - FROM edge_table WHERE id > 18 ORDER BY id', + FROM edges WHERE id > 18 ORDER BY id', ARRAY[21, 45], 3.5 ); @@ -59,7 +59,7 @@ PREPARE prim3 AS SELECT * FROM pgr_primDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 21, 3 ); @@ -69,50 +69,50 @@ SELECT set_eq('prim3', -- PREPARE prim4 AS -SELECT seq, start_vid, depth, node, edge, agg_cost <= 3.5 +SELECT seq, start_vid, depth, edge, agg_cost <= 3.5 FROM pgr_primDD( 'SELECT id, source, target, cost - FROM edge_table ORDER BY id', - ARRAY[21, 4], + FROM edges ORDER BY id', + ARRAY[21, 15], 3.5 ); SELECT set_eq('prim4', $$VALUES - (1,4,0,4,-1,true), - (2,4,1,9,16,true), - (3,4,2,6,9,true), - (4,4,3,3,5,true), - (5,4,3,5,8,true), - (6,4,3,11,11,true), - (7,21,0,21,-1,true) + (1,15,0,-1,true), + (2,15,1,16,true), + (3,15,2,9,true), + (4,15,3,5,true), + (5,15,3,8,true), + (6,15,3,11,true), + (7,21,0,-1,true) $$, '4: Root not in Graph -> Only root vertex is returned, Root in graph -> spanning tree is returned'); -- PREPARE prim5 AS -SELECT seq, start_vid, depth, node, edge, agg_cost <= 3.5 +SELECT seq, start_vid, depth, edge, agg_cost <= 3.5 FROM pgr_primDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 0, 3.5 ); SELECT set_eq('prim5', $$VALUES - (1,1,0,1,-1,true), - (2,1,1,2,1,true), - (3,1,2,3,2,true), - (4,1,3,4,3,true), - (5,1,3,6,5,true), - (6,1,2,5,4,true), - (7,1,3,8,7,true), - (8,1,3,10,10,true), - (9,14,0,14,-1,true), - (10,14,1,15,17,true), - (11,16,0,16,-1,true), - (12,16,1,17,18,true) + (1,5,0,-1,true), + (2,5,1,1,true), + (3,5,2,2,true), + (4,5,3,3,true), + (5,5,3,5,true), + (6,5,2,4,true), + (7,5,3,7,true), + (8,5,3,10,true), + (9,2,0,-1,true), + (10,2,1,17,true), + (11,13,0,-1,true), + (12,13,1,18,true) $$, '5: root = 0 -> forset (with random root vertices)'); @@ -121,8 +121,8 @@ PREPARE prim6 AS SELECT * FROM pgr_primDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4, -3 + FROM edges ORDER BY id', + 15, -3 ); SELECT throws_ok('prim6', @@ -136,8 +136,8 @@ PREPARE prim7 AS SELECT * FROM pgr_primDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - ARRAY[4, 10], -3 + FROM edges ORDER BY id', + ARRAY[15, 8], -3 ); SELECT throws_ok('prim7', @@ -150,41 +150,41 @@ PREPARE prim8 AS SELECT * FROM pgr_primDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4, 0 + FROM edges ORDER BY id', + 15, 0 ); SELECT set_eq('prim8', - $$VALUES (1,0,4,4,-1,0,0) $$, + $$VALUES (1,0,15,15,-1,0,0) $$, '8: 0 distance -> Only root vertex is returned'); -- PREPARE prim9 AS -SELECT seq, depth, start_vid, node, edge +SELECT seq, depth, edge FROM pgr_primDD( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4, 'Infinity' + FROM edges ORDER BY id', + 15, 'Infinity' ); SELECT set_eq('prim9', $$VALUES - (1, 0, 4, 4,-1), - (2, 1, 4, 3, 3), - (3, 2, 4, 2, 2), - (4, 3, 4, 1, 1), - (5, 3, 4, 5, 4), - (6, 4, 4, 8, 7), - (7, 5, 4, 7, 6), - (8, 4, 4,10,10), - (9, 5, 4,13,14), - (10, 2, 4, 6, 5), - (11, 3, 4, 9, 9), - (12, 3, 4,11,11), - (13, 4, 4,12,13) + (1, 0, -1), + (2, 1, 3), + (3, 2, 2), + (4, 3, 1), + (5, 3, 4), + (6, 4, 7), + (7, 5, 6), + (8, 4, 10), + (9, 5, 14), + (10, 2, 5), + (11, 3, 9), + (12, 3, 11), + (13, 4, 13) $$, - '9: 0 distance -> Only root vertex is returned'); + '9: 0 Infinity'); SELECT * FROM finish(); diff --git a/pgtap/spanningTree/prim/primDD/inner_query.pg b/pgtap/spanningTree/prim/primDD/inner_query.pg index 23ee2c7da00..b51522a52f5 100644 --- a/pgtap/spanningTree/prim/primDD/inner_query.pg +++ b/pgtap/spanningTree/prim/primDD/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_primDD(', ', 5, 3.5)'); diff --git a/pgtap/spanningTree/prim/primDD/no_crash_test.pg b/pgtap/spanningTree/prim/primDD/no_crash_test.pg index b97dbb1ac23..1bb47ac4c79 100644 --- a/pgtap/spanningTree/prim/primDD/no_crash_test.pg +++ b/pgtap/spanningTree/prim/primDD/no_crash_test.pg @@ -19,14 +19,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(114); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_vertex AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -42,14 +42,14 @@ subs TEXT[]; BEGIN -- primDD params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5', '3.5' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; @@ -60,14 +60,14 @@ BEGIN -- primDD Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]', '3.5' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; @@ -81,14 +81,14 @@ BEGIN -- primDD params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5', '3.5::numeric' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL::numeric' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_primDD', params, subs); @@ -104,14 +104,14 @@ BEGIN -- primDD Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]', '3.5::numeric' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL::numeric' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_primDD', params, subs); diff --git a/pgtap/spanningTree/prim/primDFS/edge_cases.pg b/pgtap/spanningTree/prim/primDFS/edge_cases.pg index 0bccab45543..2ef97f24e62 100644 --- a/pgtap/spanningTree/prim/primDFS/edge_cases.pg +++ b/pgtap/spanningTree/prim/primDFS/edge_cases.pg @@ -21,13 +21,13 @@ BEGIN; SELECT plan(10); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -- PREPARE prim1 AS SELECT * FROM pgr_primDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table WHERE id > 18 ORDER BY id', + FROM edges WHERE id > 18 ORDER BY id', 21, 3 ); @@ -40,7 +40,7 @@ PREPARE prim2 AS SELECT * FROM pgr_primDFS( 'SELECT id, source, target, cost - FROM edge_table WHERE id > 18 ORDER BY id', + FROM edges WHERE id > 18 ORDER BY id', ARRAY[21, 45], 3 ); @@ -58,7 +58,7 @@ PREPARE prim3 AS SELECT * FROM pgr_primDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 21, 3 ); @@ -68,50 +68,50 @@ SELECT set_eq('prim3', -- PREPARE prim4 AS -SELECT seq, start_vid, depth, node, edge, agg_cost <= 3.5 +SELECT seq, start_vid, depth, edge, agg_cost <= 3.5 FROM pgr_primDFS( 'SELECT id, source, target, cost - FROM edge_table ORDER BY id', - ARRAY[21, 4], + FROM edges ORDER BY id', + ARRAY[21, 15], 3 ); SELECT set_eq('prim4', $$VALUES - (1, 4, 0, 4, -1, true), - (2, 4, 1, 9, 16, true), - (3, 4, 2, 6, 9, true), - (4, 4, 3, 3, 5, true), - (5, 4, 3, 5, 8, true), - (6, 4, 3, 11, 11, true), - (7, 21, 0, 21, -1, true) + (1, 15, 0, -1, true), + (2, 15, 1, 16, true), + (3, 15, 2, 9, true), + (4, 15, 3, 5, true), + (5, 15, 3, 8, true), + (6, 15, 3, 11, true), + (7, 21, 0, -1, true) $$, '4: Root not in Graph -> Only root vertex is returned, Root in graph -> spanning tree is returned'); -- PREPARE prim5 AS -SELECT seq, start_vid, depth, node, edge, depth <= 3 +SELECT seq, start_vid, depth, edge, depth <= 3 FROM pgr_primDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 0, 3 ); SELECT set_eq('prim5', $$VALUES - (1, 1, 0, 1, -1, true), - (2, 1, 1, 2, 1, true), - (3, 1, 2, 3, 2, true), - (4, 1, 3, 4, 3, true), - (5, 1, 3, 6, 5, true), - (6, 1, 2, 5, 4, true), - (7, 1, 3, 8, 7, true), - (8, 1, 3, 10, 10, true), - (9, 14, 0, 14, -1, true), - (10, 14, 1, 15, 17, true), - (11, 16, 0, 16, -1, true), - (12, 16, 1, 17, 18, true) + (1, 5, 0, -1, true), + (2, 5, 1, 1, true), + (3, 5, 2, 2, true), + (4, 5, 3, 3, true), + (5, 5, 3, 5, true), + (6, 5, 2, 4, true), + (7, 5, 3, 7, true), + (8, 5, 3, 10, true), + (9, 2, 0, -1, true), + (10, 2, 1, 17, true), + (11, 13, 0, -1, true), + (12, 13, 1, 18, true) $$, '5: root = 0 -> forest (with random root vertices)'); @@ -120,7 +120,7 @@ PREPARE prim6 AS SELECT * FROM pgr_primDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 4, -3 ); @@ -136,7 +136,7 @@ PREPARE prim7 AS SELECT * FROM pgr_primDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', ARRAY[4, 10], -3 ); @@ -150,69 +150,69 @@ PREPARE prim8 AS SELECT * FROM pgr_primDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4, 0 + FROM edges ORDER BY id', + 15, 0 ); SELECT set_eq('prim8', - $$VALUES (1, 0, 4, 4, -1, 0, 0) $$, + $$VALUES (1, 0, 15, 15, -1, 0, 0) $$, '8: 0 max_depth -> Only root vertex is returned'); -- PREPARE prim9 AS -SELECT seq, depth, start_vid, node, edge, depth <= 9223372036854775807 +SELECT seq, depth, edge, depth <= 9223372036854775807 FROM pgr_primDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', - 4 + FROM edges ORDER BY id', + 15 ); SELECT set_eq('prim9', $$VALUES - (1, 0, 4, 4, -1, true), - (2, 1, 4, 3, 3, true), - (3, 2, 4, 2, 2, true), - (4, 3, 4, 1, 1, true), - (5, 3, 4, 5, 4, true), - (6, 4, 4, 8, 7, true), - (7, 5, 4, 7, 6, true), - (8, 4, 4, 10, 10, true), - (9, 5, 4, 13, 14, true), - (10, 2, 4, 6, 5, true), - (11, 3, 4, 9, 9, true), - (12, 3, 4, 11, 11, true), - (13, 4, 4, 12, 13, true) + (1, 0, -1, true), + (2, 1, 3, true), + (3, 2, 2, true), + (4, 3, 1, true), + (5, 3, 4, true), + (6, 4, 7, true), + (7, 5, 6, true), + (8, 4, 10, true), + (9, 5, 14, true), + (10, 2, 5, true), + (11, 3, 9, true), + (12, 3, 11, true), + (13, 4, 13, true) $$, '9: default max_depth -> complete tree from root'); -- PREPARE prim10 AS -SELECT seq, start_vid, depth, node, edge, depth <= 9223372036854775807 +SELECT seq, start_vid, depth, edge, depth <= 9223372036854775807 FROM pgr_primDFS( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table ORDER BY id', + FROM edges ORDER BY id', 0 ); SELECT set_eq('prim10', $$VALUES - (1, 1, 0, 1,-1, true), - (2, 1, 1, 2, 1, true), - (3, 1, 2, 3, 2, true), - (4, 1, 3, 4, 3, true), - (5, 1, 3, 6, 5, true), - (6, 1, 4, 9, 9, true), - (7, 1, 4,11,11, true), - (8, 1, 5,12,13, true), - (9, 1, 2, 5, 4, true), - (10, 1, 3, 8, 7, true), - (11, 1, 4, 7, 6, true), - (12, 1, 3,10,10, true), - (13, 1, 4,13,14, true), - (14, 14, 0,14,-1, true), - (15, 14, 1,15,17, true), - (16, 16, 0,16,-1, true), - (17, 16, 1,17,18, true) + (1, 5, 0,-1, true), + (2, 5, 1, 1, true), + (3, 5, 2, 2, true), + (4, 5, 3, 3, true), + (5, 5, 3, 5, true), + (6, 5, 4, 9, true), + (7, 5, 4,11, true), + (8, 5, 5,13, true), + (9, 5, 2, 4, true), + (10, 5, 3, 7, true), + (11, 5, 4, 6, true), + (12, 5, 3,10, true), + (13, 5, 4,14, true), + (14, 2, 0,-1, true), + (15, 2, 1,17, true), + (16, 13, 0,-1, true), + (17, 13, 1,18, true) $$, '10: root = 0 -> forest (with random root vertices)'); diff --git a/pgtap/spanningTree/prim/primDFS/inner_query.pg b/pgtap/spanningTree/prim/primDFS/inner_query.pg index 2084776c157..2b5464a13bf 100644 --- a/pgtap/spanningTree/prim/primDFS/inner_query.pg +++ b/pgtap/spanningTree/prim/primDFS/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_primDFS(', ', 5)'); diff --git a/pgtap/spanningTree/prim/primDFS/no_crash_test.pg b/pgtap/spanningTree/prim/primDFS/no_crash_test.pg index 1215cab9fac..4de4c66bf61 100644 --- a/pgtap/spanningTree/prim/primDFS/no_crash_test.pg +++ b/pgtap/spanningTree/prim/primDFS/no_crash_test.pg @@ -19,14 +19,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(86); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_vertex AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -42,12 +42,12 @@ subs TEXT[]; BEGIN -- primDFS params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_primDFS', params, subs); @@ -60,13 +60,13 @@ BEGIN -- primDFS with depth params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5', '3' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; @@ -80,12 +80,12 @@ BEGIN -- primDFS Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_primDFS', params, subs); @@ -98,13 +98,13 @@ BEGIN -- primDFS with depth Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]', '3' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; diff --git a/pgtap/topologicalSort/inner_query.pg b/pgtap/topologicalSort/inner_query.pg index d5dfe9cc20c..d817dabb291 100644 --- a/pgtap/topologicalSort/inner_query.pg +++ b/pgtap/topologicalSort/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(24); SELECT style_dijkstra('pgr_topologicalsort(',')'); diff --git a/pgtap/topologicalSort/no_crash_test.pg b/pgtap/topologicalSort/no_crash_test.pg index 0c148222568..cd7578c73af 100644 --- a/pgtap/topologicalSort/no_crash_test.pg +++ b/pgtap/topologicalSort/no_crash_test.pg @@ -19,18 +19,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); -CREATE TABLE edge_table1 ( +CREATE TABLE edges1 ( id serial, source integer, target integer, cost double precision, reverse_cost double precision ); -INSERT INTO edge_table1 (source,target,cost,reverse_cost) VALUES ( 1, 2,0,0); -INSERT INTO edge_table1 (source,target,cost,reverse_cost) VALUES (2,3,0,0); +INSERT INTO edges1 (source,target,cost,reverse_cost) VALUES ( 1, 2,0,0); +INSERT INTO edges1 (source,target,cost,reverse_cost) VALUES (2,3,0,0); SELECT has_function('pgr_topologicalsort'); @@ -40,7 +40,7 @@ SELECT function_returns('pgr_topologicalsort', ARRAY['text'], 'setof record'); -- error SELECT throws_ok( 'SELECT * FROM pgr_topologicalsort( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table id < 2'', + ''SELECT id, source, target, cost, reverse_cost FROM edges id < 2'', 3 )','42883','function pgr_topologicalsort(unknown, integer) does not exist', '6: Documentation says it does not work with 1 flags'); @@ -48,7 +48,7 @@ SELECT throws_ok( SELECT lives_ok( 'SELECT * FROM pgr_topologicalsort( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 '' + ''SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 2 '' )', '4: Documentation says works with no flags'); @@ -65,7 +65,7 @@ SELECT pg_typeof(seq)::text AS t1, pg_typeof(sorted_v)::text AS t2 FROM ( SELECT * FROM pgr_topologicalsort( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2' + 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 2' ) ) AS a limit 1; diff --git a/pgtap/topology/analyzeGraph/edge_cases.pg b/pgtap/topology/analyzeGraph/edge_cases.pg index 526e30fea36..5ad6ce9a8dc 100644 --- a/pgtap/topology/analyzeGraph/edge_cases.pg +++ b/pgtap/topology/analyzeGraph/edge_cases.pg @@ -20,18 +20,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SET client_min_messages TO WARNING; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(3); -SELECT pgr_analyzegraph('edge_table', 0.000001); +SELECT pgr_createTopology('edges',0.001, 'geom', clean := true); +SELECT pgr_analyzegraph('edges', 0.000001, 'geom'); -SELECT is((SELECT count(*)::INTEGER cnt FROM edge_table_vertices_pgr WHERE chk = 1), 1, '1: One vertex has a problem'); -SELECT is((SELECT id::INTEGER FROM edge_table_vertices_pgr WHERE chk = 1), 15, '2: vertex #15 has the problem'); +SELECT is((SELECT count(*)::INTEGER cnt FROM edges_vertices_pgr WHERE chk = 1), 1, '1: One vertex has a problem'); +SELECT is((SELECT id::INTEGER FROM edges_vertices_pgr WHERE chk = 1), 10, '2: vertex #15 has the problem'); PREPARE q1 AS -SELECT cnt, count(*) AS M FROM edge_table_vertices_pgr GROUP BY cnt ORDER BY cnt; +SELECT cnt, count(*) AS M FROM edges_vertices_pgr GROUP BY cnt ORDER BY cnt; PREPARE vals AS VALUES (1, 7), (2,3), (3,5), (4,2); diff --git a/pgtap/topology/analyzeGraph/issue_1311.pg b/pgtap/topology/analyzeGraph/issue_1311.pg index 3b8daf1e5b9..9fc12c01ede 100644 --- a/pgtap/topology/analyzeGraph/issue_1311.pg +++ b/pgtap/topology/analyzeGraph/issue_1311.pg @@ -28,27 +28,27 @@ SET client_min_messages = WARNING; -- The following should be OK -- id INTEGER -SELECT * INTO edges2 FROM edge_table; -SELECT pgr_createVerticesTable('edges2'); +SELECT * INTO edges2 FROM edges; +SELECT pgr_createVerticesTable('edges2','geom'); ALTER TABLE edges2 ALTER COLUMN id SET DATA TYPE INTEGER; -SELECT is(pgr_analyzegraph('edges2', 0.000001), 'OK', '1'); +SELECT is(pgr_analyzegraph('edges2', 0.000001, 'geom'), 'OK', '1'); -- source INTEGER DROP TABLE IF EXISTS public.edges2; -SELECT * INTO edges2 FROM edge_table; +SELECT * INTO edges2 FROM edges; ALTER TABLE edges2 ALTER COLUMN source SET DATA TYPE INTEGER; -SELECT is(pgr_analyzegraph('edges2', 0.000001), 'OK', '1'); +SELECT is(pgr_analyzegraph('edges2', 0.000001, 'geom'), 'OK', '1'); -- target INTEGER DROP TABLE IF EXISTS public.edges2; -SELECT * INTO edges2 FROM edge_table; +SELECT * INTO edges2 FROM edges; ALTER TABLE edges2 ALTER COLUMN target SET DATA TYPE INTEGER; -SELECT is(pgr_analyzegraph('edges2', 0.000001), 'OK', '1'); +SELECT is(pgr_analyzegraph('edges2', 0.000001, 'geom'), 'OK', '1'); SELECT finish(); ROLLBACK; diff --git a/pgtap/topology/analyzeOneWay/edge_cases.pg b/pgtap/topology/analyzeOneWay/edge_cases.pg index f5e5ed92d12..1d06f3c5c62 100644 --- a/pgtap/topology/analyzeOneWay/edge_cases.pg +++ b/pgtap/topology/analyzeOneWay/edge_cases.pg @@ -22,9 +22,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SET client_min_messages TO WARNING; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(2); +DROP TABLE IF EXISTS edge_table; +SELECT *, NULL::TEXT AS dir INTO edge_table FROM edges; +SELECT pgr_createVerticesTable('edge_table', 'geom'); + +UPDATE edge_table SET +dir = CASE WHEN (cost>0 AND reverse_cost>0) THEN 'B' -- both ways + WHEN (cost>0 AND reverse_cost<0) THEN 'FT' -- direction of the LINESSTRING + WHEN (cost<0 AND reverse_cost>0) THEN 'TF' -- reverse direction of the LINESTRING + ELSE '' END; + SELECT pgr_analyzeOneway('edge_table', ARRAY['', 'B', 'TF'], ARRAY['', 'B', 'FT'], diff --git a/pgtap/topology/createTopology/edge_cases.pg b/pgtap/topology/createTopology/edge_cases.pg index 140ef7d594d..8eacffc5c5e 100644 --- a/pgtap/topology/createTopology/edge_cases.pg +++ b/pgtap/topology/createTopology/edge_cases.pg @@ -22,10 +22,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -SELECT * INTO edges2 FROM edge_table; +SELECT id, source, target, cost, reverse_cost, geom AS the_geom INTO edges2 FROM edges; UPDATE edges2 SET source = NULL, target = NULL; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(108); diff --git a/pgtap/topology/createTopology/incrementalCreateTopology.pg b/pgtap/topology/createTopology/incrementalCreateTopology.pg index d702e6abe57..bdbc036631c 100644 --- a/pgtap/topology/createTopology/incrementalCreateTopology.pg +++ b/pgtap/topology/createTopology/incrementalCreateTopology.pg @@ -25,7 +25,15 @@ BEGIN; SET client_min_messages TO warning; SELECT PLAN(31); -SELECT * INTO incr_table FROM edge_table WHERE id < 9; +SELECT id, source, target, cost, reverse_cost, geom AS the_geom, NULL::TEXT AS dir, x1,x2,y1,y2 +INTO incr_table FROM edges WHERE id < 9; +UPDATE incr_table SET +dir = CASE WHEN (cost>0 AND reverse_cost>0) THEN 'B' -- both ways + WHEN (cost>0 AND reverse_cost<0) THEN 'FT' -- direction of the LINESSTRING + WHEN (cost<0 AND reverse_cost>0) THEN 'TF' -- reverse direction of the LINESTRING + ELSE '' END; + + UPDATE incr_table SET source = NULL, target = NULL; -- unknown SELECT is((SELECT count(*)::INTEGER FROM incr_table), 8, 'initial table has 8 edges'); @@ -44,8 +52,13 @@ SELECT is((SELECT count(*)::INTEGER FROM incr_table_vertices_pgr WHERE chk is NU SELECT is((SELECT count(*)::INTEGER FROM incr_table_vertices_pgr WHERE ein is NULL), 8, '8 vertices are missing ein'); SELECT is((SELECT count(*)::INTEGER FROM incr_table_vertices_pgr WHERE eout is NULL), 8, '8 vertices are missing eout'); -INSERT INTO incr_table(id, dir, cost, reverse_cost, x1, y1, x2, y2, the_geom) -SELECT id, dir, cost, reverse_cost, x1, y1, x2, y2, the_geom FROM edge_table WHERE id >= 9; +INSERT INTO incr_table(id, cost, reverse_cost, x1, y1, x2, y2, the_geom) +SELECT id,cost, reverse_cost, x1, y1, x2, y2, geom FROM edges WHERE id >= 9; +UPDATE incr_table SET +dir = CASE WHEN (cost>0 AND reverse_cost>0) THEN 'B' -- both ways + WHEN (cost>0 AND reverse_cost<0) THEN 'FT' -- direction of the LINESSTRING + WHEN (cost<0 AND reverse_cost>0) THEN 'TF' -- reverse direction of the LINESTRING + ELSE '' END; SELECT is((SELECT count(*)::INTEGER FROM incr_table), 18, 'After inserting table has 18 edges'); SELECT is((SELECT count(*)::INTEGER FROM incr_table WHERE source is NULL), 10, '10 edges are missing source'); diff --git a/pgtap/topology/createVerticesTable/edge_cases.pg b/pgtap/topology/createVerticesTable/edge_cases.pg index b8d724d281b..4f7c8ccdef6 100644 --- a/pgtap/topology/createVerticesTable/edge_cases.pg +++ b/pgtap/topology/createVerticesTable/edge_cases.pg @@ -26,7 +26,8 @@ SELECT PLAN(95); SET client_min_messages = WARNING; -SELECT * INTO edges2 FROM edge_table; +SELECT id, source, target, cost, reverse_cost, geom AS the_geom INTO edges2 FROM edges; +UPDATE edges2 SET source = NULL, target = NULL; -- The following should be OK diff --git a/pgtap/topology/createVerticesTable/issue_1309.pg b/pgtap/topology/createVerticesTable/issue_1309.pg index 93b4384c98f..f86a3b4cdc1 100644 --- a/pgtap/topology/createVerticesTable/issue_1309.pg +++ b/pgtap/topology/createVerticesTable/issue_1309.pg @@ -28,7 +28,7 @@ SET client_min_messages = WARNING; -- The following should be OK -- id INTEGER -SELECT * INTO edges2 FROM edge_table; +SELECT id, source, target, cost, reverse_cost, geom AS the_geom INTO edges2 FROM edges; ALTER TABLE edges2 ALTER COLUMN id SET DATA TYPE INTEGER; SELECT is(pgr_createVerticesTable('edges2'), 'OK', '1'); @@ -37,7 +37,7 @@ DROP TABLE IF EXISTS public.edges2_vertices_pgr; -- source INTEGER DROP TABLE IF EXISTS public.edges2; -SELECT * INTO edges2 FROM edge_table; +SELECT id, source, target, cost, reverse_cost, geom AS the_geom INTO edges2 FROM edges; ALTER TABLE edges2 ALTER COLUMN source SET DATA TYPE INTEGER; SELECT is(pgr_createVerticesTable('edges2'), 'OK', '1'); @@ -46,7 +46,7 @@ DROP TABLE IF EXISTS public.edges2_vertices_pgr; -- target INTEGER DROP TABLE IF EXISTS public.edges2; -SELECT * INTO edges2 FROM edge_table; +SELECT id, source, target, cost, reverse_cost, geom AS the_geom INTO edges2 FROM edges; ALTER TABLE edges2 ALTER COLUMN target SET DATA TYPE INTEGER; SELECT is(pgr_createVerticesTable('edges2'), 'OK', '1'); diff --git a/pgtap/topology/degree/edge_cases.pg b/pgtap/topology/degree/edge_cases.pg index a82905dc539..a762c248286 100644 --- a/pgtap/topology/degree/edge_cases.pg +++ b/pgtap/topology/degree/edge_cases.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(12) ELSE plan(1) END; @@ -35,14 +35,10 @@ BEGIN END IF; PREPARE edges AS - SELECT id FROM edge_table; - - CREATE TABLE vertices AS - SELECT id, in_edges, out_edges - FROM pgr_extractVertices('SELECT id, the_geom AS geom FROM edge_table'); + SELECT id FROM edges; PREPARE edges1 AS - SELECT source FROM edge_table; + SELECT source FROM edges; PREPARE query_1 AS SELECT * FROM pgr_degree('edges', 'SELECT * FROM vertices'); @@ -70,10 +66,10 @@ BEGIN RETURN QUERY SELECT lives_ok('query_5', 'Missing column in_edges but usable'); PREPARE subedges AS - SELECT id FROM edge_table WHERE id < 17; + SELECT id FROM edges WHERE id < 17; PREPARE edges2 AS - SELECT source FROM edge_table WHERE id < 17; + SELECT source FROM edges WHERE id < 17; PREPARE query_7 AS SELECT * FROM pgr_degree('subedges', 'SELECT * FROM vertices'); diff --git a/pgtap/topology/degree/inner_query.pg b/pgtap/topology/degree/inner_query.pg index a417152d5d4..7af7277ccc6 100644 --- a/pgtap/topology/degree/inner_query.pg +++ b/pgtap/topology/degree/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(24) ELSE plan(2) END; @@ -34,7 +34,7 @@ BEGIN CREATE TABLE vert AS SELECT id, in_edges, out_edges - FROM pgr_extractVertices('SELECT id, the_geom AS geom FROM edge_table'); + FROM pgr_extractVertices('SELECT id, geom FROM edges'); RETURN QUERY SELECT test_anyInteger(fn, rest_sql, @@ -76,7 +76,7 @@ LANGUAGE plpgsql; SELECT chk_edges_sql('pgr_degree(', ', $q$ SELECT * FROM vert$q$)'); -SELECT chk_vertices_sql('pgr_degree($$SELECT id FROM edge_table$$,',')'); +SELECT chk_vertices_sql('pgr_degree($$SELECT id FROM edges$$,',')'); SELECT finish(); ROLLBACK; diff --git a/pgtap/topology/degree/no_crash_test.pg b/pgtap/topology/degree/no_crash_test.pg index 968a15fcc6d..d50b11e7dd6 100644 --- a/pgtap/topology/degree/no_crash_test.pg +++ b/pgtap/topology/degree/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(32) ELSE plan(2) END; PREPARE edges AS -SELECT id FROM edge_table; +SELECT id FROM edges; SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -42,13 +42,13 @@ BEGIN PREPARE vert AS SELECT id, in_edges, out_edges - FROM pgr_extractVertices('SELECT id, the_geom AS geom FROM edge_table'); + FROM pgr_extractVertices('SELECT id, geom FROM edges'); RETURN QUERY SELECT isnt_empty('vert', 'Should be not empty to tests be meaningful'); params = ARRAY[ - '$$SELECT * FROM edge_table$$', - '$$SELECT * FROM pgr_extractVertices($q$ SELECT id, the_geom AS geom FROM edge_table $q$) $$' + '$$SELECT * FROM edges$$', + '$$SELECT * FROM pgr_extractVertices($q$ SELECT id, geom FROM edges $q$) $$' ]::TEXT[]; subs = ARRAY[ @@ -64,10 +64,10 @@ BEGIN params[2] := '$$vert$$'; RETURN query SELECT * FROM no_crash_test('pgr_degree', params, subs); - params[2] := '$$SELECT id, in_edges FROM pgr_extractVertices($q$ SELECT id, the_geom AS geom FROM edge_table $q$) $$'; + params[2] := '$$SELECT id, in_edges FROM pgr_extractVertices($q$ SELECT id, geom FROM edges $q$) $$'; RETURN query SELECT * FROM no_crash_test('pgr_degree', params, subs); - params[2] := '$$SELECT id, out_edges FROM pgr_extractVertices($q$ SELECT id, the_geom AS geom FROM edge_table $q$) $$'; + params[2] := '$$SELECT id, out_edges FROM pgr_extractVertices($q$ SELECT id, geom FROM edges $q$) $$'; RETURN query SELECT * FROM no_crash_test('pgr_degree', params, subs); END diff --git a/pgtap/topology/extractVertices/edge_cases.pg b/pgtap/topology/extractVertices/edge_cases.pg index d8030cf817d..430727e708d 100644 --- a/pgtap/topology/extractVertices/edge_cases.pg +++ b/pgtap/topology/extractVertices/edge_cases.pg @@ -22,20 +22,20 @@ BEGIN; SET client_min_messages TO WARNING; SELECT plan(30); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -- PREPARE query_1 AS SELECT * FROM pgr_extractVertices( 'SELECT source - FROM edge_table' + FROM edges' ); PREPARE query_2 AS SELECT * FROM pgr_extractVertices( 'SELECT target - FROM edge_table' + FROM edges' ); SELECT throws_ok('query_1', 'P0001', 'Missing column', 'Incomlete data -> throws'); @@ -45,15 +45,15 @@ SELECT throws_ok('query_2', 'P0001', 'Missing column', 'Incomlete data -> throws PREPARE query_3 AS SELECT * FROM pgr_extractVertices( - 'SELECT ST_StartPoint(the_geom) AS startpoint - FROM edge_table' + 'SELECT ST_StartPoint(geom) AS startpoint + FROM edges' ); PREPARE query_4 AS SELECT * FROM pgr_extractVertices( - 'SELECT ST_EndPoint(the_geom) AS endpoint - FROM edge_table' + 'SELECT ST_EndPoint(geom) AS endpoint + FROM edges' ); SELECT throws_ok('query_3', 'P0001', 'Missing column', 'Incomlete data -> throws'); @@ -63,15 +63,15 @@ SELECT throws_ok('query_4', 'P0001', 'Missing column', 'Incomlete data -> throws PREPARE query_5 AS SELECT * FROM pgr_extractVertices( - 'SELECT source, the_geom AS geom - FROM edge_table' + 'SELECT source, geom + FROM edges' ); PREPARE query_6 AS SELECT * FROM pgr_extractVertices( - 'SELECT target, the_geom AS geom - FROM edge_table' + 'SELECT target, geom + FROM edges' ); SELECT lives_ok('query_5', 'geom column makes data complete'); @@ -81,15 +81,15 @@ SELECT lives_ok('query_6', 'geom column makes data complete'); PREPARE query_7 AS SELECT * FROM pgr_extractVertices( - 'SELECT ST_StartPoint(the_geom) AS startpoint, the_geom AS geom - FROM edge_table' + 'SELECT ST_StartPoint(geom) AS startpoint, geom + FROM edges' ); PREPARE query_8 AS SELECT * FROM pgr_extractVertices( - 'SELECT ST_EndPoint(the_geom) AS endpoint, the_geom AS geom - FROM edge_table' + 'SELECT ST_EndPoint(geom) AS endpoint, geom + FROM edges' ); SELECT lives_ok('query_7', 'geom column makes data complete'); @@ -98,144 +98,120 @@ SELECT lives_ok('query_8', 'geom column makes data complete'); -- SELECT set_eq( - $$SELECT count(*) FROM pgr_extractVertices( 'SELECT the_geom AS geom FROM edge_table')$$, + $$SELECT count(*) FROM pgr_extractVertices( 'SELECT geom FROM edges')$$, $$VALUES (17)$$, '17: Number of vertices extracted'); SELECT set_eq( - $$SELECT count(*) FROM pgr_extractVertices( 'SELECT ST_StartPoint(the_geom) AS startpoint, ST_EndPoint(the_geom) AS endpoint FROM edge_table')$$, + $$SELECT count(*) FROM pgr_extractVertices( 'SELECT ST_StartPoint(geom) AS startpoint, ST_EndPoint(geom) AS endpoint FROM edges')$$, $$VALUES (17)$$, '17: Number of vertices extracted'); SELECT set_eq( - $$SELECT count(*) FROM pgr_extractVertices( 'SELECT source, target FROM edge_table')$$, + $$SELECT count(*) FROM pgr_extractVertices( 'SELECT source, target FROM edges')$$, $$VALUES (17)$$, '17: Number of vertices extracted'); SELECT set_eq( - $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id, the_geom AS geom FROM edge_table')$$, + $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id, geom FROM edges')$$, $$VALUES (17)$$, '17: Number of vertices extracted'); SELECT set_eq( - $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id, ST_StartPoint(the_geom) AS startpoint, ST_EndPoint(the_geom) AS endpoint FROM edge_table')$$, + $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id, ST_StartPoint(geom) AS startpoint, ST_EndPoint(geom) AS endpoint FROM edges')$$, $$VALUES (17)$$, '17: Number of vertices extracted'); SELECT set_eq( - $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id, source, target FROM edge_table')$$, + $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id, source, target FROM edges')$$, $$VALUES (17)$$, '17: Number of vertices extracted'); --- The results with id - -SELECT * INTO result_table -FROM (VALUES - (1 , NULL::BIGINT[] , '{1}'::BIGINT[] , 2::FLOAT, 0::FLOAT, ST_GeomFromText('POINT(2 0)')), - - (2 , '{1}' , '{4,2}' , 2 , 1 , ST_GeomFromText('POINT(2 1)')), - (3 , '{2}' , '{5,3}' , 3 , 1 , ST_GeomFromText('POINT(3 1)')), - (4 , '{3}' , '{16}' , 4 , 1 , ST_GeomFromText('POINT(4 1)')), - (5 , '{7,4}' , '{8,10}' , 2 , 2 , ST_GeomFromText('POINT(2 2)')), - (6 , '{5,8}' , '{9,11}' , 3 , 2 , ST_GeomFromText('POINT(3 2)')), - (7 , NULL , '{6}' , 0 , 2 , ST_GeomFromText('POINT(0 2)')), - (8 , '{6}' , '{7}' , 1 , 2 , ST_GeomFromText('POINT(1 2)')), - (9 , '{9,16}' , '{15}' , 4 , 2 , ST_GeomFromText('POINT(4 2)')), - (10 , '{10}' , '{12,14}', 2 , 3 , ST_GeomFromText('POINT(2 3)')), - (11 , '{11,12}', '{13}' , 3 , 3 , ST_GeomFromText('POINT(3 3)')), - (12 , '{13,15}', NULL , 4 , 3 , ST_GeomFromText('POINT(4 3)')), - (13 , '{14}' , NULL , 2 , 4 , ST_GeomFromText('POINT(2 4)')), - (14 , NULL , '{17}' , 0.5 , 3.5 , ST_GeomFromText('POINT(0.5 3.5)')), - (15 , '{17}' , NULL , 1.999999999999 , 3.5 , ST_GeomFromText('POINT(1.999999999999 3.5)')), - (16 , NULL , '{18}' , 3.5 , 2.3 , ST_GeomFromText('POINT(3.5 2.3)')), - (17 , '{18}' , NULL , 3.5 , 4 , ST_GeomFromText('POINT(3.5 4)')) -) AS t(id, in_edges, out_edges, x, y, geom); - -- SELECT set_eq( $$ SELECT x, y, geom - FROM pgr_extractVertices($g$SELECT the_geom AS geom FROM edge_table$g$) + FROM pgr_extractVertices($g$SELECT geom AS geom FROM edges$g$) $$, - $$SELECT x, y, geom FROM result_table$$); + $$SELECT x, y, geom FROM vertices$$); SELECT set_eq( $$ SELECT unnest(out_edges), x, y, geom - FROM pgr_extractVertices($g$SELECT id, the_geom AS geom FROM edge_table$g$) + FROM pgr_extractVertices($g$SELECT id, geom AS geom FROM edges$g$) $$, - $$SELECT unnest(out_edges), x, y, geom FROM result_table$$); + $$SELECT unnest(out_edges), x, y, geom FROM vertices$$); SELECT set_eq( $$ SELECT unnest(in_edges), x, y, geom - FROM pgr_extractVertices($g$SELECT id, the_geom AS geom FROM edge_table$g$) + FROM pgr_extractVertices($g$SELECT id, geom AS geom FROM edges$g$) $$, - $$SELECT unnest(in_edges), x, y, geom FROM result_table$$); + $$SELECT unnest(in_edges), x, y, geom FROM vertices$$); -- SELECT set_eq( $$ SELECT x, y, geom - FROM pgr_extractVertices($g$SELECT ST_StartPoint(the_geom) AS startpoint, ST_EndPoint(the_geom) AS endpoint FROM edge_table$g$) + FROM pgr_extractVertices($g$SELECT ST_StartPoint(geom) AS startpoint, ST_EndPoint(geom) AS endpoint FROM edges$g$) $$, - $$SELECT x, y, geom FROM result_table$$); + $$SELECT x, y, geom FROM vertices$$); SELECT set_eq( $$ SELECT unnest(out_edges), x, y, geom - FROM pgr_extractVertices($g$SELECT id, ST_StartPoint(the_geom) AS startpoint, ST_EndPoint(the_geom) AS endpoint FROM edge_table$g$) + FROM pgr_extractVertices($g$SELECT id, ST_StartPoint(geom) AS startpoint, ST_EndPoint(geom) AS endpoint FROM edges$g$) $$, - $$SELECT unnest(out_edges), x, y, geom FROM result_table$$); + $$SELECT unnest(out_edges), x, y, geom FROM vertices$$); SELECT set_eq( $$ SELECT unnest(in_edges), x, y, geom - FROM pgr_extractVertices($g$SELECT id, ST_StartPoint(the_geom) AS startpoint, ST_EndPoint(the_geom) AS endpoint FROM edge_table$g$) + FROM pgr_extractVertices($g$SELECT id, ST_StartPoint(geom) AS startpoint, ST_EndPoint(geom) AS endpoint FROM edges$g$) $$, - $$SELECT unnest(in_edges), x, y, geom FROM result_table$$); + $$SELECT unnest(in_edges), x, y, geom FROM vertices$$); -- SELECT set_eq( $$ SELECT id - FROM pgr_extractVertices($g$SELECT source, target FROM edge_table$g$) + FROM pgr_extractVertices($g$SELECT source, target FROM edges$g$) $$, - $$SELECT id FROM result_table$$); + $$SELECT id FROM vertices$$); SELECT set_eq( $$ SELECT id, unnest(out_edges) - FROM pgr_extractVertices($g$SELECT id, source, target FROM edge_table$g$) + FROM pgr_extractVertices($g$SELECT id, source, target FROM edges$g$) $$, - $$SELECT id, unnest(out_edges) FROM result_table$$); + $$SELECT id, unnest(out_edges) FROM vertices$$); SELECT set_eq( $$ SELECT id, unnest(in_edges) - FROM pgr_extractVertices($g$SELECT id, source, target FROM edge_table$g$) + FROM pgr_extractVertices($g$SELECT id, source, target FROM edges$g$) $$, - $$SELECT id, unnest(in_edges) FROM result_table$$); + $$SELECT id, unnest(in_edges) FROM vertices$$); SELECT CASE WHEN NOT min_version('3.3.2') THEN skip(7, 'issue fixed on 3.3.2') ELSE collect_tap( lives_ok( - $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id::INTEGER, source, target FROM edge_table')$$, + $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id::INTEGER, source, target FROM edges')$$, 'id used with integer'), lives_ok( - $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id, source::INTEGER, target FROM edge_table')$$, + $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id, source::INTEGER, target FROM edges')$$, 'source used with integer'), lives_ok( - $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id, source, target::INTEGER FROM edge_table')$$, + $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id, source, target::INTEGER FROM edges')$$, 'target used with integer'), lives_ok( - $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id, source::INTEGER, target::INTEGER FROM edge_table')$$, + $$SELECT count(*) FROM pgr_extractVertices( 'SELECT id, source::INTEGER, target::INTEGER FROM edges')$$, 'source & target used with integer'), lives_ok( - $$SELECT count(*) FROM pgr_extractVertices( 'SELECT source::INTEGER, target FROM edge_table')$$, + $$SELECT count(*) FROM pgr_extractVertices( 'SELECT source::INTEGER, target FROM edges')$$, 'source used with integer, no id'), lives_ok( - $$SELECT count(*) FROM pgr_extractVertices( 'SELECT source, target::INTEGER FROM edge_table')$$, + $$SELECT count(*) FROM pgr_extractVertices( 'SELECT source, target::INTEGER FROM edges')$$, 'target used with integer, no id'), lives_ok( - $$SELECT count(*) FROM pgr_extractVertices( 'SELECT source::INTEGER, target::INTEGER FROM edge_table')$$, + $$SELECT count(*) FROM pgr_extractVertices( 'SELECT source::INTEGER, target::INTEGER FROM edges')$$, 'source & target used with integer, no id')) END; diff --git a/pgtap/topology/extractVertices/inner_query.pg b/pgtap/topology/extractVertices/inner_query.pg index e12b4a846b8..59d10ac9de8 100644 --- a/pgtap/topology/extractVertices/inner_query.pg +++ b/pgtap/topology/extractVertices/inner_query.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SET client_min_messages TO WARNING; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(84); CREATE OR REPLACE FUNCTION style_extract_normal(fn TEXT, rest_sql TEXT) @@ -33,11 +33,11 @@ RETURN QUERY SELECT test_anyInteger(fn, rest_sql, ARRAY['id', 'source', 'target'], 'id'); RETURN QUERY SELECT test_anyInteger(fn, rest_sql, - ARRAY['id', 'the_geom AS geom'], + ARRAY['id', 'geom AS geom'], 'id'); RETURN QUERY SELECT test_anyInteger(fn, rest_sql, - ARRAY['id', 'ST_StartPoint(the_geom) AS startpoint, ST_ENDPoint(the_geom) AS endpoint'], + ARRAY['id', 'ST_StartPoint(geom) AS startpoint, ST_ENDPoint(geom) AS endpoint'], 'id'); RETURN QUERY SELECT test_anyInteger(fn, rest_sql, @@ -69,11 +69,11 @@ RETURN QUERY SELECT test_anyNumerical(fn, rest_sql, ARRAY['id', 'source', 'target'], 'id'); RETURN QUERY SELECT test_anyNumerical(fn, rest_sql, - ARRAY['id', 'the_geom AS geom'], + ARRAY['id', 'geom AS geom'], 'id'); RETURN QUERY SELECT test_anyNumerical(fn, rest_sql, - ARRAY['id', 'ST_StartPoint(the_geom) AS startpoint, ST_ENDPoint(the_geom) AS endpoint'], + ARRAY['id', 'ST_StartPoint(geom) AS startpoint, ST_ENDPoint(geom) AS endpoint'], 'id'); RETURN QUERY SELECT test_anyNumerical(fn, rest_sql, diff --git a/pgtap/topology/extractVertices/no_crash_test.pg b/pgtap/topology/extractVertices/no_crash_test.pg index d68e62d8d54..88e3518d94d 100644 --- a/pgtap/topology/extractVertices/no_crash_test.pg +++ b/pgtap/topology/extractVertices/no_crash_test.pg @@ -20,26 +20,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SET client_min_messages TO WARNING; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); PREPARE edges AS -SELECT the_geom AS geom FROM edge_table; +SELECT geom FROM edges; PREPARE edges1 AS -SELECT id, the_geom AS geom FROM edge_table; +SELECT id, geom FROM edges; PREPARE edges2 AS -SELECT ST_startPoint(the_geom) AS startpoint, ST_startPoint(the_geom) AS endpoint FROM edge_table; +SELECT ST_startPoint(geom) AS startpoint, ST_startPoint(geom) AS endpoint FROM edges; PREPARE edges3 AS -SELECT id, ST_startPoint(the_geom) AS startpoint, ST_startPoint(the_geom) AS endpoint FROM edge_table; +SELECT id, ST_startPoint(geom) AS startpoint, ST_startPoint(geom) AS endpoint FROM edges; PREPARE edges4 AS -SELECT source, target FROM edge_table; +SELECT source, target FROM edges; PREPARE edges5 AS -SELECT id, source, target FROM edge_table; +SELECT id, source, target FROM edges; SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); SELECT isnt_empty('edges1', 'Should be not empty to tests be meaningful'); @@ -58,7 +58,7 @@ subs TEXT[]; BEGIN -- with geometry params = ARRAY[ - '$$SELECT the_geom AS geom FROM edge_table$$' + '$$SELECT geom FROM edges$$' ]::TEXT[]; subs = ARRAY[ @@ -72,7 +72,7 @@ BEGIN -- with geometry and id params = ARRAY[ - '$$SELECT id, the_geom AS geom FROM edge_table$$' + '$$SELECT id, geom FROM edges$$' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_extractVertices', params, subs); @@ -82,7 +82,7 @@ BEGIN -- with startpoint & endpoint params = ARRAY[ - '$$SELECT ST_startPoint(the_geom) AS startpoint, ST_startPoint(the_geom) AS endpoint FROM edge_table$$' + '$$SELECT ST_startPoint(geom) AS startpoint, ST_startPoint(geom) AS endpoint FROM edges$$' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_extractVertices', params, subs); @@ -92,7 +92,7 @@ BEGIN -- with startpoint & endpoint and id params = ARRAY[ - '$$SELECT id, ST_startPoint(the_geom) AS startpoint, ST_startPoint(the_geom) AS endpoint FROM edge_table$$' + '$$SELECT id, ST_startPoint(geom) AS startpoint, ST_startPoint(geom) AS endpoint FROM edges$$' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_extractVertices', params, subs); @@ -102,7 +102,7 @@ BEGIN -- with source & target params = ARRAY[ - '$$SELECT source, target FROM edge_table$$' + '$$SELECT source, target FROM edges$$' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_extractVertices', params, subs); @@ -112,7 +112,7 @@ BEGIN -- with source & target & id params = ARRAY[ - '$$SELECT id, source, target FROM edge_table$$' + '$$SELECT id, source, target FROM edges$$' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_extractVertices', params, subs); diff --git a/pgtap/topology/nodeNetwork/edge_cases.pg b/pgtap/topology/nodeNetwork/edge_cases.pg index 1e67152dba9..8391c58ec5b 100644 --- a/pgtap/topology/nodeNetwork/edge_cases.pg +++ b/pgtap/topology/nodeNetwork/edge_cases.pg @@ -23,7 +23,7 @@ BEGIN; -- create 4x4 grid of overlapping lines horizontal and vertical -- set the even numbered ones with dir='FT' and the odd ones 'TF' -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(41); SET client_min_messages = WARNING; diff --git a/pgtap/topology/nodeNetwork/issue_1009.pg b/pgtap/topology/nodeNetwork/issue_1009.pg index b550e34a1e1..6fb7d896ab7 100644 --- a/pgtap/topology/nodeNetwork/issue_1009.pg +++ b/pgtap/topology/nodeNetwork/issue_1009.pg @@ -21,7 +21,7 @@ BEGIN; -- node the network -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(20); SET client_min_messages = WARNING; diff --git a/pgtap/topology/nodeNetwork/issue_1074.pg b/pgtap/topology/nodeNetwork/issue_1074.pg index 41c37932c90..e850c454002 100644 --- a/pgtap/topology/nodeNetwork/issue_1074.pg +++ b/pgtap/topology/nodeNetwork/issue_1074.pg @@ -22,7 +22,7 @@ BEGIN; -- node the network -- create 2 test cases with overlapping lines, one with crossing lines and one with touching (but no crossing) lines -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(22); SET client_min_messages = WARNING; diff --git a/pgtap/topology/nodeNetwork/issue_1336.pg b/pgtap/topology/nodeNetwork/issue_1336.pg index 729792626ba..02ad9557a49 100644 --- a/pgtap/topology/nodeNetwork/issue_1336.pg +++ b/pgtap/topology/nodeNetwork/issue_1336.pg @@ -22,7 +22,7 @@ BEGIN; -- node the network -- create 2 test cases with overlapping lines, one with crossing lines and one with touching (but no crossing) lines -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(20); SET client_min_messages = WARNING; diff --git a/pgtap/transitiveClosure/inner_query.pg b/pgtap/transitiveClosure/inner_query.pg index 2c8620c1cc1..a089cab56a0 100644 --- a/pgtap/transitiveClosure/inner_query.pg +++ b/pgtap/transitiveClosure/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(54); SELECT style_dijkstra('pgr_transitiveclosure(',')'); diff --git a/pgtap/transitiveClosure/no_crash_test.pg b/pgtap/transitiveClosure/no_crash_test.pg index ae65f2f9ddc..94acafadd73 100644 --- a/pgtap/transitiveClosure/no_crash_test.pg +++ b/pgtap/transitiveClosure/no_crash_test.pg @@ -19,14 +19,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(2); -- flags -- error SELECT throws_ok( 'SELECT * FROM pgr_transitiveclosure( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table id < 2'', + ''SELECT id, source, target, cost, reverse_cost FROM edges id < 2'', 3 )','42883','function pgr_transitiveclosure(unknown, integer) does not exist', '6: Documentation says it does not work with 1 flags'); @@ -34,7 +34,7 @@ SELECT throws_ok( SELECT lives_ok( 'SELECT * FROM pgr_transitiveclosure( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 '' + ''SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 2 '' )', '4: Documentation says works with no flags'); diff --git a/pgtap/traversal/binaryBreadthFirstSearch/edge_cases/edge_cases.pg b/pgtap/traversal/binaryBreadthFirstSearch/edge_cases/edge_cases.pg index 4df9ddc0f91..4b355903e32 100644 --- a/pgtap/traversal/binaryBreadthFirstSearch/edge_cases/edge_cases.pg +++ b/pgtap/traversal/binaryBreadthFirstSearch/edge_cases/edge_cases.pg @@ -19,61 +19,63 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(18); --- 0 edges tests +UPDATE edges SET cost = 0 WHERE id IN(1, 4, 7, 12, 15, 16, 17, 18); +UPDATE edges SET reverse_cost = 0 WHERE id IN(1, 3, 4, 7, 15, 16, 17, 18); +-- 0 edges tests -- directed graph SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks where id>18 '', 5, 2)', '2'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges where id>18 '', 5, 2)', '2'); SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks where id>18 '',array[5], 3)','3'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges where id>18 '',array[5], 3)','3'); SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks where id>18 '',5, array[3, 7])','3'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges where id>18 '',5, array[3, 7])','3'); SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks where id>18 '',array[2,5], array[3,7])', '4'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges where id>18 '',array[2,5], array[3,7])', '4'); -- undirected graph SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks where id>18 '', 5, 2, directed := false)', '5'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges where id>18 '', 5, 2, directed := false)', '5'); SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks where id>18 '',array[5], 3, directed := false)','6'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges where id>18 '',array[5], 3, directed := false)','6'); SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks where id>18 '',5, array[3, 7], directed := false)','7'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges where id>18 '',5, array[3, 7], directed := false)','7'); SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks where id>18 '',array[2,5], array[3,7], directed := false)', '8'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges where id>18 '',array[2,5], array[3,7], directed := false)', '8'); --- -- vertex not present in graph tests +-- -- vertex not present in graph tests -- directed graph SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks'', -5, 2)', '2'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges'', -5, 2)', '2'); SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks'',array[5], -3)','3'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges'',array[5], -3)','3'); SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks'',5, array[-3, -7])','3'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges'',5, array[-3, -7])','3'); SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks'',array[-2,-5], array[3,7])', '4'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges'',array[-2,-5], array[3,7])', '4'); -- undirected graph SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks'', 5, -2, directed := false)', '5'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges'', 5, -2, directed := false)', '5'); SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks'',array[-5], 3, directed := false)','6'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges'',array[-5], 3, directed := false)','6'); SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks'',-5, array[-3, 7], directed := false)','7'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges'',-5, array[-3, 7], directed := false)','7'); SELECT is_empty(' -SELECT * from pgr_binaryBreadthFirstSearch(''SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost from roadworks'',array[-2,-5], array[-3,-7], directed := false)', '8'); +SELECT * from pgr_binaryBreadthFirstSearch(''SELECT * from edges'',array[-2,-5], array[-3,-7], directed := false)', '8'); -SELECT * INTO roadworks_invalid_1 FROM roadworks; -UPDATE roadworks_invalid_1 SET road_work = 5 WHERE id = 1; +SELECT * INTO edges_invalid_1 FROM edges; +UPDATE edges_invalid_1 SET cost = 5 WHERE id = 1; PREPARE errorTestManyWeights AS SELECT * FROM pgr_binaryBreadthFirstSearch( - 'SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost - FROM roadworks_invalid_1', + 'SELECT * + FROM edges_invalid_1', 4, 6 ); @@ -83,15 +85,15 @@ SELECT throws_ok('errorTestManyWeights', 'Graph Condition Failed: Graph should have atmost two distinct non-negative edge costs! If there are exactly two distinct edge costs, one of them must equal zero!', '17: Graph has more than 2 distinct weights'); -SELECT * INTO roadworks_invalid_2 FROM roadworks; -UPDATE roadworks_invalid_2 SET road_work = 2 WHERE road_work = 0; -UPDATE roadworks_invalid_2 SET reverse_road_work = 2 WHERE reverse_road_work = 0; +SELECT * INTO edges_invalid_2 FROM edges; +UPDATE edges_invalid_2 SET cost = 2 WHERE cost = 0; +UPDATE edges_invalid_2 SET reverse_cost = 2 WHERE reverse_cost = 0; PREPARE errorTestNoZeroWeight AS SELECT * FROM pgr_binaryBreadthFirstSearch( - 'SELECT id, source, target, road_work as cost, reverse_road_work as reverse_cost - FROM roadworks_invalid_2', + 'SELECT * + FROM edges_invalid_2', 4, 6 ); @@ -103,4 +105,4 @@ SELECT throws_ok('errorTestNoZeroWeight', SELECT * FROM finish(); -ROLLBACK; +ROLLBACK; diff --git a/pgtap/traversal/binaryBreadthFirstSearch/edge_cases/empty_combinations_empty_result.pg b/pgtap/traversal/binaryBreadthFirstSearch/edge_cases/empty_combinations_empty_result.pg index 05af6b22994..3d87f90f2a6 100644 --- a/pgtap/traversal/binaryBreadthFirstSearch/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/traversal/binaryBreadthFirstSearch/edge_cases/empty_combinations_empty_result.pg @@ -34,8 +34,8 @@ BEGIN RETURN query SELECT is_empty( 'SELECT seq, path_seq, node, edge, cost, agg_cost FROM pgr_binaryBreadthFirstSearch( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', - ''SELECT * FROM combinations_table WHERE source IN (-1)'' ) ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', + ''SELECT * FROM combinations WHERE source IN (-1)'' ) ' ); RETURN; END diff --git a/pgtap/traversal/binaryBreadthFirstSearch/edge_cases/many_to_many_eq_combinations.pg b/pgtap/traversal/binaryBreadthFirstSearch/edge_cases/many_to_many_eq_combinations.pg index 8cf4822397b..92f7b337c0f 100644 --- a/pgtap/traversal/binaryBreadthFirstSearch/edge_cases/many_to_many_eq_combinations.pg +++ b/pgtap/traversal/binaryBreadthFirstSearch/edge_cases/many_to_many_eq_combinations.pg @@ -21,7 +21,7 @@ BEGIN; SELECT plan(1); -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); CREATE OR REPLACE FUNCTION foo( sql_TestFunction TEXT, cant INTEGER default 18 ) RETURNS SETOF TEXT AS @@ -56,11 +56,11 @@ BEGIN sql_Combinations := trim(trailing ',' from sql_Combinations); sql_Many := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ARRAY[' || sql_Many ||'], ARRAY[' || sql_Many || '] ) '); sql_Combinations := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ''SELECT * FROM (VALUES' || sql_Combinations ||') AS combinations (source, target)'' ) '); RETURN query SELECT set_eq( sql_Many, sql_Combinations ); diff --git a/pgtap/traversal/binaryBreadthFirstSearch/inner_query.pg b/pgtap/traversal/binaryBreadthFirstSearch/inner_query.pg index 277586498c1..7ee766e7239 100644 --- a/pgtap/traversal/binaryBreadthFirstSearch/inner_query.pg +++ b/pgtap/traversal/binaryBreadthFirstSearch/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(282) ELSE plan(218) END; -- ONE TO ONE @@ -36,8 +36,8 @@ CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_dijkstra('pgr_binaryBreadthFirstSearch(', ', $$SELECT * FROM combinations_table$$)'); - RETURN QUERY SELECT innerquery_combinations('pgr_binaryBreadthFirstSearch($$SELECT * FROM edge_table$$,',')'); + RETURN QUERY SELECT style_dijkstra('pgr_binaryBreadthFirstSearch(', ', $$SELECT * FROM combinations$$)'); + RETURN QUERY SELECT innerquery_combinations('pgr_binaryBreadthFirstSearch($$SELECT * FROM edges$$,',')'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/traversal/binaryBreadthFirstSearch/no_crash_test.pg b/pgtap/traversal/binaryBreadthFirstSearch/no_crash_test.pg index 7fa1908a6e2..397e184e34d 100644 --- a/pgtap/traversal/binaryBreadthFirstSearch/no_crash_test.pg +++ b/pgtap/traversal/binaryBreadthFirstSearch/no_crash_test.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (97) ELSE plan(84) END; diff --git a/pgtap/traversal/breadthFirstSearch/edge_cases.pg b/pgtap/traversal/breadthFirstSearch/edge_cases.pg index d0fd496d275..d34fc7da853 100644 --- a/pgtap/traversal/breadthFirstSearch/edge_cases.pg +++ b/pgtap/traversal/breadthFirstSearch/edge_cases.pg @@ -19,71 +19,71 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(29); -- 0 edges tests -SELECT is_empty(' SELECT id, source, target, cost > 0, reverse_cost > 0 from edge_table where id>18 ','1'); +SELECT is_empty(' SELECT id, source, target, cost > 0, reverse_cost > 0 from edges where id>18 ','1'); -- directed graph SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '', 5)', '2'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges where id>18 '', 5)', '2'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '',array[5])','3'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges where id>18 '',array[5])','3'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '',array[2,5])', '4'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges where id>18 '',array[2,5])', '4'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '', 5, 2)', '5'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges where id>18 '', 5, 2)', '5'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '',array[5], 2)','6'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges where id>18 '',array[5], 2)','6'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '',array[2,5], 2)', '7'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges where id>18 '',array[2,5], 2)', '7'); -- undirected graph SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '', 5, directed := false)', '8'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges where id>18 '', 5, directed := false)', '8'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '',array[5], directed := false)','9'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges where id>18 '',array[5], directed := false)','9'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '',array[2,5], directed := false)', '10'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges where id>18 '',array[2,5], directed := false)', '10'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '', 5, 2, directed := false)', '11'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges where id>18 '', 5, 2, directed := false)', '11'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '',array[5], 2, directed := false)','12'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges where id>18 '',array[5], 2, directed := false)','12'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table where id>18 '',array[2,5], 2, directed := false)', '13'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges where id>18 '',array[2,5], 2, directed := false)', '13'); -- vertex not present in graph tests -- directed graph SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table'', -10)', '14'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges'', -10)', '14'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table'',array[-10])','15'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges'',array[-10])','15'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table'',array[20,-10])', '16'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges'',array[20,-10])', '16'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table'', -10, 2)', '17'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges'', -10, 2)', '17'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table'',array[-10], 2)','18'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges'',array[-10], 2)','18'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table'',array[20,-10], 2)', '19'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges'',array[20,-10], 2)', '19'); -- undirected graph SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table'', -10, directed := false)', '20'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges'', -10, directed := false)', '20'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table'',array[-10], directed := false)','21'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges'',array[-10], directed := false)','21'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table'',array[20,-10], directed := false)', '22'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges'',array[20,-10], directed := false)', '22'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table'', -10, 2, directed := false)', '23'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges'', -10, 2, directed := false)', '23'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table'',array[-10], 2, directed := false)','24'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges'',array[-10], 2, directed := false)','24'); SELECT is_empty(' -SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edge_table'',array[20,-10], 2, directed := false)', '25'); +SELECT * from pgr_breadthFirstSearch(''SELECT id, source, target, cost, reverse_cost from edges'',array[20,-10], 2, directed := false)', '25'); -- negative depth tests @@ -91,7 +91,7 @@ PREPARE breadthFirstSearch26 AS SELECT * FROM pgr_breadthFirstSearch( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table', + FROM edges', 4, -3 ); @@ -106,7 +106,7 @@ PREPARE breadthFirstSearch27 AS SELECT * FROM pgr_breadthFirstSearch( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table', + FROM edges', ARRAY[4, 10], -3 ); @@ -119,7 +119,7 @@ PREPARE breadthFirstSearch28 AS SELECT * FROM pgr_breadthFirstSearch( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table', + FROM edges', 4, -3, directed := false ); @@ -134,7 +134,7 @@ PREPARE breadthFirstSearch29 AS SELECT * FROM pgr_breadthFirstSearch( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table', + FROM edges', ARRAY[4, 10], -3, directed := false ); diff --git a/pgtap/traversal/breadthFirstSearch/inner_query.pg b/pgtap/traversal/breadthFirstSearch/inner_query.pg index 6ed9a74fb42..ff22175f6d9 100644 --- a/pgtap/traversal/breadthFirstSearch/inner_query.pg +++ b/pgtap/traversal/breadthFirstSearch/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(108); -- SINGLE VERTEX diff --git a/pgtap/traversal/breadthFirstSearch/no_crash_test.pg b/pgtap/traversal/breadthFirstSearch/no_crash_test.pg index c27f0957f9c..9ae6eae03ff 100644 --- a/pgtap/traversal/breadthFirstSearch/no_crash_test.pg +++ b/pgtap/traversal/breadthFirstSearch/no_crash_test.pg @@ -19,14 +19,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(86); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_vertex AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -42,12 +42,12 @@ subs TEXT[]; BEGIN -- breadthFirstSearch params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_breadthFirstSearch', params, subs); @@ -60,13 +60,13 @@ BEGIN -- breadthFirstSearch with depth params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5', '3' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; @@ -80,12 +80,12 @@ BEGIN -- breadthFirstSearch Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_breadthFirstSearch', params, subs); @@ -98,13 +98,13 @@ BEGIN -- breadthFirstSearch with depth Multiple vertices params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[5,3]', '3' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL::INTEGER' ]::TEXT[]; diff --git a/pgtap/traversal/depthFirstSearch/edge_cases/copmare_BFS.pg b/pgtap/traversal/depthFirstSearch/edge_cases/copmare_BFS.pg index 1f49bdb52ac..c5f6864a7c6 100644 --- a/pgtap/traversal/depthFirstSearch/edge_cases/copmare_BFS.pg +++ b/pgtap/traversal/depthFirstSearch/edge_cases/copmare_BFS.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (16) ELSE plan(1) END; CREATE OR REPLACE FUNCTION edge_cases() @@ -37,7 +37,7 @@ END IF; PREPARE sample_data AS SELECT id, source, target, cost, reverse_cost -FROM edge_table; +FROM edges; -- max_depth 1 cases (directed) diff --git a/pgtap/traversal/depthFirstSearch/edge_cases/directed.pg b/pgtap/traversal/depthFirstSearch/edge_cases/directed.pg index 7c39ed2f8d6..832ebec12ad 100644 --- a/pgtap/traversal/depthFirstSearch/edge_cases/directed.pg +++ b/pgtap/traversal/depthFirstSearch/edge_cases/directed.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT CASE WHEN min_version('3.2.0') THEN plan (18) ELSE plan(1) END; CREATE OR REPLACE FUNCTION edge_cases() @@ -39,7 +39,7 @@ END IF; PREPARE q1 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id > 18 ORDER BY id; RETURN QUERY @@ -64,12 +64,12 @@ SELECT set_eq('depthFirstSearch2', PREPARE q3 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table ORDER BY id; +FROM edges ORDER BY id; RETURN QUERY SELECT is_empty( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table + FROM edges WHERE source = 100 OR target = 100', '3: Vertex 100 does not exist in sample data' ); @@ -109,27 +109,27 @@ SELECT throws_ok('depthFirstSearch5', -- 1 vertex test PREPARE q6 AS -SELECT id, source, 2 AS target, cost, reverse_cost -FROM edge_table -WHERE id = 2 ORDER BY id; +SELECT id, source, source AS target, cost, reverse_cost +FROM edges +WHERE id = 2; RETURN QUERY SELECT set_eq('q6', - $$VALUES (2, 2, 2, -1, 1)$$, - '6: Graph with only vertex 2' + $$VALUES (2, 6, 6, -0.996,1.004)$$, + '6: v<-v' ); PREPARE depthFirstSearch7 AS SELECT * FROM pgr_depthFirstSearch( 'q6', - 2 + 6, directed => true ); RETURN QUERY SELECT set_eq('depthFirstSearch7', - $$VALUES (1, 0, 2, 2, -1, 0, 0)$$, - '7: 1 vertex test' + $$VALUES (1, 0, 6, 6, -1, 0, 0)$$, + '7: v<-v' ); @@ -138,42 +138,42 @@ SELECT set_eq('depthFirstSearch7', PREPARE q8 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table -WHERE id = 5 ORDER BY id; +FROM edges +WHERE id = 5; RETURN QUERY SELECT set_eq('q8', - $$VALUES (5, 3, 6, 1, -1)$$, - '8: Graph with two vertices 3 and 6 and edge from 3 to 6' + $$VALUES (5, 10, 11, 1.025,-0.975)$$, + '8: u->v' ); PREPARE depthFirstSearch9 AS SELECT * FROM pgr_depthFirstSearch( 'q8', - ARRAY[3, 6] + ARRAY[10, 11], directed => true ); PREPARE depthFirstSearch10 AS SELECT * FROM pgr_depthFirstSearch( 'q8', - ARRAY[3, 6], max_depth => 0 + ARRAY[10, 11], directed => true, max_depth => 0 ); PREPARE depthFirstSearch11 AS SELECT * FROM pgr_depthFirstSearch( 'q8', - ARRAY[3, 6], max_depth => 1 + ARRAY[10, 11], directed => true, max_depth => 1 ); RETURN QUERY SELECT set_eq('depthFirstSearch9', $$VALUES - (1, 0, 3, 3, -1, 0, 0), - (2, 1, 3, 6, 5, 1, 1), - (3, 0, 6, 6, -1, 0, 0) + (1, 0, 10, 10, -1, 0, 0), + (2, 1, 10, 11, 5, 1.025,1.025), + (3, 0, 11, 11, -1, 0, 0) $$, '9: Two vertices tests' ); @@ -181,8 +181,8 @@ SELECT set_eq('depthFirstSearch9', RETURN QUERY SELECT set_eq('depthFirstSearch10', $$VALUES - (1, 0, 3, 3, -1, 0, 0), - (2, 0, 6, 6, -1, 0, 0) + (1, 0, 10, 10, -1, 0, 0), + (2, 0, 11, 11, -1, 0, 0) $$, '10: Two vertices tests' ); @@ -190,9 +190,9 @@ SELECT set_eq('depthFirstSearch10', RETURN QUERY SELECT set_eq('depthFirstSearch11', $$VALUES - (1, 0, 3, 3, -1, 0, 0), - (2, 1, 3, 6, 5, 1, 1), - (3, 0, 6, 6, -1, 0, 0) + (1, 0, 10, 10, -1, 0, 0), + (2, 1, 10, 11, 5, 1.025,1.025), + (3, 0, 11, 11, -1, 0, 0) $$, '11: Two vertices tests' ); @@ -233,14 +233,14 @@ PREPARE depthFirstSearch13 AS SELECT * FROM pgr_depthFirstSearch( 'q12', - ARRAY[3, 6, 8] + ARRAY[3, 6, 8], directed => true ); PREPARE depthFirstSearch14 AS SELECT * FROM pgr_depthFirstSearch( 'q12', - ARRAY[3, 6, 8], max_depth => 1 + ARRAY[3, 6, 8], directed => true, max_depth => 1 ); @@ -280,75 +280,75 @@ SELECT set_eq('depthFirstSearch14', PREPARE q15 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE (id >= 10 AND id <= 12) OR id = 8 ORDER BY id; RETURN QUERY SELECT set_eq('q15', $$VALUES - (8, 5, 6, 1, 1), - (10, 5, 10, 1, 1), - (11, 6, 11, 1, -1), - (12, 10, 11, 1, -1) + (11,11,12,1.121,-0.879), + (8,7,11,1.064,1.064), + (10,7,8,1.1,1.1), + (12,8,12,1.144,-0.856) $$, - '15: Graph with vertices 5, 6, 10 and 11' -); + 'q15: 8<->7<->11->12->8' + ); PREPARE depthFirstSearch16 AS SELECT * FROM pgr_depthFirstSearch( 'q15', - ARRAY[5, 6, 10, 11] + ARRAY[7, 8, 11, 12], directed => true ); PREPARE depthFirstSearch17 AS SELECT * FROM pgr_depthFirstSearch( 'q15', - ARRAY[5, 6, 10, 11], max_depth => 1 + ARRAY[7, 8, 11, 12], directed => true, max_depth => 1 ); PREPARE depthFirstSearch18 AS SELECT * FROM pgr_depthFirstSearch( 'q15', - ARRAY[5, 6, 10, 11], max_depth => 2 + ARRAY[7, 8, 11, 12], directed => true, max_depth => 2 ); RETURN QUERY SELECT set_eq('depthFirstSearch16', $$VALUES - (1, 0, 5, 5, -1, 0, 0), - (2, 1, 5, 6, 8, 1, 1), - (3, 2, 5, 11, 11, 1, 2), - (4, 1, 5, 10, 10, 1, 1), - (5, 0, 6, 6, -1, 0, 0), - (6, 1, 6, 5, 8, 1, 1), - (7, 2, 6, 10, 10, 1, 2), - (8, 3, 6, 11, 12, 1, 3), - (9, 0, 10, 10, -1, 0, 0), - (10, 1, 10, 5, 10, 1, 1), - (11, 2, 10, 6, 8, 1, 2), - (12, 3, 10, 11, 11, 1, 3), - (13, 0, 11, 11, -1, 0, 0) + (1,0,7,7,-1,0,0), + (2,1,7,11,8,1.064,1.064), + (3,2,7,12,11,1.121,2.185), + (4,1,7,8,10,1.1,1.1), + (5,0,8,8,-1,0,0), + (6,1,8,7,10,1.1,1.1), + (7,2,8,11,8,1.064,2.164), + (8,3,8,12,11,1.121,3.285), + (9,0,11,11,-1,0,0), + (10,1,11,7,8,1.064,1.064), + (11,2,11,8,10,1.1,2.164), + (13,0,12,12,-1,0,0), + (12,3,11,12,12,1.144,3.308) $$, '16: 4 vertices tests' -); + ); RETURN QUERY SELECT set_eq('depthFirstSearch17', $$VALUES - (1, 0, 5, 5, -1, 0, 0), - (2, 1, 5, 6, 8, 1, 1), - (3, 1, 5, 10, 10, 1, 1), - (4, 0, 6, 6, -1, 0, 0), - (5, 1, 6, 5, 8, 1, 1), - (6, 1, 6, 11, 11, 1, 1), - (7, 0, 10, 10, -1, 0, 0), - (8, 1, 10, 5, 10, 1, 1), - (9, 1, 10, 11, 12, 1, 1), - (10, 0, 11, 11, -1, 0, 0) + (1,0,7,7,-1,0,0), + (2,1,7,11,8,1.064,1.064), + (3,1,7,8,10,1.1,1.1), + (4,0,8,8,-1,0,0), + (5,1,8,7,10,1.1,1.1), + (6,1,8,12,12,1.144,1.144), + (7,0,11,11,-1,0,0), + (8,1,11,7,8,1.064,1.064), + (9,1,11,12,11,1.121,1.121), + (10,0,12,12,-1,0,0) $$, '17: 4 vertices tests' ); @@ -356,19 +356,19 @@ SELECT set_eq('depthFirstSearch17', RETURN QUERY SELECT set_eq('depthFirstSearch18', $$VALUES - (1, 0, 5, 5, -1, 0, 0), - (2, 1, 5, 6, 8, 1, 1), - (3, 2, 5, 11, 11, 1, 2), - (4, 1, 5, 10, 10, 1, 1), - (5, 0, 6, 6, -1, 0, 0), - (6, 1, 6, 5, 8, 1, 1), - (7, 2, 6, 10, 10, 1, 2), - (8, 1, 6, 11, 11, 1, 1), - (9, 0, 10, 10, -1, 0, 0), - (10, 1, 10, 5, 10, 1, 1), - (11, 2, 10, 6, 8, 1, 2), - (12, 1, 10, 11, 12, 1, 1), - (13, 0, 11, 11, -1, 0, 0) + (1,0,7,7,-1,0,0), + (2,1,7,11,8,1.064,1.064), + (3,2,7,12,11,1.121,2.185), + (4,1,7,8,10,1.1,1.1), + (5,0,8,8,-1,0,0), + (6,1,8,7,10,1.1,1.1), + (7,2,8,11,8,1.064,2.164), + (8,1,8,12,12,1.144,1.144), + (9,0,11,11,-1,0,0), + (10,1,11,7,8,1.064,1.064), + (11,2,11,8,10,1.1,2.164), + (12,1,11,12,11,1.121,1.121), + (13,0,12,12,-1,0,0) $$, '18: 4 vertices tests' ); @@ -379,6 +379,5 @@ LANGUAGE plpgsql; SELECT edge_cases(); - SELECT * FROM finish(); ROLLBACK; diff --git a/pgtap/traversal/depthFirstSearch/edge_cases/issue_1348.pg b/pgtap/traversal/depthFirstSearch/edge_cases/issue_1348.pg index 1346844b8bd..1b8b9976b64 100644 --- a/pgtap/traversal/depthFirstSearch/edge_cases/issue_1348.pg +++ b/pgtap/traversal/depthFirstSearch/edge_cases/issue_1348.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (8) ELSE plan(1) END; CREATE OR REPLACE FUNCTION issue() diff --git a/pgtap/traversal/depthFirstSearch/edge_cases/singleVertex_equiv_multipleVertices.pg b/pgtap/traversal/depthFirstSearch/edge_cases/singleVertex_equiv_multipleVertices.pg index 777f288e9d3..34dd8655ae0 100644 --- a/pgtap/traversal/depthFirstSearch/edge_cases/singleVertex_equiv_multipleVertices.pg +++ b/pgtap/traversal/depthFirstSearch/edge_cases/singleVertex_equiv_multipleVertices.pg @@ -22,7 +22,7 @@ BEGIN; SELECT CASE WHEN min_version('3.2.0') THEN plan (22) ELSE plan(2) END; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE OR REPLACE FUNCTION foo(cant INTEGER default 18, flag boolean default true) RETURNS SETOF TEXT AS @@ -50,7 +50,7 @@ BEGIN END IF; sql_SingleVertex := sql_SingleVertex || '( SELECT depth, start_vid, node, edge, cost, agg_cost FROM pgr_depthFirstSearch( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ' || i || ', directed => ' || flag; IF depth < 11 THEN sql_SingleVertex := sql_SingleVertex || ', max_depth => ' || depth || ') )'; @@ -62,7 +62,7 @@ BEGIN sql_MultipleVertices := '( SELECT depth, start_vid, node, edge, cost, agg_cost FROM pgr_depthFirstSearch( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', ' + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ' || 'ARRAY[' || sql_MultipleVertices || '], directed => ' || flag; IF depth < 11 THEN sql_MultipleVertices := sql_MultipleVertices || ', max_depth => ' || depth || ') )'; diff --git a/pgtap/traversal/depthFirstSearch/edge_cases/undirected.pg b/pgtap/traversal/depthFirstSearch/edge_cases/undirected.pg index 4924760bd0b..45bf9b38b70 100644 --- a/pgtap/traversal/depthFirstSearch/edge_cases/undirected.pg +++ b/pgtap/traversal/depthFirstSearch/edge_cases/undirected.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT CASE WHEN min_version('3.2.0') THEN plan (18) ELSE plan(1) END; CREATE OR REPLACE FUNCTION edge_cases() @@ -39,7 +39,7 @@ END IF; PREPARE q1 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id > 18; RETURN QUERY @@ -64,12 +64,12 @@ SELECT set_eq('depthFirstSearch2', PREPARE q3 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table; +FROM edges; RETURN QUERY SELECT is_empty( 'SELECT id, source, target, cost, reverse_cost - FROM edge_table + FROM edges WHERE source = 100 OR target = 100', '3: Vertex 100 does not exist in sample data' ); @@ -109,27 +109,27 @@ SELECT throws_ok('depthFirstSearch5', -- 1 vertex test PREPARE q6 AS -SELECT id, source, 2 AS target, cost, reverse_cost -FROM edge_table +SELECT id, source, source AS target, cost, reverse_cost +FROM edges WHERE id = 2; RETURN QUERY SELECT set_eq('q6', - $$VALUES (2, 2, 2, -1, 1)$$, - '6: Graph with only vertex 2' + $$VALUES (2, 6, 6, -0.996,1.004)$$, + '6: v<-v' ); PREPARE depthFirstSearch7 AS SELECT * FROM pgr_depthFirstSearch( 'q6', - 2, directed => false + 6, directed => false ); RETURN QUERY SELECT set_eq('depthFirstSearch7', - $$VALUES (1, 0, 2, 2, -1, 0, 0)$$, - '7: 1 vertex test' + $$VALUES (1, 0, 6, 6, -1, 0, 0)$$, + '7: v<-v' ); @@ -138,43 +138,43 @@ SELECT set_eq('depthFirstSearch7', PREPARE q8 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table +FROM edges WHERE id = 5; RETURN QUERY SELECT set_eq('q8', - $$VALUES (5, 3, 6, 1, -1)$$, - '8: Graph with two vertices 3 and 6 and edge from 3 to 6' + $$VALUES (5, 10, 11, 1.025,-0.975)$$, + '8: u->v' ); PREPARE depthFirstSearch9 AS SELECT * FROM pgr_depthFirstSearch( 'q8', - ARRAY[3, 6], directed => false + ARRAY[10, 11], directed => false ); PREPARE depthFirstSearch10 AS SELECT * FROM pgr_depthFirstSearch( 'q8', - ARRAY[3, 6], directed => false, max_depth => 0 + ARRAY[10, 11], directed => false, max_depth => 0 ); PREPARE depthFirstSearch11 AS SELECT * FROM pgr_depthFirstSearch( 'q8', - ARRAY[3, 6], directed => false, max_depth => 1 + ARRAY[10, 11], directed => false, max_depth => 1 ); RETURN QUERY SELECT set_eq('depthFirstSearch9', $$VALUES - (1, 0, 3, 3, -1, 0, 0), - (2, 1, 3, 6, 5, 1, 1), - (3, 0, 6, 6, -1, 0, 0), - (4, 1, 6, 3, 5, 1, 1) + (1, 0, 10, 10, -1, 0, 0), + (2, 1, 10, 11, 5, 1.025,1.025), + (3, 0, 11, 11, -1, 0, 0), + (4, 1, 11, 10, 5, 1.025,1.025) $$, '9: Two vertices tests' ); @@ -182,8 +182,8 @@ SELECT set_eq('depthFirstSearch9', RETURN QUERY SELECT set_eq('depthFirstSearch10', $$VALUES - (1, 0, 3, 3, -1, 0, 0), - (2, 0, 6, 6, -1, 0, 0) + (1, 0, 10, 10, -1, 0, 0), + (2, 0, 11, 11, -1, 0, 0) $$, '10: Two vertices tests' ); @@ -191,10 +191,10 @@ SELECT set_eq('depthFirstSearch10', RETURN QUERY SELECT set_eq('depthFirstSearch11', $$VALUES - (1, 0, 3, 3, -1, 0, 0), - (2, 1, 3, 6, 5, 1, 1), - (3, 0, 6, 6, -1, 0, 0), - (4, 1, 6, 3, 5, 1, 1) + (1, 0, 10, 10, -1, 0, 0), + (2, 1, 10, 11, 5, 1.025,1.025), + (3, 0, 11, 11, -1, 0, 0), + (4, 1, 11, 10, 5, 1.025,1.025) $$, '11: Two vertices tests' ); @@ -284,40 +284,39 @@ SELECT set_eq('depthFirstSearch14', PREPARE q15 AS SELECT id, source, target, cost, reverse_cost -FROM edge_table -WHERE (id >= 10 AND id <= 12) - OR id = 8; +FROM edges +WHERE id IN (8,10,11,12); RETURN QUERY SELECT set_eq('q15', $$VALUES - (8, 5, 6, 1, 1), - (10, 5, 10, 1, 1), - (11, 6, 11, 1, -1), - (12, 10, 11, 1, -1) + (11,11,12,1.121,-0.879), + (8,7,11,1.064,1.064), + (10,7,8,1.1,1.1), + (12,8,12,1.144,-0.856) $$, - '15: Graph with vertices 5, 6, 10 and 11' -); + 'q15: 8<->7<->11->12->8' + ); PREPARE depthFirstSearch16 AS SELECT * FROM pgr_depthFirstSearch( 'q15', - ARRAY[5, 6, 10, 11], directed => false + ARRAY[7, 8, 11, 12], directed => false ); PREPARE depthFirstSearch17 AS SELECT * FROM pgr_depthFirstSearch( 'q15', - ARRAY[5, 6, 10, 11], directed => false, max_depth => 1 + ARRAY[7, 8, 11, 12], directed => false, max_depth => 1 ); PREPARE depthFirstSearch18 AS SELECT * FROM pgr_depthFirstSearch( 'q15', - ARRAY[5, 6, 10, 11], directed => false, max_depth => 2 + ARRAY[7, 8, 11, 12], directed => false, max_depth => 2 ); PERFORM todo_start('sometimes this tests fails'); @@ -325,41 +324,41 @@ PERFORM todo_start('sometimes this tests fails'); RETURN QUERY SELECT set_eq('depthFirstSearch16', $$VALUES - (1, 0, 5, 5, -1, 0, 0), - (2, 1, 5, 6, 8, 1, 1), - (3, 2, 5, 11, 11, 1, 2), - (4, 3, 5, 10, 12, 1, 3), - (5, 0, 6, 6, -1, 0, 0), - (6, 1, 6, 5, 8, 1, 1), - (7, 2, 6, 10, 10, 1, 2), - (8, 3, 6, 11, 12, 1, 3), - (9, 0, 10, 10, -1, 0, 0), - (10, 1, 10, 5, 10, 1, 1), - (11, 2, 10, 6, 8, 1, 2), - (12, 3, 10, 11, 11, 1, 3), - (13, 0, 11, 11, -1, 0, 0), - (14, 1, 11, 6, 11, 1, 1), - (15, 2, 11, 5, 8, 1, 2), - (16, 3, 11, 10, 10, 1, 3) + (1,0,7,7,-1,0,0), + (2,1,7,11,8,1.064,1.064), + (3,2,7,12,11,1.121,2.185), + (4,3,7,8,12,1.144,3.3289999999999997), + (5,0,8,8,-1,0,0), + (6,1,8,7,10,1.1,1.1), + (7,2,8,11,8,1.064,2.164), + (8,3,8,12,11,1.121,3.285), + (9,0,11,11,-1,0,0), + (10,1,11,7,8,1.064,1.064), + (11,2,11,8,10,1.1,2.164), + (13,0,12,12,-1,0,0), + (12,3,11,12,12,1.144,3.308), + (14,1,12,11,11,1.121,1.121), + (15,2,12,7,8,1.064,2.185), + (16,3,12,8,10,1.1,3.285) $$, '16: 4 vertices tests' -); + ); RETURN QUERY SELECT set_eq('depthFirstSearch17', $$VALUES - (1, 0, 5, 5, -1, 0, 0), - (2, 1, 5, 6, 8, 1, 1), - (3, 1, 5, 10, 10, 1, 1), - (4, 0, 6, 6, -1, 0, 0), - (5, 1, 6, 5, 8, 1, 1), - (6, 1, 6, 11, 11, 1, 1), - (7, 0, 10, 10, -1, 0, 0), - (8, 1, 10, 5, 10, 1, 1), - (9, 1, 10, 11, 12, 1, 1), - (10, 0, 11, 11, -1, 0, 0), - (11, 1, 11, 6, 11, 1, 1), - (12, 1, 11, 10, 12, 1, 1) + (1,0,7,7,-1,0,0), + (2,1,7,11,8,1.064,1.064), + (3,1,7,8,10,1.1,1.1), + (4,0,8,8,-1,0,0), + (5,1,8,7,10,1.1,1.1), + (6,1,8,12,12,1.144,1.144), + (7,0,11,11,-1,0,0), + (8,1,11,7,8,1.064,1.064), + (9,1,11,12,11,1.121,1.121), + (10,0,12,12,-1,0,0), + (11,1,12,11,11,1.121,1.121), + (12,1,12,8,12,1.144,1.144) $$, '17: 4 vertices tests' ); @@ -367,25 +366,25 @@ SELECT set_eq('depthFirstSearch17', RETURN QUERY SELECT set_eq('depthFirstSearch18', $$VALUES - (1, 0, 5, 5, -1, 0, 0), - (2, 1, 5, 6, 8, 1, 1), - (3, 2, 5, 11, 11, 1, 2), - (4, 1, 5, 10, 10, 1, 1), - (5, 0, 6, 6, -1, 0, 0), - (6, 1, 6, 5, 8, 1, 1), - (7, 2, 6, 10, 10, 1, 2), - (8, 1, 6, 11, 11, 1, 1), - (9, 0, 10, 10, -1, 0, 0), - (10, 1, 10, 5, 10, 1, 1), - (11, 2, 10, 6, 8, 1, 2), - (12, 1, 10, 11, 12, 1, 1), - (13, 0, 11, 11, -1, 0, 0), - (14, 1, 11, 6, 11, 1, 1), - (15, 2, 11, 5, 8, 1, 2), - (16, 1, 11, 10, 12, 1, 1) + (1,0,7,7,-1,0,0), + (2,1,7,11,8,1.064,1.064), + (3,2,7,12,11,1.121,2.185), + (4,1,7,8,10,1.1,1.1), + (5,0,8,8,-1,0,0), + (6,1,8,7,10,1.1,1.1), + (7,2,8,11,8,1.064,2.164), + (8,1,8,12,12,1.144,1.144), + (9,0,11,11,-1,0,0), + (10,1,11,7,8,1.064,1.064), + (11,2,11,8,10,1.1,2.164), + (12,1,11,12,11,1.121,1.121), + (13,0,12,12,-1,0,0), + (14,1,12,11,11,1.121,1.121), + (15,2,12,7,8,1.064,2.185), + (16,1,12,8,12,1.144,1.144) $$, '18: 4 vertices tests' -); + ); PERFORM todo_end(); END; @@ -396,4 +395,4 @@ SELECT edge_cases(); SELECT * FROM finish(); -ROLLBACK; +ROLLBACK diff --git a/pgtap/traversal/depthFirstSearch/inner_query.pg b/pgtap/traversal/depthFirstSearch/inner_query.pg index 9fee95d6faf..bd817030b5a 100644 --- a/pgtap/traversal/depthFirstSearch/inner_query.pg +++ b/pgtap/traversal/depthFirstSearch/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (108) ELSE plan(1) END; CREATE OR REPLACE FUNCTION inner_query() diff --git a/pgtap/traversal/depthFirstSearch/no_crash_test.pg b/pgtap/traversal/depthFirstSearch/no_crash_test.pg index ecf9918fb85..95513e2bf27 100644 --- a/pgtap/traversal/depthFirstSearch/no_crash_test.pg +++ b/pgtap/traversal/depthFirstSearch/no_crash_test.pg @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (59) ELSE plan(1) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); @@ -55,12 +55,12 @@ BEGIN -- depthFirstSearch Single vertex params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '5::BIGINT' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_depthFirstSearch', params, subs); @@ -79,8 +79,8 @@ BEGIN ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - 'max_depth => (SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + 'max_depth => (SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_depthFirstSearch', params, subs); @@ -99,7 +99,7 @@ BEGIN ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_depthFirstSearch', params, subs); @@ -118,8 +118,8 @@ BEGIN ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - 'max_depth => (SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + 'max_depth => (SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_depthFirstSearch', params, subs); diff --git a/pgtap/traversal/depthFirstSearch/types_check.pg b/pgtap/traversal/depthFirstSearch/types_check.pg index 5b5d1dbe7f5..b737eb9e44f 100644 --- a/pgtap/traversal/depthFirstSearch/types_check.pg +++ b/pgtap/traversal/depthFirstSearch/types_check.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (7) ELSE plan(1) END; CREATE OR REPLACE FUNCTION types_check() diff --git a/pgtap/trsp/trsp/compare_dijkstra/blank_restrictions.pg b/pgtap/trsp/trsp/compare_dijkstra/blank_restrictions.pg index 06990ada3a9..fba5adccfb4 100644 --- a/pgtap/trsp/trsp/compare_dijkstra/blank_restrictions.pg +++ b/pgtap/trsp/trsp/compare_dijkstra/blank_restrictions.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(1296); SET client_min_messages TO ERROR; @@ -43,8 +43,8 @@ BEGIN blank := quote_literal(''); IF flag THEN directed = 'Directed'; END IF; k := 1; - inner_sql1 = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edge_table ORDER BY id'); - inner_sql2 = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost from edge_table ORDER BY id'); + inner_sql1 = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edges ORDER BY id'); + inner_sql2 = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost from edges ORDER BY id'); FOR i IN 1.. cant LOOP FOR j IN 1..cant LOOP dijkstra_sql := 'SELECT seq-1, node::integer, edge::integer, cost diff --git a/pgtap/trsp/trsp/compare_dijkstra/directed/related_restrictions.pg b/pgtap/trsp/trsp/compare_dijkstra/directed/related_restrictions.pg index 5f2eb11581b..8f5775d6396 100644 --- a/pgtap/trsp/trsp/compare_dijkstra/directed/related_restrictions.pg +++ b/pgtap/trsp/trsp/compare_dijkstra/directed/related_restrictions.pg @@ -21,10 +21,10 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN plan(18) ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -PREPARE with_reverse_cost AS SELECT id, source, target, cost, reverse_cost from edge_table ORDER BY id; -PREPARE no_reverse_cost AS SELECT id, source, target, cost from edge_table ORDER BY id; +PREPARE with_reverse_cost AS SELECT id, source, target, cost, reverse_cost from edges ORDER BY id; +PREPARE no_reverse_cost AS SELECT id, source, target, cost from edges ORDER BY id; PREPARE related AS SELECT * FROM restrictions; SELECT compare_trsp_dijkstra_new(18, true, 'related'); diff --git a/pgtap/trsp/trsp/compare_dijkstra/directed/unrelated_restrictions.pg b/pgtap/trsp/trsp/compare_dijkstra/directed/unrelated_restrictions.pg index cde9fa41f95..46d8f33dd84 100644 --- a/pgtap/trsp/trsp/compare_dijkstra/directed/unrelated_restrictions.pg +++ b/pgtap/trsp/trsp/compare_dijkstra/directed/unrelated_restrictions.pg @@ -21,10 +21,10 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN plan(648) ELSE plan(2) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -PREPARE with_reverse_cost AS SELECT id, source, target, cost, reverse_cost from edge_table ORDER BY id; -PREPARE no_reverse_cost AS SELECT id, source, target, cost from edge_table ORDER BY id; +PREPARE with_reverse_cost AS SELECT id, source, target, cost, reverse_cost from edges ORDER BY id; +PREPARE no_reverse_cost AS SELECT id, source, target, cost from edges ORDER BY id; PREPARE unrelated1 AS SELECT * FROM restrictions WHERE id > 7; PREPARE unrelated2 AS SELECT 1 AS id, 100::float AS cost, ARRAY[33, 32, 25] AS path; diff --git a/pgtap/trsp/trsp/compare_dijkstra/no_restrictions_directed.pg b/pgtap/trsp/trsp/compare_dijkstra/no_restrictions_directed.pg index fb3221d64d8..95eab2db767 100644 --- a/pgtap/trsp/trsp/compare_dijkstra/no_restrictions_directed.pg +++ b/pgtap/trsp/trsp/compare_dijkstra/no_restrictions_directed.pg @@ -21,7 +21,7 @@ BEGIN; SELECT plan(612); SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SET client_min_messages TO ERROR; -- TEST of deprecated signature diff --git a/pgtap/trsp/trsp/compare_dijkstra/no_restrictions_undirected.pg b/pgtap/trsp/trsp/compare_dijkstra/no_restrictions_undirected.pg index 979b568ce9d..ccc6ede82a7 100644 --- a/pgtap/trsp/trsp/compare_dijkstra/no_restrictions_undirected.pg +++ b/pgtap/trsp/trsp/compare_dijkstra/no_restrictions_undirected.pg @@ -21,7 +21,7 @@ BEGIN; SELECT plan(612); SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SET client_min_messages TO ERROR; -- TEST of deprecated signature diff --git a/pgtap/trsp/trsp/compare_dijkstra/undirected/related_restrictions.pg b/pgtap/trsp/trsp/compare_dijkstra/undirected/related_restrictions.pg index d1e01811e0f..ebddccf7ebb 100644 --- a/pgtap/trsp/trsp/compare_dijkstra/undirected/related_restrictions.pg +++ b/pgtap/trsp/trsp/compare_dijkstra/undirected/related_restrictions.pg @@ -21,10 +21,10 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN plan(18) ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -PREPARE with_reverse_cost AS SELECT id, source, target, cost, reverse_cost from edge_table ORDER BY id; -PREPARE no_reverse_cost AS SELECT id, source, target, cost from edge_table ORDER BY id; +PREPARE with_reverse_cost AS SELECT id, source, target, cost, reverse_cost from edges ORDER BY id; +PREPARE no_reverse_cost AS SELECT id, source, target, cost from edges ORDER BY id; PREPARE related AS SELECT * FROM restrictions; SELECT compare_trsp_dijkstra_new(18, false, 'related'); diff --git a/pgtap/trsp/trsp/compare_dijkstra/undirected/unrelated_restrictions.pg b/pgtap/trsp/trsp/compare_dijkstra/undirected/unrelated_restrictions.pg index db5d71837ef..b44b2c5d8ce 100644 --- a/pgtap/trsp/trsp/compare_dijkstra/undirected/unrelated_restrictions.pg +++ b/pgtap/trsp/trsp/compare_dijkstra/undirected/unrelated_restrictions.pg @@ -21,10 +21,10 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN plan(648) ELSE plan(2) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -PREPARE with_reverse_cost AS SELECT id, source, target, cost, reverse_cost from edge_table ORDER BY id; -PREPARE no_reverse_cost AS SELECT id, source, target, cost from edge_table ORDER BY id; +PREPARE with_reverse_cost AS SELECT id, source, target, cost, reverse_cost from edges ORDER BY id; +PREPARE no_reverse_cost AS SELECT id, source, target, cost from edges ORDER BY id; PREPARE unrelated1 AS SELECT * FROM restrictions WHERE id > 7; PREPARE unrelated2 AS SELECT 1 AS id, 100::float AS cost, ARRAY[33, 32, 25] AS path; diff --git a/pgtap/trsp/trsp/edge_cases.pg b/pgtap/trsp/trsp/edge_cases.pg index 20c38177f3d..cfafb865146 100644 --- a/pgtap/trsp/trsp/edge_cases.pg +++ b/pgtap/trsp/trsp/edge_cases.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(5) ELSE plan(1) END; SET client_min_messages TO ERROR; @@ -40,33 +40,33 @@ BEGIN RETURN QUERY SELECT lives_ok($q$ SELECT * FROM pgr_trsp( - $$SELECT * FROM edge_table order by id$$, + $$SELECT * FROM edges order by id$$, $$SELECT 100::FLOAT AS cost, ARRAY[]::BIGINT[] AS path$$, - 2,3)$q$, $q$empty restriction path lives$q$); + 6,10)$q$, $q$empty restriction path lives$q$); RETURN QUERY SELECT isnt_empty($q$ SELECT * FROM pgr_trsp( - $$SELECT * FROM edge_table order by id$$, + $$SELECT * FROM edges order by id$$, $$SELECT 100::FLOAT AS cost, ARRAY[]::BIGINT[] AS path$$, - 2,3)$q$, $q$empty restriction path gives non empty result$q$); + 6,10)$q$, $q$empty restriction path gives non empty result$q$); RETURN QUERY SELECT lives_ok($q$ SELECT * FROM pgr_trsp( - $$SELECT * FROM edge_table order by id$$, + $$SELECT * FROM edges order by id$$, $$SELECT 100::FLOAT AS cost, NULL::BIGINT[] AS path$$, - 2,3)$q$, $q$null restriction path lives$q$); + 6,10)$q$, $q$null restriction path lives$q$); RETURN QUERY SELECT isnt_empty($q$ SELECT * FROM pgr_trsp( - $$SELECT * FROM edge_table order by id$$, + $$SELECT * FROM edges order by id$$, $$SELECT 100::FLOAT AS cost, NULL::BIGINT[] AS path$$, - 2,3)$q$, $q$null restriction path gives non empty result$q$); + 6,10)$q$, $q$null restriction path gives non empty result$q$); RETURN QUERY SELECT throws_ok($q$ SELECT * FROM pgr_trsp( - $$SELECT * FROM edge_table order by id$$, + $$SELECT * FROM edges order by id$$, $$SELECT 100::FLOAT AS cost, ARRAY[NULL]::BIGINT[] AS path$$, - 2,3)$q$, + 6,10)$q$, $$XX000$$,$$NULL value found in Array!$$, $q$array containing a null path throws$q$); diff --git a/pgtap/trsp/trsp/edge_cases/compare_dijkstra.pg b/pgtap/trsp/trsp/edge_cases/compare_dijkstra.pg index bcde5dbb42b..586ae1e8c94 100644 --- a/pgtap/trsp/trsp/edge_cases/compare_dijkstra.pg +++ b/pgtap/trsp/trsp/edge_cases/compare_dijkstra.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SELECT plan(1); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE OR REPLACE FUNCTION do_test() RETURNS SETOF TEXT AS $BODY$ @@ -29,7 +29,7 @@ BEGIN IF min_version('3.4.0') THEN prepare q1 AS SELECT seq, node, edge, cost::TEXT FROM pgr_trsp( - 'select id, source, target, cost, reverse_cost from edge_table', + 'select id, source, target, cost, reverse_cost from edges', $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$, 1, -- node_id of start 5, -- node_id of end @@ -37,13 +37,13 @@ BEGIN prepare q2 AS SELECT seq, node, edge, cost::TEXT FROM pgr_dijkstra( - 'select id, source, target, cost, reverse_cost from edge_table', + 'select id, source, target, cost, reverse_cost from edges', 1, 5); ELSE prepare q1 AS SELECT seq, id1, id2, cost::TEXT FROM pgr_trsp( - 'select id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edge_table', + 'select id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edges', 1, -- node_id of start 5, -- node_id of end true, -- directed graph? @@ -52,7 +52,7 @@ BEGIN prepare q2 AS SELECT seq-1, node::INTEGER, edge::INTEGER, cost::TEXT FROM pgr_dijkstra( - 'select id, source, target, cost, reverse_cost from edge_table', + 'select id, source, target, cost, reverse_cost from edges', 1, 5); END IF; diff --git a/pgtap/trsp/trsp/edge_cases/compare_dijkstraVia.pg b/pgtap/trsp/trsp/edge_cases/compare_dijkstraVia.pg index c38b5d37bc3..e2aa2bf5ebc 100644 --- a/pgtap/trsp/trsp/edge_cases/compare_dijkstraVia.pg +++ b/pgtap/trsp/trsp/edge_cases/compare_dijkstraVia.pg @@ -21,7 +21,7 @@ BEGIN; SELECT plan(7); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE OR REPLACE FUNCTION edge_cases() RETURNS SETOF TEXT AS @@ -32,116 +32,116 @@ BEGIN PREPARE q1 AS SELECT * from pgr_trsp( - 'SELECT id, source, target, cost, reverse_cost from edge_table', + 'SELECT id, source, target, cost, reverse_cost from edges', $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$, - 1, 1, + 5, 5, true); PREPARE q2 AS SELECT * from pgr_trsp( - 'SELECT id, source, target, cost, reverse_cost from edge_table', + 'SELECT id, source, target, cost, reverse_cost from edges', $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$, - 1, 3, + 5, 10, true); PREPARE q21 AS SELECT seq, node, edge, round(cost::numeric, 3) from pgr_trsp( - 'SELECT id, source, target, cost, reverse_cost from edge_table', + 'SELECT id, source, target, cost, reverse_cost from edges', $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$, - 1, 3, + 5, 10, true); PREPARE q22 AS SELECT seq, node, edge, round(cost::numeric, 3) from pgr_dijkstra( - 'SELECT id, source, target, cost, reverse_cost from edge_table', - 1, 3, true); + 'SELECT id, source, target, cost, reverse_cost from edges', + 5, 10, true); PREPARE q31 AS SELECT seq-1::INTEGER, node::INTEGER, edge::INTEGER, round(cost::numeric, 3) from pgr_trsp( - 'SELECT id, source, target, cost, reverse_cost from edge_table', + 'SELECT id, source, target, cost, reverse_cost from edges', $$SELECT 1 AS id, 100.2 AS cost, 6 AS target_id, ARRAY[4,8] AS path$$, - 1, 3, + 5, 10, true); PREPARE q41 AS SELECT * from pgr_trsp( - 'SELECT id, source, target, cost, reverse_cost from edge_table', + 'SELECT id, source, target, cost, reverse_cost from edges', $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$, - 1, 1, + 5, 5, FALSE); PREPARE q51 AS SELECT seq, node, edge, cost::text from pgr_trsp( - 'SELECT id, source, target, cost, reverse_cost from edge_table', + 'SELECT id, source, target, cost, reverse_cost from edges', $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$, - 1, 3, + 5, 10, FALSE); PREPARE q52 AS SELECT seq, node, edge, cost::text from pgr_dijkstra( - 'SELECT id, source, target, cost, reverse_cost from edge_table', - 1, 3, FALSE); + 'SELECT id, source, target, cost, reverse_cost from edges', + 5, 10, FALSE); PREPARE q61 AS SELECT seq-1::INTEGER, node::INTEGER, edge::INTEGER, cost::TEXT from pgr_trsp( - 'SELECT id, source, target, cost, reverse_cost from edge_table', + 'SELECT id, source, target, cost, reverse_cost from edges', $$SELECT 1 AS id, 100.2::float AS cost, 6::INTEGER AS target_id, ARRAY[4,8] AS path$$, - 1, 3, + 5, 10, FALSE); ELSE PREPARE q1 AS SELECT * from pgr_trsp( - 'select id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edge_table', - 1, 1, + 'select id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edges', + 5, 5, true, true); PREPARE q2 AS SELECT * from pgr_trsp( - 'select id::INTEGER, source::BIGINT, target::INTEGER, cost, reverse_cost from edge_table', - 1, 3, + 'select id::INTEGER, source::BIGINT, target::INTEGER, cost, reverse_cost from edges', + 5, 10, true, true); PREPARE q21 AS SELECT seq, id1, id2, round(cost::numeric, 3) from pgr_trsp( - 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edge_table', - 1, 3, + 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edges', + 5, 10, true, true); PREPARE q22 AS SELECT seq-1, node::INTEGER, edge::INTEGER, round(cost::numeric, 3) from pgr_dijkstra( - 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edge_table', - 1, 3, true); + 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edges', + 5, 10, true); PREPARE q31 AS SELECT seq, id1, id2, round(cost::numeric, 3) from pgr_trsp( - 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edge_table', - 1, 3, + 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edges', + 5, 10, true, true, 'select 8::INTEGER as target_id, ''4''::TEXT as via_path, 100.2::FLOAT to_cost'); PREPARE q41 AS SELECT * from pgr_trsp( - 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edge_table', - 1, 1, + 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edges', + 5, 5, FALSE, true); PREPARE q51 AS SELECT seq, id1, id2, cost::text from pgr_trsp( - 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edge_table', - 1, 3, + 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edges', + 5, 10, FALSE, true); PREPARE q52 AS SELECT seq-1, node::INTEGER, edge::INTEGER, cost::text from pgr_dijkstra( - 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edge_table', - 1, 3, FALSE); + 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edges', + 5, 10, FALSE); PREPARE q61 AS SELECT seq, id1, id2, cost::text from pgr_trsp( - 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edge_table', - 1, 3, + 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edges', + 5, 10, FALSE, true, 'select 8::INTEGER as target_id, ''4''::TEXT as via_path, 100.2::FLOAT to_cost'); @@ -151,8 +151,8 @@ BEGIN SELECT (row_number() over() -1)::INTEGER, node::INTEGER, (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, round(cost::numeric, 3) FROM pgr_dijkstraVia( - 'select id, source, target, cost, reverse_cost from edge_table', - ARRAY[1, 10, 12, 4, 3], + 'select id, source, target, cost, reverse_cost from edges', + ARRAY[5, 8, 17, 15, 10], true) where edge != -1; @@ -168,8 +168,8 @@ BEGIN SELECT (row_number() over() -1)::INTEGER, node::INTEGER, (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost::text FROM pgr_dijkstraVia( - 'select id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edge_table', - ARRAY[1, 2, 3], + 'select id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edges', + ARRAY[5, 6, 10], FALSE) where edge != -1; RETURN QUERY SELECT is_empty('q41', '5: Undirected: No path from 1 to 1'); diff --git a/pgtap/trsp/trsp/edge_cases/directed_compare_dijkstraVia.pg b/pgtap/trsp/trsp/edge_cases/directed_compare_dijkstraVia.pg index 8bb53d86ff9..f30fb8cf662 100644 --- a/pgtap/trsp/trsp/edge_cases/directed_compare_dijkstraVia.pg +++ b/pgtap/trsp/trsp/edge_cases/directed_compare_dijkstraVia.pg @@ -21,7 +21,8 @@ BEGIN; SELECT plan(3); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +SET extra_float_digits = -3; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE OR REPLACE FUNCTION edge_case() RETURNS SETOF TEXT AS @@ -31,69 +32,69 @@ BEGIN IF min_version('3.4.0') THEN PREPARE q1 AS SELECT * from pgr_trsp( - 'select id, source, target,cost, reverse_cost from edge_table', + 'select id, source, target,cost, reverse_cost from edges', $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$, - 1, 1, + 5, 5, true); - PREPARE q21 AS + PREPARE q2 AS SELECT seq, node, edge, round(cost::numeric, 12) from pgr_trsp( - 'select id, source, target,cost, reverse_cost from edge_table', + 'select id, source, target,cost, reverse_cost from edges', $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$, - 3, 4, + 10, 15, true); - PREPARE q22 AS + PREPARE e2 AS SELECT seq, node, edge, round(cost::numeric, 12) from pgr_dijkstra( - 'select id, source, target, cost, reverse_cost from edge_table', - 3, 4); + 'select id, source, target, cost, reverse_cost from edges', + 10, 15); - PREPARE q31 AS + PREPARE q3 AS SELECT seq-1::INTEGER, node::INTEGER, edge::INTEGER, round(cost::numeric, 12) from pgr_trsp( - 'select id, source, target, cost, reverse_cost from edge_table', + 'select id, source, target, cost, reverse_cost from edges', $$SELECT 1 AS id, 100.2::float AS cost, ARRAY[5,9] AS path$$, - 3, 4, + 10, 15, true); ELSE PREPARE q1 AS SELECT * from pgr_trsp( - 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edge_table', - 1, 1, + 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edges', + 5, 5, true, true); - PREPARE q21 AS + PREPARE q2 AS SELECT seq, id1, id2, round(cost::numeric, 12) from pgr_trsp( - 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edge_table', - 3, 4, + 'select id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost from edges', + 10, 15, true, true); - PREPARE q22 AS + PREPARE e2 AS SELECT seq-1, node::INTEGER, edge::INTEGER, round(cost::numeric, 12) from pgr_dijkstra( - 'select id, source, target, cost, reverse_cost from edge_table', - 3, 4, true); + 'select id, source, target, cost, reverse_cost from edges', + 10, 15, true); - PREPARE q31 AS + PREPARE q3 AS SELECT seq, id1, id2, round(cost::numeric, 12) from pgr_trsp( - 'select id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edge_table', - 3, 4, + 'select id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edges', + 10, 15, true, true, 'select 9::INTEGER as target_id, ''5''::TEXT as via_path, 100.2::FLOAT to_cost'); END IF; - PREPARE q32 AS + PREPARE e3 AS SELECT (row_number() over() -1)::INTEGER, node::INTEGER, (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, round(cost::numeric, 12) FROM pgr_dijkstraVia( - 'select id, source, target, cost, reverse_cost from edge_table', - ARRAY[3, 2, 4], + 'select id, source, target, cost, reverse_cost from edges', + ARRAY[10, 6, 15], true) where edge != -1; RETURN QUERY SELECT is_empty('q1', '1: No path from 1 to 1'); - RETURN QUERY SELECT set_eq('q21','q22','2: without retrictions returns the same as pgr_dijkstra'); - RETURN QUERY SELECT set_eq('q31','q32','3: with retrictions returns expected path'); + RETURN QUERY SELECT set_eq('q2','e2','2: without retrictions returns the same as pgr_dijkstra'); + RETURN QUERY SELECT set_eq('q3','e3','3: with retrictions returns expected path'); END; $BODY$ diff --git a/pgtap/trsp/trsp/edge_cases/emptyset_from_i_to_i.pg b/pgtap/trsp/trsp/edge_cases/emptyset_from_i_to_i.pg index 2ba48a58bc5..83674f28cf7 100644 --- a/pgtap/trsp/trsp/edge_cases/emptyset_from_i_to_i.pg +++ b/pgtap/trsp/trsp/edge_cases/emptyset_from_i_to_i.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(144); @@ -40,8 +40,8 @@ IF min_version('3.4.0') THEN directed = 'Undirected'; IF flag THEN directed = 'Directed'; END IF; k := 1; - with_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edge_table ORDER BY id'); - no_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost from edge_table ORDER BY id'); + with_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edges ORDER BY id'); + no_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost from edges ORDER BY id'); restrictions_sql = quote_literal('SELECT 100::float AS to_cost, 25::INTEGER AS target_id, ''32, 33''::TEXT AS via_path'); restrictions_sql = 'NULL::TEXT'; @@ -109,8 +109,8 @@ ELSE directed = 'Undirected'; IF flag THEN directed = 'Directed'; END IF; k := 1; - with_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edge_table ORDER BY id'); - no_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost from edge_table ORDER BY id'); + with_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edges ORDER BY id'); + no_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost from edges ORDER BY id'); FOR i IN 1.. cant LOOP trsp_sql := 'SELECT * from pgr_trsp( ' || with_reverse_cost || ', ' || i || ', ' || i || ', ' || flag || ', true)'; diff --git a/pgtap/trsp/trsp/edge_cases/issue_244.pg b/pgtap/trsp/trsp/edge_cases/issue_244.pg index 126f2a8ac03..e6bc445895c 100644 --- a/pgtap/trsp/trsp/edge_cases/issue_244.pg +++ b/pgtap/trsp/trsp/edge_cases/issue_244.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SELECT plan(1); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; -- should be a procedure CREATE OR REPLACE FUNCTION edge_cases() @@ -30,27 +30,27 @@ BEGIN IF min_version('3.4.0') THEN PREPARE q1 AS SELECT seq, node, edge, cost::text FROM pgr_trsp( - $$SELECT id, source, target, cost FROM edge_table$$, + $$SELECT id, source, target, cost FROM edges$$, $$SELECT * FROM restrictions WHERE id > 10$$, 7, 12, false); PREPARE q2 AS (SELECT seq, node, edge, cost::text - FROM pgr_dijkstra('SELECT id, source, target, cost FROM edge_table order by id',7, 12, FALSE)) + FROM pgr_dijkstra('SELECT id, source, target, cost FROM edges order by id',7, 12, FALSE)) UNION (SELECT seq, node, edge, cost::text - FROM pgr_dijkstra('SELECT id, source, target, cost FROM edge_table order by source',7, 12, FALSE)); + FROM pgr_dijkstra('SELECT id, source, target, cost FROM edges order by source',7, 12, FALSE)); ELSE PREPARE q1 AS SELECT seq, id1, id2, cost::text - FROM pgr_trsp($$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table$$, 7, 12, FALSE, false); + FROM pgr_trsp($$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edges$$, 7, 12, FALSE, false); PREPARE q2 AS (SELECT seq-1, node::INTEGER, edge::INTEGER, cost::text - FROM pgr_dijkstra('SELECT id, source, target, cost FROM edge_table order by id',7, 12, FALSE)) + FROM pgr_dijkstra('SELECT id, source, target, cost FROM edges order by id',7, 12, FALSE)) UNION ALL (SELECT seq-1, node::INTEGER, edge::INTEGER, cost::text - FROM pgr_dijkstra('SELECT id, source, target, cost FROM edge_table order by source',7, 12, FALSE)); + FROM pgr_dijkstra('SELECT id, source, target, cost FROM edges order by source',7, 12, FALSE)); END IF; END; diff --git a/pgtap/trsp/trsp/edge_cases/no_restrictions_compare_withPoints.pg b/pgtap/trsp/trsp/edge_cases/no_restrictions_compare_withPoints.pg index 7da60bcce2b..523b185fa7e 100644 --- a/pgtap/trsp/trsp/edge_cases/no_restrictions_compare_withPoints.pg +++ b/pgtap/trsp/trsp/edge_cases/no_restrictions_compare_withPoints.pg @@ -20,12 +20,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SELECT plan(1); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SET client_min_messages TO ERROR; PREPARE q1 AS SELECT seq, id1, id2, cost::TEXT FROM pgr_trsp( - 'select id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edge_table', + 'select id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edges', 1, -- edge_id for start 0.5, -- midpoint of edge 6, -- edge_id of route end @@ -37,7 +37,7 @@ SELECT seq, id1, id2, cost::TEXT FROM pgr_trsp( PREPARE q2 AS SELECT seq-1, node::INTEGER, edge::INTEGER, cost::TEXT FROM pgr_withPoints( - $$SELECT id, source, target, cost, reverse_cost from edge_table$$, + $$SELECT id, source, target, cost, reverse_cost from edges$$, $$(SELECT 1 AS pid, 1 AS edge_id, 0.5::float AS fraction) UNION (SELECT 2, 6, 0.5)$$, diff --git a/pgtap/trsp/trsp/inner_query.pg b/pgtap/trsp/trsp/inner_query.pg index 2b323c286c9..638c7f92ebe 100644 --- a/pgtap/trsp/trsp/inner_query.pg +++ b/pgtap/trsp/trsp/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(540) ELSE plan(324) END; SET client_min_messages TO ERROR; @@ -37,32 +37,32 @@ BEGIN unrelated_restriction := '$$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$'; empty_restriction := '$$SELECT * FROM restrictions WHERE id > 7$$'; - RETURN QUERY SELECT style_dijkstra('pgr_trsp(', ', ' || empty_restriction || ', 2, 9, false)'); - RETURN QUERY SELECT style_dijkstra('pgr_trsp(', ', ' || empty_restriction || ', 2, 9, true)'); + RETURN QUERY SELECT style_dijkstra('pgr_trsp(', ', ' || empty_restriction || ', 6, 16, false)'); + RETURN QUERY SELECT style_dijkstra('pgr_trsp(', ', ' || empty_restriction || ', 6, 16, true)'); - RETURN QUERY SELECT style_dijkstra('pgr_trsp(', ', ' || unrelated_restriction || ', 2, 9, false)'); - RETURN QUERY SELECT style_dijkstra('pgr_trsp(', ', ' || unrelated_restriction || ', 2, 9, true)'); + RETURN QUERY SELECT style_dijkstra('pgr_trsp(', ', ' || unrelated_restriction || ', 6, 16, false)'); + RETURN QUERY SELECT style_dijkstra('pgr_trsp(', ', ' || unrelated_restriction || ', 6, 16, true)'); END IF; restriction := '$$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, ''32, 33''::TEXT AS via_path$$)'; - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 2, 9, false, true)', TRUE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 2, 9, false, true, NULL)', TRUE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 2, 9, false, true, ' || restriction, TRUE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 6, 16, false, true)', TRUE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 6, 16, false, true, NULL)', TRUE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 6, 16, false, true, ' || restriction, TRUE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 2, 9, true, true)', TRUE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 2, 9, true, true, NULL)', TRUE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 2, 9, true, true, ' || restriction, TRUE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 6, 16, true, true)', TRUE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 6, 16, true, true, NULL)', TRUE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 6, 16, true, true, ' || restriction, TRUE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 2, 9, false, false)', FALSE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 2, 9, false, false, NULL)', FALSE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 2, 9, false, false, ' || restriction, FALSE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 6, 16, false, false)', FALSE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 6, 16, false, false, NULL)', FALSE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 6, 16, false, false, ' || restriction, FALSE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 2, 9, true, false)', FALSE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 2, 9, true, false, NULL)', FALSE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 2, 9, true, false, ' || restriction, FALSE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 6, 16, true, false)', FALSE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 6, 16, true, false, NULL)', FALSE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trsp', ', 6, 16, true, false, ' || restriction, FALSE); END; $BODY$ diff --git a/pgtap/trsp/trsp/no_crash_test.pg b/pgtap/trsp/trsp/no_crash_test.pg index 72cf48bdb69..acd250d0cbe 100644 --- a/pgtap/trsp/trsp/no_crash_test.pg +++ b/pgtap/trsp/trsp/no_crash_test.pg @@ -19,15 +19,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(147) ELSE plan(1) END; SET client_min_messages TO ERROR; PREPARE all_edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE empty_edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id > 20; +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id > 20; PREPARE all_restrictions AS SELECT * FROM restrictions; @@ -36,13 +36,13 @@ PREPARE empty_restrictions AS SELECT * FROM restrictions WHERE id > 7; PREPARE all_combinations AS -SELECT * FROM combinations_table; +SELECT * FROM combinations; PREPARE empty_combinations AS -SELECT * FROM combinations_table WHERE source = 20; +SELECT * FROM combinations WHERE source = 20; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); CREATE OR REPLACE FUNCTION no_crash_test(func TEXT, params TEXT[], subs TEXT[]) RETURNS SETOF TEXT AS @@ -101,12 +101,12 @@ BEGIN RETURN QUERY SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); -- ONE TO ONE - params = ARRAY['$$all_edges$$', '$$all_restrictions$$', '1', '2', 'true']::TEXT[]; - params1 = ARRAY['$$all_edges$$', '$$empty_restrictions$$', '1', '2', 'true']::TEXT[]; + params = ARRAY['$$all_edges$$', '$$all_restrictions$$', '5', '6', 'true']::TEXT[]; + params1 = ARRAY['$$all_edges$$', '$$empty_restrictions$$', '5', '6', 'true']::TEXT[]; subs = ARRAY['$$empty_edges$$', 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp', params, subs); @@ -117,10 +117,10 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_trsp', params1, subs); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', - '1', - '2', + '5', + '6', 'true' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp', params, subs); @@ -130,8 +130,8 @@ BEGIN params1 = ARRAY['$$all_edges$$', '$$empty_restrictions$$', '1', 'ARRAY[2,3]', 'true']::TEXT[]; subs = ARRAY['$$empty_edges$$', 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp', params, subs); @@ -148,10 +148,10 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_trsp', params1, subs); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', - '1', - 'ARRAY[2,3]', + '5', + 'ARRAY[6,10]', 'true' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp', params, subs); @@ -161,8 +161,8 @@ BEGIN params1 = ARRAY['$$all_edges$$', '$$empty_restrictions$$', 'ARRAY[2,3]', '1', 'true']::TEXT[]; subs = ARRAY['$$empty_edges$$', 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp', params, subs); @@ -179,10 +179,10 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_trsp', params1, subs); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', - 'ARRAY[2,3]', - '1', + 'ARRAY[6,10]', + '5', 'true' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp', params, subs); @@ -192,8 +192,8 @@ BEGIN params1 = ARRAY['$$all_edges$$', '$$empty_restrictions$$', 'ARRAY[2,3]::BIGINT[]', 'ARRAY[1,10]::BIGINT[]', 'true']::TEXT[]; subs = ARRAY['$$empty_edges$$', 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp', params, subs); @@ -210,10 +210,10 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_trsp', params1, subs); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', - 'ARRAY[2,3]::BIGINT[]', - 'ARRAY[1,10]::BIGINT[]', + 'ARRAY[6,10]::BIGINT[]', + 'ARRAY[5,8]::BIGINT[]', 'true' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp', params, subs); @@ -236,9 +236,9 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_trsp', params1, subs); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', - '$$SELECT * FROM combinations_table$$', + '$$SELECT * FROM combinations$$', 'true' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp', params, subs); diff --git a/pgtap/trsp/trsp/no_crash_test/int_flt.pg b/pgtap/trsp/trsp/no_crash_test/int_flt.pg index d37bd15eb13..e504cd3539a 100644 --- a/pgtap/trsp/trsp/no_crash_test/int_flt.pg +++ b/pgtap/trsp/trsp/no_crash_test/int_flt.pg @@ -19,15 +19,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(32); SET client_min_messages TO ERROR; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should not be empty to tests be meaningful'); SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); @@ -81,7 +81,7 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - params = ARRAY['SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', + params = ARRAY['SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edges', '1', '0.5::FLOAT', '2', @@ -91,9 +91,9 @@ BEGIN ]::TEXT[]; subs = ARRAY[ NULL, - '(SELECT id::INTEGER FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id::INTEGER FROM vertices WHERE id IN (-1))', 'NULL', - '(SELECT id::INTEGER FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id::INTEGER FROM vertices WHERE id IN (-1))', 'NULL', 'NULL', 'NULL' diff --git a/pgtap/trsp/trsp/no_crash_test/int_int.pg b/pgtap/trsp/trsp/no_crash_test/int_int.pg index 8acea9d8ecd..228dc824bab 100644 --- a/pgtap/trsp/trsp/no_crash_test/int_int.pg +++ b/pgtap/trsp/trsp/no_crash_test/int_int.pg @@ -20,15 +20,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -- Test for deprecated signature -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(176) ELSE plan(23) END; SET client_min_messages TO ERROR; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); CREATE OR REPLACE FUNCTION test(params TEXT[], subs TEXT[]) RETURNS SETOF TEXT AS @@ -82,17 +82,17 @@ BEGIN RETURN QUERY SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', - '1', - '2', + '5', + '6', 'true' ]::TEXT[]; subs = ARRAY[ 'NULL::TEXT', 'NULL::TEXT', - '(SELECT id::INTEGER FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id::INTEGER FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id::INTEGER FROM vertices WHERE id IN (-1))', + '(SELECT id::INTEGER FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; @@ -110,24 +110,24 @@ BEGIN params = ARRAY[ '$$edges$$', '$$SELECT * FROM restrictions$$', - '1', - '2', + '5', + '6', 'true' ]::TEXT[]; RETURN query SELECT no_crash_test('pgr_trsp', params, subs); -- ONE TO MANY params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', - '1', - 'ARRAY[2,3]::BIGINT[]', + '5', + 'ARRAY[6,10]::BIGINT[]', 'true' ]::TEXT[]; subs = ARRAY[ 'NULL::TEXT', 'NULL::TEXT', - '(SELECT id::INTEGER FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id::INTEGER FROM vertices WHERE id IN (-1))', 'NULL::BIGINT[]', 'NULL' ]::TEXT[]; @@ -145,25 +145,25 @@ BEGIN params = ARRAY[ '$$edges$$', '$$SELECT * FROM restrictions$$', - '1', - 'ARRAY[2,3]::BIGINT[]', + '5', + 'ARRAY[6,10]::BIGINT[]', 'true' ]::TEXT[]; RETURN query SELECT no_crash_test('pgr_trsp', params, subs); -- MANY TO ONE params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', - 'ARRAY[2,3]::BIGINT[]', - '1', + 'ARRAY[6,10]::BIGINT[]', + '5', 'true' ]::TEXT[]; subs = ARRAY[ 'NULL::TEXT', 'NULL::TEXT', 'NULL::BIGINT[]', - '(SELECT id::INTEGER FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id::INTEGER FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp', params, subs); @@ -180,18 +180,18 @@ BEGIN params = ARRAY[ '$$edges$$', '$$SELECT * FROM restrictions$$', - 'ARRAY[2,3]::BIGINT[]', - '1', + 'ARRAY[6,10]::BIGINT[]', + '5', 'true' ]::TEXT[]; RETURN query SELECT no_crash_test('pgr_trsp', params, subs); -- MANY TO MANY params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', - 'ARRAY[2,3]::BIGINT[]', - 'ARRAY[1,10]::BIGINT[]', + 'ARRAY[6,10]::BIGINT[]', + 'ARRAY[5,7]::BIGINT[]', 'true' ]::TEXT[]; subs = ARRAY[ @@ -215,17 +215,17 @@ BEGIN params = ARRAY[ '$$edges$$', '$$SELECT * FROM restrictions$$', - 'ARRAY[2,3]::BIGINT[]', - 'ARRAY[1,10]::BIGINT[]', + 'ARRAY[6,10]::BIGINT[]', + 'ARRAY[5,7]::BIGINT[]', 'true' ]::TEXT[]; RETURN query SELECT no_crash_test('pgr_trsp', params, subs); -- COMBINATIONS params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', - '$$SELECT * FROM (VALUES (2,1), (2,10),(3,1),(3,10)) AS t(source, target)$$', + '$$SELECT * FROM (VALUES (6,5), (6,8),(10,5),(10,8)) AS t(source, target)$$', 'true' ]::TEXT[]; subs = ARRAY[ @@ -247,23 +247,23 @@ BEGIN params = ARRAY[ '$$edges$$', '$$SELECT * FROM restrictions$$', - '$$SELECT * FROM (VALUES (2,1), (2,10),(3,1),(3,10)) AS t(source, target)$$', + '$$SELECT * FROM (VALUES (6,5), (6,8),(10,5),(10,8)) AS t(source, target)$$', 'true' ]::TEXT[]; RETURN query SELECT no_crash_test('pgr_trsp', params, subs); ELSE - params = ARRAY['SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', - '1', - '2', + params = ARRAY['SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edges', + '5', + '6', 'true', 'true' ]::TEXT[]; subs = ARRAY[ NULL, - '(SELECT id::INTEGER FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id::INTEGER FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id::INTEGER FROM vertices WHERE id IN (-1))', + '(SELECT id::INTEGER FROM vertices WHERE id IN (-1))', 'NULL', 'NULL' ]::TEXT[]; diff --git a/pgtap/trsp/trspVia/compare_dijkstraVia/no_restrictions_directed.pg b/pgtap/trsp/trspVia/compare_dijkstraVia/no_restrictions_directed.pg index bbb60d3a616..9981ccac3f6 100644 --- a/pgtap/trsp/trspVia/compare_dijkstraVia/no_restrictions_directed.pg +++ b/pgtap/trsp/trspVia/compare_dijkstraVia/no_restrictions_directed.pg @@ -22,7 +22,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN CASE WHEN version() LIKE '%SQL 10%' OR version() LIKE '%SQL 11%' THEN plan(1024) ELSE plan(2048) END ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT trspVia_VS_dijstraVia(16, true); diff --git a/pgtap/trsp/trspVia/compare_dijkstraVia/no_restrictions_undirected.pg b/pgtap/trsp/trspVia/compare_dijkstraVia/no_restrictions_undirected.pg index 8f3d8bf05e7..a993229fb64 100644 --- a/pgtap/trsp/trspVia/compare_dijkstraVia/no_restrictions_undirected.pg +++ b/pgtap/trsp/trspVia/compare_dijkstraVia/no_restrictions_undirected.pg @@ -22,7 +22,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN CASE WHEN version() like '%SQL 10%' OR version() like '%SQL 11%' THEN plan(1024) ELSE plan(2048) END ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT trspVia_VS_dijstraVia(16, false); diff --git a/pgtap/trsp/trspVia/edge_cases.pg b/pgtap/trsp/trspVia/edge_cases.pg index aee6540de7b..850d0bfb094 100644 --- a/pgtap/trsp/trspVia/edge_cases.pg +++ b/pgtap/trsp/trspVia/edge_cases.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(5) ELSE plan(1) END; SET client_min_messages TO ERROR; @@ -39,33 +39,33 @@ BEGIN RETURN QUERY SELECT lives_ok($q$ SELECT * FROM pgr_trspVia( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, ARRAY[]::BIGINT[] AS path$$, - ARRAY[2,3])$q$, $q$empty restriction path lives$q$); + ARRAY[6,10])$q$, $q$empty restriction path lives$q$); RETURN QUERY SELECT isnt_empty($q$ SELECT * FROM pgr_trspVia( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, ARRAY[]::BIGINT[] AS path$$, - ARRAY[2,3])$q$, $q$empty restriction path gives non empty result$q$); + ARRAY[6,10])$q$, $q$empty restriction path gives non empty result$q$); RETURN QUERY SELECT lives_ok($q$ SELECT * FROM pgr_trspVia( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, NULL::BIGINT[] AS path$$, - ARRAY[2,3])$q$, $q$null restriction path lives$q$); + ARRAY[6,10])$q$, $q$null restriction path lives$q$); RETURN QUERY SELECT isnt_empty($q$ SELECT * FROM pgr_trspVia( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, NULL::BIGINT[] AS path$$, - ARRAY[2,3])$q$, $q$null restriction path gives non empty result$q$); + ARRAY[6,10])$q$, $q$null restriction path gives non empty result$q$); RETURN QUERY SELECT throws_ok($q$ SELECT * FROM pgr_trspVia( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, ARRAY[NULL]::BIGINT[] AS path$$, - ARRAY[2,3])$q$, + ARRAY[6,10])$q$, $$XX000$$,$$NULL value found in Array!$$, $q$array containing a null path throws$q$); diff --git a/pgtap/trsp/trspVia/inner_query.pg b/pgtap/trsp/trspVia/inner_query.pg index e95212550b2..effbc96cc2c 100644 --- a/pgtap/trsp/trspVia/inner_query.pg +++ b/pgtap/trsp/trspVia/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(66) ELSE plan(1) END; CREATE OR REPLACE FUNCTION inner_query() @@ -33,7 +33,7 @@ BEGIN -- ONE VIA RETURN QUERY SELECT style_dijkstra('pgr_trspVia(', ', $$SELECT * from restrictions$$, ARRAY[2,9,12])'); - RETURN QUERY SELECT innerquery_restrictions('pgr_trspVia($$SELECT * FROM edge_table$$,', ', ARRAY[2,9,12])'); + RETURN QUERY SELECT innerquery_restrictions('pgr_trspVia($$SELECT * FROM edges$$,', ', ARRAY[2,9,12])'); END; $BODY$ diff --git a/pgtap/trsp/trspVia/no_crash_test.pg b/pgtap/trsp/trspVia/no_crash_test.pg index d43c4aa0f84..fe24ed48ef0 100644 --- a/pgtap/trsp/trspVia/no_crash_test.pg +++ b/pgtap/trsp/trspVia/no_crash_test.pg @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(19) ELSE plan(4) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); @@ -51,15 +51,15 @@ END IF; -- ONE VIA params = ARRAY[ -'$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', +'$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT path, cost FROM restrictions$$', -'ARRAY[2,5]::BIGINT[]' +'ARRAY[6,7]::BIGINT[]' ]::TEXT[]; subs = ARRAY[ 'NULL', 'NULL', -'(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' +'(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trspvia', params, subs); diff --git a/pgtap/trsp/trspViaEdges/inner_query.pg b/pgtap/trsp/trspViaEdges/inner_query.pg index c6260ebf124..9006c9ab2d7 100644 --- a/pgtap/trsp/trspViaEdges/inner_query.pg +++ b/pgtap/trsp/trspViaEdges/inner_query.pg @@ -23,7 +23,7 @@ BEGIN; -- Tentatively trsp will accepts ANY-INTEGER and ANY-NUMERICAL on 4.0.0 -- Adjust style_dijkstra_trsp -> style_dijkstra when that happens -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(324); SET client_min_messages TO ERROR; diff --git a/pgtap/trsp/trspViaEdges/no_crash_test.pg b/pgtap/trsp/trspViaEdges/no_crash_test.pg index 9f63f49376b..c7bb8513810 100644 --- a/pgtap/trsp/trspViaEdges/no_crash_test.pg +++ b/pgtap/trsp/trspViaEdges/no_crash_test.pg @@ -19,15 +19,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('4.0.0') THEN plan(22) ELSE plan(21) END; SET client_min_messages TO ERROR; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); CREATE OR REPLACE FUNCTION test(params TEXT[], subs TEXT[]) @@ -77,7 +77,7 @@ BEGIN RETURN QUERY SELECT isnt_empty('edges', 'Should not be empty to tests be meaningful'); RETURN QUERY SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); - params = ARRAY['$$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table$$', + params = ARRAY['$$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edges$$', 'ARRAY[1, 2]', 'ARRAY[0.5, 0.5]::FLOAT[]', 'true', @@ -85,7 +85,7 @@ BEGIN ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id)::INTEGER[] FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id)::INTEGER[] FROM vertices WHERE id IN (-1))', 'NULL::FLOAT[]', 'NULL', 'NULL' @@ -103,7 +103,7 @@ BEGIN ELSE - params = ARRAY['SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', + params = ARRAY['SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edges', 'ARRAY[1]', 'ARRAY[1.5]::FLOAT[]', 'true', @@ -111,7 +111,7 @@ BEGIN ]::TEXT[]; subs = ARRAY[ NULL, - '(SELECT array_agg(id)::INTEGER[] FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id)::INTEGER[] FROM vertices WHERE id IN (-1))', 'NULL::FLOAT[]', 'NULL', 'NULL' diff --git a/pgtap/trsp/trspViaVertices/compare_dijkstra/no_restrictions_directed.pg b/pgtap/trsp/trspViaVertices/compare_dijkstra/no_restrictions_directed.pg index 6c70286d78c..2bd9c11ac12 100644 --- a/pgtap/trsp/trspViaVertices/compare_dijkstra/no_restrictions_directed.pg +++ b/pgtap/trsp/trspViaVertices/compare_dijkstra/no_restrictions_directed.pg @@ -23,7 +23,7 @@ BEGIN; SELECT plan(1024); SET client_min_messages TO ERROR; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT compare_trspViaV_dijstraVia(16, true); diff --git a/pgtap/trsp/trspViaVertices/compare_dijkstra/no_restrictions_undirected.pg b/pgtap/trsp/trspViaVertices/compare_dijkstra/no_restrictions_undirected.pg index f5fa02c67f1..a4a1de5a8d4 100644 --- a/pgtap/trsp/trspViaVertices/compare_dijkstra/no_restrictions_undirected.pg +++ b/pgtap/trsp/trspViaVertices/compare_dijkstra/no_restrictions_undirected.pg @@ -23,7 +23,7 @@ BEGIN; SELECT plan(1024); SET client_min_messages TO ERROR; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT compare_trspViaV_dijstraVia(16, false); diff --git a/pgtap/trsp/trspViaVertices/inner_query.pg b/pgtap/trsp/trspViaVertices/inner_query.pg index 82c0436f4ce..c2708a023cf 100644 --- a/pgtap/trsp/trspViaVertices/inner_query.pg +++ b/pgtap/trsp/trspViaVertices/inner_query.pg @@ -23,7 +23,7 @@ BEGIN; -- Tentatively trsp will accepts ANY-INTEGER and ANY-NUMERICAL on 4.0.0 -- Adjust style_dijkstra_trsp -> style_dijkstra when that happens -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(324); SET client_min_messages TO ERROR; @@ -36,21 +36,21 @@ BEGIN restriction := '$$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, ''32, 33''::TEXT AS via_path$$)'; - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[2,9,12]::INTEGER[], true, true)', TRUE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[2,9,12]::INTEGER[], true, true, NULL)', TRUE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[2,9,12]::INTEGER[], true, true, ' || restriction, TRUE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[6,16,17]::INTEGER[], true, true)', TRUE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[6,16,17]::INTEGER[], true, true, NULL)', TRUE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[6,16,17]::INTEGER[], true, true, ' || restriction, TRUE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[2,9,12]::INTEGER[], false, true)', TRUE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[2,9,12]::INTEGER[], false, true, NULL)', TRUE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[2,9,12]::INTEGER[], false, true, ' || restriction, TRUE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[6,16,17]::INTEGER[], false, true)', TRUE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[6,16,17]::INTEGER[], false, true, NULL)', TRUE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[6,16,17]::INTEGER[], false, true, ' || restriction, TRUE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[2,9,12]::INTEGER[], true, false)', FALSE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[2,9,12]::INTEGER[], true, false, NULL)', FALSE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[2,9,12]::INTEGER[], true, false, ' || restriction, FALSE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[6,16,17]::INTEGER[], true, false)', FALSE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[6,16,17]::INTEGER[], true, false, NULL)', FALSE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[6,16,17]::INTEGER[], true, false, ' || restriction, FALSE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[2,9,12]::INTEGER[], false, false)', FALSE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[2,9,12]::INTEGER[], false, false, NULL)', FALSE); - RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[2,9,12]::INTEGER[], false, false, ' || restriction, FALSE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[6,16,17]::INTEGER[], false, false)', FALSE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[6,16,17]::INTEGER[], false, false, NULL)', FALSE); + RETURN QUERY SELECT style_dijkstra_trsp('pgr_trspViaVertices', ', ARRAY[6,16,17]::INTEGER[], false, false, ' || restriction, FALSE); END; $BODY$ diff --git a/pgtap/trsp/trspViaVertices/no_crash_test.pg b/pgtap/trsp/trspViaVertices/no_crash_test.pg index 91c1aaf0b99..5fa675eb5e3 100644 --- a/pgtap/trsp/trspViaVertices/no_crash_test.pg +++ b/pgtap/trsp/trspViaVertices/no_crash_test.pg @@ -19,15 +19,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('4.0.0') THEN plan(22) ELSE plan(19) END; SET client_min_messages TO ERROR; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); CREATE OR REPLACE FUNCTION test(params TEXT[], subs TEXT[]) RETURNS SETOF TEXT AS @@ -75,14 +75,14 @@ BEGIN RETURN QUERY SELECT isnt_empty('edges', 'Should not be empty to tests be meaningful'); RETURN QUERY SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); - params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + params = ARRAY['$$SELECT id, source, target, cost, reverse_cost FROM edges$$', 'ARRAY[1, 3]', 'true', 'true' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id)::INTEGER[] FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id)::INTEGER[] FROM vertices WHERE id IN (-1))', 'NULL', 'NULL' ]::TEXT[]; @@ -99,14 +99,14 @@ BEGIN ELSE - params = ARRAY['SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table', + params = ARRAY['SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edges', 'ARRAY[1]', 'true', 'true' ]::TEXT[]; subs = ARRAY[ NULL, - '(SELECT array_agg(id)::INTEGER[] FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id)::INTEGER[] FROM vertices WHERE id IN (-1))', 'NULL', 'NULL' ]::TEXT[]; diff --git a/pgtap/trsp/trspVia_withPoints/compare_dijkstraVia/no_restrictions_directed.pg b/pgtap/trsp/trspVia_withPoints/compare_dijkstraVia/no_restrictions_directed.pg index 4255635ede6..306b3d4e63b 100644 --- a/pgtap/trsp/trspVia_withPoints/compare_dijkstraVia/no_restrictions_directed.pg +++ b/pgtap/trsp/trspVia_withPoints/compare_dijkstraVia/no_restrictions_directed.pg @@ -22,7 +22,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN CASE WHEN version() LIKE '%SQL 10%' OR version() LIKE '%SQL 11%' THEN plan(1024) ELSE plan(2048) END ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT trspVia_withPoints_VS_withPointsVia(16, true); diff --git a/pgtap/trsp/trspVia_withPoints/compare_dijkstraVia/no_restrictions_undirected.pg b/pgtap/trsp/trspVia_withPoints/compare_dijkstraVia/no_restrictions_undirected.pg index 4792520814e..c67b2684dbb 100644 --- a/pgtap/trsp/trspVia_withPoints/compare_dijkstraVia/no_restrictions_undirected.pg +++ b/pgtap/trsp/trspVia_withPoints/compare_dijkstraVia/no_restrictions_undirected.pg @@ -22,7 +22,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN CASE WHEN version() LIKE '%SQL 10%' OR version() LIKE '%SQL 11%' THEN plan(1024) ELSE plan(2048) END ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT trspVia_withPoints_VS_withPointsVia(16, false); diff --git a/pgtap/trsp/trspVia_withPoints/edge_cases.pg b/pgtap/trsp/trspVia_withPoints/edge_cases.pg index b3cb950ac1c..a914594d1bd 100644 --- a/pgtap/trsp/trspVia_withPoints/edge_cases.pg +++ b/pgtap/trsp/trspVia_withPoints/edge_cases.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(5) ELSE plan(1) END; SET client_min_messages TO ERROR; @@ -39,38 +39,38 @@ BEGIN RETURN QUERY SELECT lives_ok($q$ SELECT * FROM pgr_trspVia_withPoints( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, ARRAY[]::BIGINT[] AS path$$, $$SELECT * FROM pointsOfInterest$$, - ARRAY[2,3])$q$, $q$empty restriction path lives$q$); + ARRAY[6,10])$q$, $q$empty restriction path lives$q$); RETURN QUERY SELECT isnt_empty($q$ SELECT * FROM pgr_trspVia_withPoints( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, ARRAY[]::BIGINT[] AS path$$, $$SELECT * FROM pointsOfInterest$$, - ARRAY[2,3])$q$, $q$empty restriction path gives non empty result$q$); + ARRAY[6,10])$q$, $q$empty restriction path gives non empty result$q$); RETURN QUERY SELECT lives_ok($q$ SELECT * FROM pgr_trspVia_withPoints( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, NULL::BIGINT[] AS path$$, $$SELECT * FROM pointsOfInterest$$, - ARRAY[2,3])$q$, $q$null restriction path lives$q$); + ARRAY[6,10])$q$, $q$null restriction path lives$q$); RETURN QUERY SELECT isnt_empty($q$ SELECT * FROM pgr_trspVia_withPoints( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, NULL::BIGINT[] AS path$$, $$SELECT * FROM pointsOfInterest$$, - ARRAY[2,3])$q$, $q$null restriction path gives non empty result$q$); + ARRAY[6,10])$q$, $q$null restriction path gives non empty result$q$); RETURN QUERY SELECT throws_ok($q$ SELECT * FROM pgr_trspVia_withPoints( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, ARRAY[NULL]::BIGINT[] AS path$$, $$SELECT * FROM pointsOfInterest$$, - ARRAY[2,3])$q$, + ARRAY[6,10])$q$, $$XX000$$,$$NULL value found in Array!$$, $q$array containing a null path throws$q$); diff --git a/pgtap/trsp/trspVia_withPoints/inner_query.pg b/pgtap/trsp/trspVia_withPoints/inner_query.pg index 2d03f0d2d82..e44ab454990 100644 --- a/pgtap/trsp/trspVia_withPoints/inner_query.pg +++ b/pgtap/trsp/trspVia_withPoints/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(96) ELSE plan(1) END; CREATE OR REPLACE FUNCTION inner_query() @@ -35,9 +35,9 @@ BEGIN RETURN QUERY SELECT style_dijkstra( 'pgr_trspVia_withPoints(', ', $$SELECT * from restrictions$$, $$SELECT * FROM pointsOfInterest$$, ARRAY[2,9,12])'); RETURN QUERY SELECT innerquery_restrictions( - 'pgr_trspVia_withPoints($$SELECT * FROM edge_table$$,', ', $$SELECT * FROM pointsOfInterest$$, ARRAY[2,9,12])'); + 'pgr_trspVia_withPoints($$SELECT * FROM edges$$,', ', $$SELECT * FROM pointsOfInterest$$, ARRAY[2,9,12])'); RETURN QUERY SELECT innerquery_points( - 'pgr_trspVia_withPoints($$SELECT * FROM edge_table$$, $$SELECT * from restrictions$$,', ', ARRAY[2,9,12])'); + 'pgr_trspVia_withPoints($$SELECT * FROM edges$$, $$SELECT * from restrictions$$,', ', ARRAY[2,9,12])'); END; $BODY$ diff --git a/pgtap/trsp/trspVia_withPoints/no_crash_test.pg b/pgtap/trsp/trspVia_withPoints/no_crash_test.pg index a93eb01ed81..ad3d79dac4c 100644 --- a/pgtap/trsp/trspVia_withPoints/no_crash_test.pg +++ b/pgtap/trsp/trspVia_withPoints/no_crash_test.pg @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(23) ELSE plan(4) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); @@ -51,17 +51,17 @@ END IF; -- ONE VIA params = ARRAY[ -'$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', +'$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT path, cost FROM restrictions$$', '$$SELECT * FROM pointsofinterest$$', -'ARRAY[2,5]::BIGINT[]' +'ARRAY[5,6]::BIGINT[]' ]::TEXT[]; subs = ARRAY[ 'NULL', 'NULL', 'NULL', -'(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' +'(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trspvia_withPoints', params, subs); diff --git a/pgtap/trsp/trsp_withpoints/compare/dijkstra/many_to_many.pg b/pgtap/trsp/trsp_withpoints/compare/dijkstra/many_to_many.pg index 39381c9e3c6..2ab9e5245ff 100644 --- a/pgtap/trsp/trsp_withpoints/compare/dijkstra/many_to_many.pg +++ b/pgtap/trsp/trsp_withpoints/compare/dijkstra/many_to_many.pg @@ -21,7 +21,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN plan(4) ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION compareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -45,8 +45,8 @@ BEGIN result_columns := 'seq, start_vid, end_vid, node, edge, cost'; empty_points := 'SELECT * FROM pointsofinterest WHERE pid IN (-1)'; empty_restrictions := 'SELECT * FROM restrictions WHERE id > 10'; - with_reverse := 'SELECT * FROM edge_table'; - no_reverse := 'SELECT id, source, target, cost FROM edge_table'; + with_reverse := 'SELECT * FROM edges'; + no_reverse := 'SELECT id, source, target, cost FROM edges'; arr := 'ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,16,17,18]'; diff --git a/pgtap/trsp/trsp_withpoints/compare/dijkstra/many_to_one.pg b/pgtap/trsp/trsp_withpoints/compare/dijkstra/many_to_one.pg index 754def41bb2..0c4160c569b 100644 --- a/pgtap/trsp/trsp_withpoints/compare/dijkstra/many_to_one.pg +++ b/pgtap/trsp/trsp_withpoints/compare/dijkstra/many_to_one.pg @@ -21,7 +21,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN plan(68) ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION compareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -45,8 +45,8 @@ BEGIN result_columns := 'seq, start_vid, node, edge, cost'; empty_points := 'SELECT * FROM pointsofinterest WHERE pid IN (-1)'; empty_restrictions := 'SELECT * FROM restrictions WHERE id > 10'; - with_reverse := 'SELECT * FROM edge_table'; - no_reverse := 'SELECT id, source, target, cost FROM edge_table'; + with_reverse := 'SELECT * FROM edges'; + no_reverse := 'SELECT id, source, target, cost FROM edges'; FOR j IN 1.. cant LOOP arr := 'ARRAY[1,2,3,4,5,6,7,8]'; diff --git a/pgtap/trsp/trsp_withpoints/compare/dijkstra/one_to_many.pg b/pgtap/trsp/trsp_withpoints/compare/dijkstra/one_to_many.pg index b708bc9f3ad..9608fbafdac 100644 --- a/pgtap/trsp/trsp_withpoints/compare/dijkstra/one_to_many.pg +++ b/pgtap/trsp/trsp_withpoints/compare/dijkstra/one_to_many.pg @@ -21,7 +21,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN plan(68) ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION compareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -45,8 +45,8 @@ BEGIN result_columns := 'seq, end_vid, node, edge, cost, agg_cost'; empty_points := 'SELECT * FROM pointsofinterest WHERE pid IN (-1)'; empty_restrictions := 'SELECT * FROM restrictions WHERE id > 10'; - with_reverse := 'SELECT * FROM edge_table'; - no_reverse := 'SELECT id, source, target, cost FROM edge_table'; + with_reverse := 'SELECT * FROM edges'; + no_reverse := 'SELECT id, source, target, cost FROM edges'; FOR i IN 1.. cant LOOP arr := 'ARRAY[1,2,3,4,5,6,7,8]'; diff --git a/pgtap/trsp/trsp_withpoints/compare/dijkstra/one_to_one.pg b/pgtap/trsp/trsp_withpoints/compare/dijkstra/one_to_one.pg index 148e3c743b1..8ceb1644b71 100644 --- a/pgtap/trsp/trsp_withpoints/compare/dijkstra/one_to_one.pg +++ b/pgtap/trsp/trsp_withpoints/compare/dijkstra/one_to_one.pg @@ -21,7 +21,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN plan(1156) ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION compareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -44,8 +44,8 @@ BEGIN result_columns := 'seq, path_seq, node, edge, cost, agg_cost'; empty_points := 'SELECT * FROM pointsofinterest WHERE pid IN (-1)'; empty_restrictions := 'SELECT * FROM restrictions WHERE id > 10'; - with_reverse := 'SELECT * FROM edge_table'; - no_reverse := 'SELECT id, source, target, cost FROM edge_table'; + with_reverse := 'SELECT * FROM edges'; + no_reverse := 'SELECT id, source, target, cost FROM edges'; FOR i IN 1.. cant LOOP FOR j IN 1.. cant LOOP diff --git a/pgtap/trsp/trsp_withpoints/compare/withpoints/many_to_many.pg b/pgtap/trsp/trsp_withpoints/compare/withpoints/many_to_many.pg index 77349b83984..5109fea81ed 100644 --- a/pgtap/trsp/trsp_withpoints/compare/withpoints/many_to_many.pg +++ b/pgtap/trsp/trsp_withpoints/compare/withpoints/many_to_many.pg @@ -21,7 +21,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN plan(4) ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION compareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -47,8 +47,8 @@ BEGIN result_columns_vid := 'seq, start_pid AS start_vid, end_pid AS end_vid, node, edge, cost, agg_cost'; points := 'SELECT * FROM pointsofinterest'; empty_restrictions := 'SELECT * FROM restrictions WHERE id > 10'; - with_reverse := 'SELECT * FROM edge_table'; - no_reverse := 'SELECT id, source, target, cost FROM edge_table'; + with_reverse := 'SELECT * FROM edges'; + no_reverse := 'SELECT id, source, target, cost FROM edges'; arr := 'ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,16,17,18]'; points_sql := 'SELECT ' || result_columns_vid || ' FROM pgr_withpoints($$' || with_reverse || '$$, $$' || points || '$$, ' diff --git a/pgtap/trsp/trsp_withpoints/compare/withpoints/many_to_one.pg b/pgtap/trsp/trsp_withpoints/compare/withpoints/many_to_one.pg index efe288632a6..117fa26c36e 100644 --- a/pgtap/trsp/trsp_withpoints/compare/withpoints/many_to_one.pg +++ b/pgtap/trsp/trsp_withpoints/compare/withpoints/many_to_one.pg @@ -21,7 +21,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN plan(68) ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION compareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -47,8 +47,8 @@ BEGIN result_columns_vid := 'seq, start_pid AS start_vid, node, edge, cost, agg_cost'; points := 'SELECT * FROM pointsofinterest WHERE pid IN (-1)'; empty_restrictions := 'SELECT * FROM restrictions WHERE id > 10'; - with_reverse := 'SELECT * FROM edge_table'; - no_reverse := 'SELECT id, source, target, cost FROM edge_table'; + with_reverse := 'SELECT * FROM edges'; + no_reverse := 'SELECT id, source, target, cost FROM edges'; arr := 'ARRAY[1,2,3,4,5,6,7,8]'; FOR j IN 1.. cant LOOP diff --git a/pgtap/trsp/trsp_withpoints/compare/withpoints/one_to_many.pg b/pgtap/trsp/trsp_withpoints/compare/withpoints/one_to_many.pg index ee3ba1b2063..7b0a09480f9 100644 --- a/pgtap/trsp/trsp_withpoints/compare/withpoints/one_to_many.pg +++ b/pgtap/trsp/trsp_withpoints/compare/withpoints/one_to_many.pg @@ -21,7 +21,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN plan(68) ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION compareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -47,8 +47,8 @@ BEGIN result_columns_vid := 'seq, end_pid AS end_vid, node, edge, cost, agg_cost'; points := 'SELECT * FROM pointsofinterest'; empty_restrictions := 'SELECT * FROM restrictions WHERE id > 10'; - with_reverse := 'SELECT * FROM edge_table'; - no_reverse := 'SELECT id, source, target, cost FROM edge_table'; + with_reverse := 'SELECT * FROM edges'; + no_reverse := 'SELECT id, source, target, cost FROM edges'; arr := 'ARRAY[1,2,3,4,5,6,7,8]'; FOR i IN 1.. cant LOOP diff --git a/pgtap/trsp/trsp_withpoints/compare/withpoints/one_to_one.pg b/pgtap/trsp/trsp_withpoints/compare/withpoints/one_to_one.pg index 1b17566b7e2..e69d9a26e97 100644 --- a/pgtap/trsp/trsp_withpoints/compare/withpoints/one_to_one.pg +++ b/pgtap/trsp/trsp_withpoints/compare/withpoints/one_to_one.pg @@ -21,7 +21,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN plan(1156) ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION compareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -44,8 +44,8 @@ BEGIN result_columns := 'seq, path_seq, node, edge, cost, agg_cost'; points := 'SELECT * FROM pointsofinterest'; empty_restrictions := 'SELECT * FROM restrictions WHERE id > 10'; - with_reverse := 'SELECT * FROM edge_table'; - no_reverse := 'SELECT id, source, target, cost FROM edge_table'; + with_reverse := 'SELECT * FROM edges'; + no_reverse := 'SELECT id, source, target, cost FROM edges'; FOR i IN 1.. cant LOOP FOR j IN 1.. cant LOOP diff --git a/pgtap/trsp/trsp_withpoints/edge_cases.pg b/pgtap/trsp/trsp_withpoints/edge_cases.pg index 259ff970569..9870d3d8c03 100644 --- a/pgtap/trsp/trsp_withpoints/edge_cases.pg +++ b/pgtap/trsp/trsp_withpoints/edge_cases.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(5) ELSE plan(1) END; SET client_min_messages TO ERROR; @@ -40,38 +40,38 @@ BEGIN RETURN QUERY SELECT lives_ok($q$ SELECT * FROM pgr_trsp_withPoints( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, ARRAY[]::BIGINT[] AS path$$, $$SELECT * FROM pointsofinterest$$, - 2,3)$q$, $q$empty restriction path lives$q$); + 6,10)$q$, $q$empty restriction path lives$q$); RETURN QUERY SELECT isnt_empty($q$ SELECT * FROM pgr_trsp_withPoints( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, ARRAY[]::BIGINT[] AS path$$, $$SELECT * FROM pointsofinterest$$, - 2,3)$q$, $q$empty restriction path gives non empty result$q$); + 6,10)$q$, $q$empty restriction path gives non empty result$q$); RETURN QUERY SELECT lives_ok($q$ SELECT * FROM pgr_trsp_withPoints( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, NULL::BIGINT[] AS path$$, $$SELECT * FROM pointsofinterest$$, - 2,3)$q$, $q$null restriction path lives$q$); + 6,10)$q$, $q$null restriction path lives$q$); RETURN QUERY SELECT isnt_empty($q$ SELECT * FROM pgr_trsp_withPoints( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, NULL::BIGINT[] AS path$$, $$SELECT * FROM pointsofinterest$$, - 2,3)$q$, $q$null restriction path gives non empty result$q$); + 6,10)$q$, $q$null restriction path gives non empty result$q$); RETURN QUERY SELECT throws_ok($q$ SELECT * FROM pgr_trsp_withPoints( - $$SELECT * FROM edge_table$$, + $$SELECT * FROM edges$$, $$SELECT 100::FLOAT AS cost, ARRAY[NULL]::BIGINT[] AS path$$, $$SELECT * FROM pointsofinterest$$, - 2,3)$q$, + 6,10)$q$, $$XX000$$,$$NULL value found in Array!$$, $q$array containing a null path throws$q$); diff --git a/pgtap/trsp/trsp_withpoints/inner_query.pg b/pgtap/trsp/trsp_withpoints/inner_query.pg index 2377dcc9d39..528c86aa5ae 100644 --- a/pgtap/trsp/trsp_withpoints/inner_query.pg +++ b/pgtap/trsp/trsp_withpoints/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(492) ELSE plan(1) END; @@ -33,25 +33,25 @@ BEGIN -- ONE TO ONE RETURN QUERY SELECT style_dijkstra('pgr_trsp_withPoints(', ', $$SELECT * from restrictions$$, $$SELECT * from pointsOfInterest$$, 2, 3, false)'); - RETURN QUERY SELECT innerquery_restrictions('pgr_trsp_withPoints($$SELECT * FROM edge_table$$,', ',$$SELECT * from pointsOfInterest$$, 2, 3, false)'); - RETURN QUERY SELECT innerquery_points('pgr_trsp_withPoints($$SELECT * FROM edge_table$$,$$SELECT * from restrictions$$,', ', 2, 3, false)'); + RETURN QUERY SELECT innerquery_restrictions('pgr_trsp_withPoints($$SELECT * FROM edges$$,', ',$$SELECT * from pointsOfInterest$$, 2, 3, false)'); + RETURN QUERY SELECT innerquery_points('pgr_trsp_withPoints($$SELECT * FROM edges$$,$$SELECT * from restrictions$$,', ', 2, 3, false)'); -- ONE TO MANY RETURN QUERY SELECT style_dijkstra('pgr_trsp_withPoints(', ', $$SELECT * from restrictions$$,$$SELECT * from pointsOfInterest$$, 2, ARRAY[3], false)'); - RETURN QUERY SELECT innerquery_restrictions('pgr_trsp_withPoints($$SELECT * FROM edge_table$$,', ',$$SELECT * from pointsOfInterest$$, 2, ARRAY[3], false)'); - RETURN QUERY SELECT innerquery_points('pgr_trsp_withPoints($$SELECT * FROM edge_table$$,$$SELECT * from restrictions$$,', ', 2, ARRAY[3], false)'); + RETURN QUERY SELECT innerquery_restrictions('pgr_trsp_withPoints($$SELECT * FROM edges$$,', ',$$SELECT * from pointsOfInterest$$, 2, ARRAY[3], false)'); + RETURN QUERY SELECT innerquery_points('pgr_trsp_withPoints($$SELECT * FROM edges$$,$$SELECT * from restrictions$$,', ', 2, ARRAY[3], false)'); -- MANY TO ONE RETURN QUERY SELECT style_dijkstra('pgr_trsp_withPoints(', ', $$SELECT * from restrictions$$,$$SELECT * from pointsOfInterest$$, ARRAY[2], 3, false)'); - RETURN QUERY SELECT innerquery_restrictions('pgr_trsp_withPoints($$SELECT * FROM edge_table$$,', ',$$SELECT * from pointsOfInterest$$, ARRAY[2], 3, false)'); - RETURN QUERY SELECT innerquery_points('pgr_trsp_withPoints($$SELECT * FROM edge_table$$,$$SELECT * from restrictions$$,', ', ARRAY[2], 3, false)'); + RETURN QUERY SELECT innerquery_restrictions('pgr_trsp_withPoints($$SELECT * FROM edges$$,', ',$$SELECT * from pointsOfInterest$$, ARRAY[2], 3, false)'); + RETURN QUERY SELECT innerquery_points('pgr_trsp_withPoints($$SELECT * FROM edges$$,$$SELECT * from restrictions$$,', ', ARRAY[2], 3, false)'); -- MANY TO MANY RETURN QUERY SELECT style_dijkstra('pgr_trsp_withPoints(', ', $$SELECT * from restrictions$$,$$SELECT * from pointsOfInterest$$, ARRAY[2], ARRAY[3], false)'); - RETURN QUERY SELECT innerquery_restrictions('pgr_trsp_withPoints($$SELECT * FROM edge_table$$,', ',$$SELECT * from pointsOfInterest$$, ARRAY[2], ARRAY[3], false)'); - RETURN QUERY SELECT innerquery_points('pgr_trsp_withPoints($$SELECT * FROM edge_table$$,$$SELECT * from restrictions$$,', ', ARRAY[2], ARRAY[3], false)'); + RETURN QUERY SELECT innerquery_restrictions('pgr_trsp_withPoints($$SELECT * FROM edges$$,', ',$$SELECT * from pointsOfInterest$$, ARRAY[2], ARRAY[3], false)'); + RETURN QUERY SELECT innerquery_points('pgr_trsp_withPoints($$SELECT * FROM edges$$,$$SELECT * from restrictions$$,', ', ARRAY[2], ARRAY[3], false)'); -- COMBINATIONS - RETURN QUERY SELECT style_dijkstra('pgr_trsp_withPoints(', ', $$SELECT * from restrictions$$,$$SELECT * from pointsOfInterest$$, $$SELECT * FROM combinations_table$$, false)'); - RETURN QUERY SELECT innerquery_restrictions('pgr_trsp_withPoints($$SELECT * FROM edge_table$$,', ',$$SELECT * from pointsOfInterest$$, $$SELECT * FROM combinations_table$$, false)'); - RETURN QUERY SELECT innerquery_points('pgr_trsp_withPoints($$SELECT * FROM edge_table$$,$$SELECT * from restrictions$$,', ', $$SELECT * FROM combinations_table$$, false)'); - RETURN QUERY SELECT innerquery_combinations('pgr_trsp_withPoints($$SELECT * FROM edge_table$$,$$SELECT * from restrictions$$,$$SELECT * from pointsOfInterest$$,',', false)'); + RETURN QUERY SELECT style_dijkstra('pgr_trsp_withPoints(', ', $$SELECT * from restrictions$$,$$SELECT * from pointsOfInterest$$, $$SELECT * FROM combinations$$, false)'); + RETURN QUERY SELECT innerquery_restrictions('pgr_trsp_withPoints($$SELECT * FROM edges$$,', ',$$SELECT * from pointsOfInterest$$, $$SELECT * FROM combinations$$, false)'); + RETURN QUERY SELECT innerquery_points('pgr_trsp_withPoints($$SELECT * FROM edges$$,$$SELECT * from restrictions$$,', ', $$SELECT * FROM combinations$$, false)'); + RETURN QUERY SELECT innerquery_combinations('pgr_trsp_withPoints($$SELECT * FROM edges$$,$$SELECT * from restrictions$$,$$SELECT * from pointsOfInterest$$,',', false)'); END $BODY$ diff --git a/pgtap/trsp/trsp_withpoints/no_crash_test.pg b/pgtap/trsp/trsp_withpoints/no_crash_test.pg index 47cee6a9ce6..ef574d91994 100644 --- a/pgtap/trsp/trsp_withpoints/no_crash_test.pg +++ b/pgtap/trsp/trsp_withpoints/no_crash_test.pg @@ -19,15 +19,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(479) ELSE plan(1) END; SET client_min_messages TO ERROR; PREPARE all_edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE empty_edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id > 20; +SELECT id, source, target, cost, reverse_cost FROM edges WHERE id > 20; PREPARE all_restrictions AS SELECT * FROM restrictions; @@ -36,13 +36,13 @@ PREPARE empty_restrictions AS SELECT * FROM restrictions WHERE id > 7; PREPARE all_combinations AS -SELECT * FROM combinations_table; +SELECT * FROM combinations; PREPARE empty_combinations AS -SELECT * FROM combinations_table WHERE source = 20; +SELECT * FROM combinations WHERE source = 20; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE all_points AS SELECT * FROM pointsofinterest; @@ -110,13 +110,13 @@ BEGIN RETURN QUERY SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); -- ONE TO ONE - params = ARRAY['$$all_edges$$', '$$all_restrictions$$', '$$all_points$$','1', '2', 'false']::TEXT[]; - params1 = ARRAY['$$all_edges$$', '$$empty_restrictions$$', '$$all_points$$', '1', '2', 'false']::TEXT[]; - params2 = ARRAY['$$all_edges$$', '$$all_restrictions$$', '$$empty_points$$', '1', '2', 'false']::TEXT[]; + params = ARRAY['$$all_edges$$', '$$all_restrictions$$', '$$all_points$$','5', '6', 'false']::TEXT[]; + params1 = ARRAY['$$all_edges$$', '$$empty_restrictions$$', '$$all_points$$', '5', '6', 'false']::TEXT[]; + params2 = ARRAY['$$all_edges$$', '$$all_restrictions$$', '$$empty_points$$', '5', '6', 'false']::TEXT[]; subs = ARRAY['$$empty_edges$$', 'NULL', 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params, subs); @@ -129,23 +129,23 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params2, subs); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', '$$SELECT * FROM pointsofinterest$$', - '1', - '2', + '5', + '6', 'false' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params, subs); -- ONE TO MANY - params = ARRAY['$$all_edges$$', '$$all_restrictions$$', '$$all_points$$','1', 'ARRAY[2,3]', 'false']::TEXT[]; - params1 = ARRAY['$$all_edges$$', '$$empty_restrictions$$','$$all_points$$', '1', 'ARRAY[2,3]', 'false']::TEXT[]; - params2 = ARRAY['$$all_edges$$', '$$all_restrictions$$','$$empty_points$$', '1', 'ARRAY[2,3]', 'false']::TEXT[]; + params = ARRAY['$$all_edges$$', '$$all_restrictions$$', '$$all_points$$','5', 'ARRAY[6,10]', 'false']::TEXT[]; + params1 = ARRAY['$$all_edges$$', '$$empty_restrictions$$','$$all_points$$', '5', 'ARRAY[6,10]', 'false']::TEXT[]; + params2 = ARRAY['$$all_edges$$', '$$all_restrictions$$','$$empty_points$$', '5', 'ARRAY[6,10]', 'false']::TEXT[]; subs = ARRAY['$$empty_edges$$', 'NULL','NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params, subs); @@ -165,23 +165,23 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params2, subs); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', '$$SELECT * FROM pointsofinterest$$', '1', - 'ARRAY[2,3]', + 'ARRAY[6,10]', 'false' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params, subs); -- MANY TO ONE - params = ARRAY['$$all_edges$$', '$$all_restrictions$$', '$$all_points$$','ARRAY[2,3]', '1', 'false']::TEXT[]; - params1 = ARRAY['$$all_edges$$', '$$empty_restrictions$$', '$$all_points$$','ARRAY[2,3]', '1', 'false']::TEXT[]; - params2 = ARRAY['$$all_edges$$', '$$empty_restrictions$$', '$$empty_points$$','ARRAY[2,3]', '1', 'false']::TEXT[]; + params = ARRAY['$$all_edges$$', '$$all_restrictions$$', '$$all_points$$','ARRAY[6,10]', '5', 'false']::TEXT[]; + params1 = ARRAY['$$all_edges$$', '$$empty_restrictions$$', '$$all_points$$','ARRAY[6,10]', '5', 'false']::TEXT[]; + params2 = ARRAY['$$all_edges$$', '$$empty_restrictions$$', '$$empty_points$$','ARRAY[6,10]', '5', 'false']::TEXT[]; subs = ARRAY['$$empty_edges$$', 'NULL','NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params, subs); @@ -201,23 +201,23 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params2, subs); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', '$$SELECT * FROM pointsofinterest$$', - 'ARRAY[2,3]', + 'ARRAY[6,10]', '1', 'false' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params, subs); -- MANY TO MANY - params = ARRAY['$$all_edges$$', '$$all_restrictions$$', '$$all_points$$','ARRAY[2,3]::BIGINT[]', 'ARRAY[1,10]::BIGINT[]', 'false']::TEXT[]; - params1 = ARRAY['$$all_edges$$', '$$empty_restrictions$$','$$all_points$$', 'ARRAY[2,3]::BIGINT[]', 'ARRAY[1,10]::BIGINT[]', 'false']::TEXT[]; - params2 = ARRAY['$$all_edges$$', '$$empty_restrictions$$','$$empty_points$$', 'ARRAY[2,3]::BIGINT[]', 'ARRAY[1,10]::BIGINT[]', 'false']::TEXT[]; + params = ARRAY['$$all_edges$$', '$$all_restrictions$$', '$$all_points$$','ARRAY[6,10]::BIGINT[]', 'ARRAY[5,8]::BIGINT[]', 'false']::TEXT[]; + params1 = ARRAY['$$all_edges$$', '$$empty_restrictions$$','$$all_points$$', 'ARRAY[6,10]::BIGINT[]', 'ARRAY[5,8]::BIGINT[]', 'false']::TEXT[]; + params2 = ARRAY['$$all_edges$$', '$$empty_restrictions$$','$$empty_points$$', 'ARRAY[6,10]::BIGINT[]', 'ARRAY[5,8]::BIGINT[]', 'false']::TEXT[]; subs = ARRAY['$$empty_edges$$', 'NULL','NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params, subs); @@ -237,11 +237,11 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params2, subs); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', '$$SELECT * FROM pointsofinterest$$', - 'ARRAY[2,3]::BIGINT[]', - 'ARRAY[1,10]::BIGINT[]', + 'ARRAY[6,10]::BIGINT[]', + 'ARRAY[5,8]::BIGINT[]', 'false' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params, subs); @@ -268,10 +268,10 @@ BEGIN RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params2, subs); params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT * FROM restrictions$$', '$$SELECT * FROM pointsofinterest$$', - '$$SELECT * FROM combinations_table$$', + '$$SELECT * FROM combinations$$', 'false' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_trsp_withpoints', params, subs); diff --git a/pgtap/tsp/TSPeuclidean/edge_cases/edge_cases.pg b/pgtap/tsp/TSPeuclidean/edge_cases/edge_cases.pg index d8973661a1a..3334f8ce122 100644 --- a/pgtap/tsp/TSPeuclidean/edge_cases/edge_cases.pg +++ b/pgtap/tsp/TSPeuclidean/edge_cases/edge_cases.pg @@ -19,12 +19,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; SET client_min_messages TO WARNING; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT CASE WHEN min_lib_version('3.2.1') THEN plan(22) ELSE plan(15) END; CREATE TEMP TABLE data AS -SELECT id, st_X(the_geom) AS x, st_Y(the_geom)AS y FROM edge_table_vertices_pgr; +SELECT id, st_X(geom) AS x, st_Y(geom)AS y FROM vertices; CREATE FUNCTION tsp_edge_cases(tbl regclass) RETURNS SETOF TEXT AS @@ -95,7 +95,7 @@ BEGIN $q$SELECT * FROM pgr_TSPeuclidean( $$ SELECT source AS start_vid, target AS end_vid, 1 AS agg_cost - FROM edge_table + FROM edges WHERE id IN (2,4,5,8,9,15) $$) $q$, diff --git a/pgtap/tsp/TSPeuclidean/edge_cases/illegal_values.pg b/pgtap/tsp/TSPeuclidean/edge_cases/illegal_values.pg index 32121c0cf3a..800a1526aff 100644 --- a/pgtap/tsp/TSPeuclidean/edge_cases/illegal_values.pg +++ b/pgtap/tsp/TSPeuclidean/edge_cases/illegal_values.pg @@ -21,12 +21,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SET client_min_messages TO WARNING; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('4.0.0') THEN plan(1) ELSE plan(9) END; CREATE TEMP TABLE data AS -SELECT id, ST_X(the_geom) AS x, ST_Y(the_geom) AS y -FROM edge_table_vertices_pgr; +SELECT id, ST_X(geom) AS x, ST_Y(geom) AS y +FROM vertices; SELECT annaeling_parameters('pgr_tspeuclidean'); diff --git a/pgtap/tsp/TSPeuclidean/inner_query.pg b/pgtap/tsp/TSPeuclidean/inner_query.pg index 9befb9a9698..7787e42037d 100644 --- a/pgtap/tsp/TSPeuclidean/inner_query.pg +++ b/pgtap/tsp/TSPeuclidean/inner_query.pg @@ -19,12 +19,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(18); CREATE TEMP TABLE data AS -SELECT id, ST_X(the_geom) AS x, ST_Y(the_geom) AS y -FROM edge_table_vertices_pgr; +SELECT id, ST_X(geom) AS x, ST_Y(geom) AS y +FROM vertices; SELECT tsp_anyInteger('pgr_tspeuclidean', ARRAY['id', 'x', 'y'], diff --git a/pgtap/tsp/TSPeuclidean/no_crash_test.pg b/pgtap/tsp/TSPeuclidean/no_crash_test.pg index bd448dc373b..35b8667106e 100644 --- a/pgtap/tsp/TSPeuclidean/no_crash_test.pg +++ b/pgtap/tsp/TSPeuclidean/no_crash_test.pg @@ -20,11 +20,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SET client_min_messages TO WARNING; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(9); CREATE TEMP TABLE data AS -SELECT id, st_X(the_geom) AS x, st_Y(the_geom)AS y FROM edge_table_vertices_pgr; +SELECT id, st_X(geom) AS x, st_Y(geom)AS y FROM vertices; SELECT isnt_empty('SELECT * FROM data', 'Should not be empty true to tests be meaningful'); SELECT tspeuclidean_no_crash(); diff --git a/pgtap/tsp/tsp/edge_cases/edge_cases.pg b/pgtap/tsp/tsp/edge_cases/edge_cases.pg index 1931eb95430..cea7faa343f 100644 --- a/pgtap/tsp/tsp/edge_cases/edge_cases.pg +++ b/pgtap/tsp/tsp/edge_cases/edge_cases.pg @@ -19,21 +19,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; SET client_min_messages TO WARNING; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT CASE WHEN min_lib_version('3.2.1') THEN plan(56) ELSE plan(18) END; CREATE TEMP TABLE data AS SELECT * FROM pgr_withPointsCostMatrix( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction from pointsOfInterest', - array[-1, 3, 5, 6, -6], directed := false); + array[-1, 10, 7, 11, -6], directed := false); CREATE TEMP TABLE data_directed AS SELECT * FROM pgr_withPointsCostMatrix( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction from pointsOfInterest', - array[-1, 3, 5, 6, -6], directed := true); + array[-1, 10, 7, 11, -6], directed := true); CREATE FUNCTION tsp_edge_cases(tbl regclass) @@ -50,28 +50,28 @@ BEGIN RETURN QUERY SELECT throws_ok(format($$ - SELECT * FROM pgr_TSP('SELECT * FROM %1$I', start_id => 5, end_id => 10) $$, tbl), + SELECT * FROM pgr_TSP('SELECT * FROM %1$I', start_id => 7, end_id => 8) $$, tbl), 'XX000', $$Parameter 'end_id' do not exist on the data$$, tbl::TEXT ||' SHOULD throw because end_id does not exist'); RETURN QUERY SELECT throws_ok(format($$ - SELECT * FROM pgr_TSP('SELECT * FROM %1$I', end_id => 10) $$, tbl), + SELECT * FROM pgr_TSP('SELECT * FROM %1$I', end_id => 8) $$, tbl), 'XX000', $$Parameter 'end_id' do not exist on the data$$, 'SHOULD throw because end_id does not exist'); RETURN QUERY SELECT throws_ok(format($$ - SELECT * FROM pgr_TSP('SELECT * FROM %1$I', start_id => 10, end_id => 5) $$, tbl), + SELECT * FROM pgr_TSP('SELECT * FROM %1$I', start_id => 8, end_id => 7) $$, tbl), 'XX000', $$Parameter 'start_id' do not exist on the data$$, 'SHOULD throw because start_vid does not exist'); RETURN QUERY SELECT throws_ok(format($$ - SELECT * FROM pgr_TSP('SELECT * FROM %1$I', start_id => 10) $$, tbl), + SELECT * FROM pgr_TSP('SELECT * FROM %1$I', start_id => 8) $$, tbl), 'XX000', $$Parameter 'start_id' do not exist on the data$$, 'SHOULD throw because start_vid does not exist'); @@ -80,9 +80,9 @@ BEGIN SELECT throws_ok( format($$ SELECT * FROM pgr_TSP( - 'SELECT * FROM %1$I WHERE start_vid = -1 and end_vid = 3 + 'SELECT * FROM %1$I WHERE start_vid = -1 and end_vid = 10 UNION - SELECT * FROM %1$I WHERE start_vid = 5 and end_vid = 6') + SELECT * FROM %1$I WHERE start_vid = 7 and end_vid = 11') $$, tbl), 'XX000', 'Graph is not fully connected', @@ -90,61 +90,61 @@ BEGIN RETURN QUERY SELECT throws_ok(format($$ - SELECT * FROM pgr_TSP('SELECT * FROM %1$I', start_id => 10) $$, tbl), + SELECT * FROM pgr_TSP('SELECT * FROM %1$I', start_id => 8) $$, tbl), 'XX000', $$Parameter 'start_id' do not exist on the data$$, '4 SHOULD throw because start_id does not exist'); RETURN QUERY SELECT is( - (SELECT cost FROM pgr_TSP(format('SELECT * FROM %1$I', tbl), start_id => 5, end_id => 3) WHERE seq = 1), + (SELECT cost FROM pgr_TSP(format('SELECT * FROM %1$I', tbl), start_id => 7, end_id => 10) WHERE seq = 1), 0::FLOAT, 'SHOULD PASS: cost at row 0 is 0.0'); RETURN QUERY SELECT is( - (SELECT cost FROM pgr_TSP(format('SELECT * FROM %1$I', tbl), end_id => 3) WHERE seq = 1), + (SELECT cost FROM pgr_TSP(format('SELECT * FROM %1$I', tbl), end_id => 10) WHERE seq = 1), 0::FLOAT, 'end_id => 3 SHOULD PASS: cost at row 0 is 0.0'); RETURN QUERY SELECT is( - (SELECT cost FROM pgr_TSP(format('SELECT * FROM %1$I', tbl), start_id => 5) WHERE seq = 1), + (SELECT cost FROM pgr_TSP(format('SELECT * FROM %1$I', tbl), start_id => 7) WHERE seq = 1), 0::FLOAT, 'start_id => 5 SHOULD PASS: cost at row 0 is 0.0'); RETURN QUERY SELECT is( - (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I', tbl), end_id => 3) WHERE seq = 6), - 3::BIGINT, - 'end_id => 3 SHOULD PASS: last node should be 3'); + (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I', tbl), end_id => 10) WHERE seq = 6), + 10::BIGINT, + 'T10: end_id => 10 SHOULD PASS: last node should be 10'); RETURN QUERY SELECT lives_ok( - $$SELECT node FROM pgr_TSP('SELECT 1 AS start_vid, 1 AS end_vid, 1 AS agg_cost')$$, + $$SELECT node FROM pgr_TSP('SELECT 5 AS start_vid, 5 AS end_vid, 1 AS agg_cost')$$, 'SHOULD PASS: one_node_loop'); RETURN QUERY SELECT set_eq( - $q$SELECT * FROM pgr_TSP( + $q$SELECT node, cost FROM pgr_TSP( $$ SELECT source AS start_vid, target AS end_vid, 1 AS agg_cost - FROM edge_table - WHERE id IN (2,4,5,8,9,15) + FROM edges + WHERE id IN (2,4,5,8,9,15) ORDER BY start_vid $$) $q$, - $q$ SELECT seq::INTEGER, node::BIGINT, cost::FLOAT, agg_cost::FLOAT + $q$ SELECT node::BIGINT, cost::FLOAT FROM (VALUES - (1, 2, 0, 0), - (2, 3, 1, 1), - (3, 6, 1, 2), - (4, 12, 1, 3), - (5, 9, 1, 4), - (6, 5, 1, 5), - (7, 2, 1, 6)) - AS t (seq, node, cost, agg_cost) + ( 6, 0), + ( 7, 1), + (16, 1), + (17, 1), + (11, 1), + (10, 1), + ( 6, 1)) + AS t (node, cost) $q$, - 'The cost from 6 to 12 is 3'); + 'Expected results'); ELSE @@ -156,102 +156,102 @@ BEGIN RETURN QUERY SELECT is( - (SELECT count(*) FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), end_id => 3)), + (SELECT count(*) FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), end_id => 10)), 6::BIGINT, - tbl::TEXT || ' end_id => 3 SHOULD PASS: total number of rows is 6 because there are 5 nodes involved'); + tbl::TEXT || ' end_id => 10 SHOULD PASS: total number of rows is 6 because there are 5 nodes involved'); -- 5,3 RETURN QUERY SELECT is( - (SELECT count(*) FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 5, end_id => 3)), + (SELECT count(*) FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 7, end_id => 10)), 6::BIGINT, 'SHOULD PASS: total number of rows is 6 because there are 5 nodes involved'); RETURN QUERY SELECT is( - (SELECT agg_cost FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 5, end_id => 3) WHERE seq = 1), + (SELECT agg_cost FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 7, end_id => 10) WHERE seq = 1), 0::FLOAT, - 'start_id => 5, end_id => 3: SHOULD PASS: agg_cost at row 0 is 0.0'); + 'start_id => 7, end_id => 10: SHOULD PASS: agg_cost at row 0 is 0.0'); RETURN QUERY SELECT is( - (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 5, end_id => 3) WHERE seq = 1), - 5::BIGINT, - 'start_id => 5, end_id => 3: SHOULD PASS: first node should be 5'); + (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 7, end_id => 10) WHERE seq = 1), + 7::BIGINT, + 'start_id => 7, end_id => 10: SHOULD PASS: first node should be 7'); RETURN QUERY SELECT is( - (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 5, end_id => 3) WHERE seq = 6), - 5::BIGINT, - 'start_id => 5, end_id => 3: SHOULD PASS: last node should be 5'); + (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 7, end_id => 10) WHERE seq = 6), + 7::BIGINT, + 'start_id => 7, end_id => 10: SHOULD PASS: last node should be 7'); RETURN QUERY SELECT is( - (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 5, end_id => 3) WHERE seq = 5), - 3::BIGINT, - 'SHOULD PASS: second to last node should be 3'); + (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 7, end_id => 10) WHERE seq = 5), + 10::BIGINT, + 'SHOULD PASS: second to last node should be 10'); - -- 5, 5 + -- 7, 7 RETURN QUERY SELECT is( - (SELECT agg_cost FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 5, end_id => 5) WHERE seq = 1), + (SELECT agg_cost FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 7, end_id => 7) WHERE seq = 1), 0::FLOAT, - 'start_id => 5, end_id => 5: SHOULD PASS: agg_cost at row 0 is 0.0'); + 'start_id => 7, end_id => 7: SHOULD PASS: agg_cost at row 0 is 0.0'); RETURN QUERY SELECT is( - (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 5, end_id => 5 ) WHERE seq = 1), - 5::BIGINT, - 'start_id => 5, end_id => 5: SHOULD PASS: first node should be 5'); + (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 7, end_id => 7 ) WHERE seq = 1), + 7::BIGINT, + 'T20: start_id => 7, end_id => 7: SHOULD PASS: first node should be 7'); RETURN QUERY SELECT is( - (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 5, end_id => 5) WHERE seq = 6), - 5::BIGINT, - 'start_id => 5, end_id => 5: SHOULD PASS: last node should be 5'); + (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 7, end_id => 7) WHERE seq = 6), + 7::BIGINT, + 'start_id => 7, end_id => 7: SHOULD PASS: last node should be 7'); - -- x,3 + -- x,10 RETURN QUERY SELECT is( - (SELECT agg_cost FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), end_id => 3) WHERE seq = 1), + (SELECT agg_cost FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), end_id => 10) WHERE seq = 1), 0::FLOAT, - 'end_id => 3 SHOULD PASS: agg_cost at row 0 is 0.0'); + 'T50: end_id => 10 SHOULD PASS: agg_cost at row 0 is 0.0'); RETURN QUERY SELECT is( - (SELECT count(*) FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 5)), + (SELECT count(*) FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 7)), 6::BIGINT, - 'start_id => 5 SHOULD PASS: total number of rows is 6 because there are 5 nodes involved'); + 'start_id => 7 SHOULD PASS: total number of rows is 6 because there are 5 nodes involved'); RETURN QUERY SELECT is( - (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 5) WHERE seq = 1), - 5::BIGINT, - 'start_id => 5 SHOULD PASS: first node should be 5'); + (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 7) WHERE seq = 1), + 7::BIGINT, + 'start_id => 7 SHOULD PASS: first node should be 7'); RETURN QUERY SELECT is( - (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 5) WHERE seq = 6), - 5::BIGINT, - 'start_id => 5 SHOULD PASS: last node should be 5'); + (SELECT node FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 7) WHERE seq = 6), + 7::BIGINT, + 'start_id => 7 SHOULD PASS: last node should be 7'); RETURN QUERY SELECT is( - (SELECT agg_cost FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 5) WHERE seq = 1), + (SELECT agg_cost FROM pgr_TSP(format('SELECT * FROM %1$I',tbl), start_id => 7) WHERE seq = 1), 0::FLOAT, - 'start_id => 5 SHOULD PASS: agg_cost at row 0 is 0.0'); + 'start_id => 7 SHOULD PASS: agg_cost at row 0 is 0.0'); -- Tests on the inner query (the matrix) RETURN QUERY SELECT lives_ok( - format($$SELECT agg_cost FROM pgr_TSP('SELECT * FROM %1$I WHERE start_vid = 10')$$, tbl), - 'SELECT * FROM data WHERE start_vid = 10: Lives when inner query is empty'); + format($$SELECT agg_cost FROM pgr_TSP('SELECT * FROM %1$I WHERE start_vid = 8')$$, tbl), + 'SELECT * FROM data WHERE start_vid = 8: Lives when inner query is empty'); RETURN QUERY SELECT is_empty( - format($$SELECT agg_cost FROM pgr_TSP('SELECT * FROM %1$I WHERE start_vid = 10')$$, tbl), - 'SELECT * FROM data WHERE start_vid = 10: Inner query is empty'); + format($$SELECT agg_cost FROM pgr_TSP('SELECT * FROM %1$I WHERE start_vid = 8')$$, tbl), + 'SELECT * FROM data WHERE start_vid = 8: Inner query is empty'); END; $code$ diff --git a/pgtap/tsp/tsp/edge_cases/illegal_values.pg b/pgtap/tsp/tsp/edge_cases/illegal_values.pg index 7b2ea55c35f..7d665657f88 100644 --- a/pgtap/tsp/tsp/edge_cases/illegal_values.pg +++ b/pgtap/tsp/tsp/edge_cases/illegal_values.pg @@ -21,13 +21,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SET client_min_messages TO WARNING; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('4.0.0') THEN plan(1) ELSE plan(9) END; CREATE TEMP TABLE data AS SELECT * FROM pgr_dijkstraCostMatrix( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, - (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE ID < 14), + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, + (SELECT array_agg(id) FROM vertices WHERE id NOT IN (2,4,13,14)), directed:= false ); diff --git a/pgtap/tsp/tsp/inner_query.pg b/pgtap/tsp/tsp/inner_query.pg index ba75ee20984..f638e1fc49d 100644 --- a/pgtap/tsp/tsp/inner_query.pg +++ b/pgtap/tsp/tsp/inner_query.pg @@ -20,13 +20,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SET client_min_messages TO WARNING; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(18); CREATE TEMP TABLE matrix AS SELECT * FROM pgr_dijkstraCostMatrix( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, - (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE ID < 14), + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, + (SELECT array_agg(id) FROM vertices WHERE id NOT IN (2,4,13,14)), directed:= false ); diff --git a/pgtap/tsp/tsp/no_crash_test.pg b/pgtap/tsp/tsp/no_crash_test.pg index f2fe208bcb6..d1caca51a61 100644 --- a/pgtap/tsp/tsp/no_crash_test.pg +++ b/pgtap/tsp/tsp/no_crash_test.pg @@ -20,13 +20,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SET client_min_messages TO WARNING; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(9); CREATE TEMP TABLE data AS SELECT * FROM pgr_dijkstraCostMatrix( - $$SELECT id, source, target, cost, reverse_cost FROM edge_table$$, - (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 14), + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, + (SELECT array_agg(id) FROM vertices WHERE id NOT IN (2,4,13,14)), directed := false ); diff --git a/pgtap/utilities/findCloseEdges/edge_cases.pg b/pgtap/utilities/findCloseEdges/edge_cases.pg index a505703a8d9..90c58046a2b 100644 --- a/pgtap/utilities/findCloseEdges/edge_cases.pg +++ b/pgtap/utilities/findCloseEdges/edge_cases.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(12) ELSE plan(1) END; SET client_min_messages TO 'WARNING'; @@ -37,23 +37,23 @@ BEGIN -- One point PREPARE edges AS - SELECT id, the_geom AS geom FROM edge_table; + SELECT id, geom FROM edges; PREPARE edges1 AS - SELECT id FROM edge_table; + SELECT id FROM edges; PREPARE edges2 AS - SELECT the_geom AS geom FROM edge_table; + SELECT geom FROM edges; PREPARE query_1 AS - SELECT * FROM pgr_findCloseEdges('edges', (SELECT the_geom FROM pointsOfInterest WHERE pid = 5), 0.5); + SELECT * FROM pgr_findCloseEdges('edges', (SELECT geom FROM pointsOfInterest WHERE pid = 5), 0.5); PREPARE query_2 AS - SELECT * FROM pgr_findCloseEdges('edges', (SELECT the_geom FROM pointsOfInterest WHERE pid = 5), 0.5, 2); + SELECT * FROM pgr_findCloseEdges('edges', (SELECT geom FROM pointsOfInterest WHERE pid = 5), 0.5, 2); PREPARE query_3 AS - SELECT * FROM pgr_findCloseEdges('edges', (SELECT the_geom FROM pointsOfInterest WHERE pid = 5), 0.5, 2, dryrun => true); + SELECT * FROM pgr_findCloseEdges('edges', (SELECT geom FROM pointsOfInterest WHERE pid = 5), 0.5, 2, dryrun => true); PREPARE err1 AS - SELECT * FROM pgr_findCloseEdges('edges1',(SELECT the_geom FROM pointsOfInterest WHERE pid = 5), 0.5); + SELECT * FROM pgr_findCloseEdges('edges1',(SELECT geom FROM pointsOfInterest WHERE pid = 5), 0.5); PREPARE err2 AS - SELECT * FROM pgr_findCloseEdges('edges2',(SELECT the_geom FROM pointsOfInterest WHERE pid = 5), 0.5); + SELECT * FROM pgr_findCloseEdges('edges2',(SELECT geom FROM pointsOfInterest WHERE pid = 5), 0.5); RETURN QUERY SELECT lives_ok('query_1', 'With defaults'); RETURN QUERY SELECT lives_ok('query_2', 'two rows'); @@ -66,16 +66,16 @@ BEGIN -- Many points PREPARE query_4 AS - SELECT * FROM pgr_findCloseEdges('edges', (SELECT array_agg(the_geom) FROM pointsOfInterest), 0.5); + SELECT * FROM pgr_findCloseEdges('edges', (SELECT array_agg(geom) FROM pointsOfInterest), 0.5); PREPARE query_5 AS - SELECT * FROM pgr_findCloseEdges('edges', (SELECT array_agg(the_geom) FROM pointsOfInterest), 0.5, 2); + SELECT * FROM pgr_findCloseEdges('edges', (SELECT array_agg(geom) FROM pointsOfInterest), 0.5, 2); PREPARE query_6 AS - SELECT * FROM pgr_findCloseEdges('edges', (SELECT array_agg(the_geom) FROM pointsOfInterest), 0.5, 2, dryrun => true); + SELECT * FROM pgr_findCloseEdges('edges', (SELECT array_agg(geom) FROM pointsOfInterest), 0.5, 2, dryrun => true); PREPARE err3 AS - SELECT * FROM pgr_findCloseEdges('edges1',(SELECT array_agg(the_geom) FROM pointsOfInterest), 0.5); + SELECT * FROM pgr_findCloseEdges('edges1',(SELECT array_agg(geom) FROM pointsOfInterest), 0.5); PREPARE err4 AS - SELECT * FROM pgr_findCloseEdges('edges2',(SELECT array_agg(the_geom) FROM pointsOfInterest), 0.5); + SELECT * FROM pgr_findCloseEdges('edges2',(SELECT array_agg(geom) FROM pointsOfInterest), 0.5); RETURN QUERY SELECT lives_ok('query_4', 'With defaults'); RETURN QUERY SELECT lives_ok('query_5', 'two rows'); diff --git a/pgtap/utilities/findCloseEdges/inner_query.pg b/pgtap/utilities/findCloseEdges/inner_query.pg index 92f4c6841fc..42fa04a6c3c 100644 --- a/pgtap/utilities/findCloseEdges/inner_query.pg +++ b/pgtap/utilities/findCloseEdges/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(12) ELSE plan(2) END; @@ -33,7 +33,7 @@ BEGIN END IF; RETURN QUERY SELECT test_anyInteger(fn, rest_sql, - ARRAY['id','the_geom AS geom'], + ARRAY['id','geom'], 'id'); END; @@ -41,8 +41,8 @@ $BODY$ LANGUAGE plpgsql; -SELECT chk_edges_sql('pgr_findCloseEdges(', ', (SELECT the_geom FROM pointsOfInterest limit 1), 3);'); -SELECT chk_edges_sql('pgr_findCloseEdges(', ', (SELECT array_agg(the_geom) FROM pointsOfInterest), 3);'); +SELECT chk_edges_sql('pgr_findCloseEdges(', ', (SELECT geom FROM pointsOfInterest limit 1), 3);'); +SELECT chk_edges_sql('pgr_findCloseEdges(', ', (SELECT array_agg(geom) FROM pointsOfInterest), 3);'); SELECT finish(); ROLLBACK; diff --git a/pgtap/utilities/findCloseEdges/no_crash_test.pg b/pgtap/utilities/findCloseEdges/no_crash_test.pg index a7d0e329fc2..96609fbb0fe 100644 --- a/pgtap/utilities/findCloseEdges/no_crash_test.pg +++ b/pgtap/utilities/findCloseEdges/no_crash_test.pg @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(33) ELSE plan(2) END; PREPARE edges AS -SELECT id, the_geom AS geom FROM edge_table; +SELECT id, geom FROM edges; SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); @@ -41,8 +41,8 @@ BEGIN END IF; params = ARRAY[ - '$$SELECT id, the_geom AS geom FROM edge_table$$', - '(SELECT the_geom FROM pointsOfInterest WHERE pid = 5)', + '$$SELECT id, geom AS geom FROM edges$$', + '(SELECT geom FROM pointsOfInterest WHERE pid = 5)', '0.5' ]::TEXT[]; @@ -57,11 +57,11 @@ BEGIN params[1] := '$$edges$$'; RETURN query SELECT * FROM no_crash_test('pgr_findCloseEdges', params, subs); - params[2] := '(SELECT array_agg(the_geom) FROM pointsOfInterest)'; + params[2] := '(SELECT array_agg(geom) FROM pointsOfInterest)'; subs[2] := 'NULL::geometry[]'; RETURN query SELECT * FROM no_crash_test('pgr_findCloseEdges', params, subs); - params[1] := '$$SELECT id, the_geom AS geom FROM edge_table$$'; + params[1] := '$$SELECT id, geom FROM edges$$'; RETURN query SELECT * FROM no_crash_test('pgr_findCloseEdges', params, subs); END diff --git a/pgtap/version/full_version/types_check.pg b/pgtap/version/full_version/types_check.pg index 5adf94df5c0..7860413a6f9 100644 --- a/pgtap/version/full_version/types_check.pg +++ b/pgtap/version/full_version/types_check.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(5); diff --git a/pgtap/version/version/types_check.pg b/pgtap/version/version/types_check.pg index 7d3ee55ce85..0364b1210ed 100644 --- a/pgtap/version/version/types_check.pg +++ b/pgtap/version/version/types_check.pg @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(6); diff --git a/pgtap/vrp_basic/inner_query.pg b/pgtap/vrp_basic/inner_query.pg index 86ca0f6aeae..81bc938ba6c 100644 --- a/pgtap/vrp_basic/inner_query.pg +++ b/pgtap/vrp_basic/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(91); SELECT lives_ok( diff --git a/pgtap/vrp_basic/no_crash_test.pg b/pgtap/vrp_basic/no_crash_test.pg index 16c4508db66..10d4a330e79 100644 --- a/pgtap/vrp_basic/no_crash_test.pg +++ b/pgtap/vrp_basic/no_crash_test.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(13); PREPARE orders AS diff --git a/pgtap/withPoints/edge_cases/many_to_many_eq_combinations.pg b/pgtap/withPoints/edge_cases/many_to_many_eq_combinations.pg index 4b48f28c026..3b15450ea64 100644 --- a/pgtap/withPoints/edge_cases/many_to_many_eq_combinations.pg +++ b/pgtap/withPoints/edge_cases/many_to_many_eq_combinations.pg @@ -22,7 +22,7 @@ BEGIN; SELECT plan(2); -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE OR REPLACE FUNCTION test_function(sql_TestFunction TEXT, cant INTEGER default 18) RETURNS SETOF TEXT AS @@ -57,12 +57,12 @@ BEGIN sql_Combinations := trim(trailing ',' from sql_Combinations); sql_Many := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table''::text, + ''SELECT id, source, target, cost, reverse_cost FROM edges''::text, ''SELECT pid, edge_id, fraction, side from pointsOfInterest'', ARRAY[' || sql_Many ||'], ARRAY[' || sql_Many || '] ) '); sql_Combinations := ( sql_TestFunction || '( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table''::text, + ''SELECT id, source, target, cost, reverse_cost FROM edges''::text, ''SELECT pid, edge_id, fraction, side from pointsOfInterest'', ''SELECT * FROM (VALUES' || sql_Combinations ||') AS combinations (source, target)'' ) '); diff --git a/pgtap/withPoints/withPoints/compare_dijkstra/one_to_one.pg b/pgtap/withPoints/withPoints/compare_dijkstra/one_to_one.pg index 4579adee422..089ad1a2812 100644 --- a/pgtap/withPoints/withPoints/compare_dijkstra/one_to_one.pg +++ b/pgtap/withPoints/withPoints/compare_dijkstra/one_to_one.pg @@ -29,7 +29,7 @@ ELSE plan(1156) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; CREATE or REPLACE FUNCTION withPointsCompareDijkstra(cant INTEGER default 17) RETURNS SETOF TEXT AS @@ -54,7 +54,7 @@ BEGIN FOR j IN 1.. cant LOOP -- DIRECTED WITH REVERSE COST - inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || result_columns || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', directed => true)'; @@ -63,7 +63,7 @@ BEGIN RETURN query SELECT set_eq(withPoints_sql, dijkstra_sql, withPoints_sql); -- DIRECTED WITHOUT REVERSE COST - inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || result_columns || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', directed => true)'; @@ -73,7 +73,7 @@ BEGIN -- UNDIRECTED WITH REVERSE COST - inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || result_columns || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', directed => false)'; @@ -82,7 +82,7 @@ BEGIN RETURN query SELECT set_eq(withPoints_sql, dijkstra_sql, withPoints_sql); -- UNDIRECTED WITHOUT REVERSE COST - inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, x1, y1, x2, y2 FROM edges'; dijkstra_sql := 'SELECT ' || result_columns || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', directed => false)'; diff --git a/pgtap/withPoints/withPoints/edge_cases/any_to_many_eq_one_to_one.pg b/pgtap/withPoints/withPoints/edge_cases/any_to_many_eq_one_to_one.pg index 1c3f74fc8c4..b7c71711a86 100644 --- a/pgtap/withPoints/withPoints/edge_cases/any_to_many_eq_one_to_one.pg +++ b/pgtap/withPoints/withPoints/edge_cases/any_to_many_eq_one_to_one.pg @@ -24,7 +24,7 @@ SELECT PLAN(13); PREPARE q1 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1], ARRAY[-5], driving_side := 'r', @@ -33,7 +33,7 @@ SELECT path_seq, node, agg_cost FROM pgr_withPoints( PREPARE q11 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1], ARRAY[-3], driving_side := 'r', @@ -42,7 +42,7 @@ SELECT path_seq, node, agg_cost FROM pgr_withPoints( PREPARE q2 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -5, driving_side := 'r', @@ -51,7 +51,7 @@ SELECT path_seq, node, agg_cost FROM pgr_withPoints( PREPARE q21 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -3, driving_side := 'r', @@ -63,7 +63,7 @@ SELECT set_eq('q11', 'q21', '2: Right: from point ARRAY[-1] to -3 same as one to PREPARE q3 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-4], ARRAY[-5], driving_side := 'r', @@ -72,7 +72,7 @@ SELECT path_seq, node, agg_cost FROM pgr_withPoints( PREPARE q31 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-4], ARRAY[-3], driving_side := 'r', @@ -81,7 +81,7 @@ SELECT path_seq, node, agg_cost FROM pgr_withPoints( PREPARE q4 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -4, -5, driving_side := 'r', @@ -90,7 +90,7 @@ SELECT path_seq, node, agg_cost FROM pgr_withPoints( PREPARE q41 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -4, -3, driving_side := 'r', @@ -102,7 +102,7 @@ SELECT set_eq('q31','q41','4: Right: from ARRAY[-4] to -3 same as one to one'); PREPARE q5 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1, -4], ARRAY[-5,-3], driving_side := 'r', @@ -122,7 +122,7 @@ SELECT set_has('q5', 'q41', '12: Right: from point ARRAY[-1,-4] to -5 has result PREPARE q9 AS SELECT -1 AS start_vid, -5 AS end_vid, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1], ARRAY[-5], driving_side := 'r', @@ -132,7 +132,7 @@ SELECT -1 AS start_vid, -5 AS end_vid, agg_cost FROM pgr_withPoints( PREPARE q10 AS SELECT * FROM pgr_withPointsCost( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -5, driving_side := 'r', diff --git a/pgtap/withPoints/withPoints/edge_cases/empty_combinations_empty_result.pg b/pgtap/withPoints/withPoints/edge_cases/empty_combinations_empty_result.pg index 58c00c0445c..8aa18e0f0c1 100644 --- a/pgtap/withPoints/withPoints/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/withPoints/withPoints/edge_cases/empty_combinations_empty_result.pg @@ -35,9 +35,9 @@ BEGIN RETURN query SELECT is_empty( 'SELECT path_seq, start_pid, end_pid, node, edge, cost, agg_cost FROM pgr_withPoints( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ''SELECT pid, edge_id, fraction, side from pointsOfInterest'', - ''SELECT * FROM combinations_table WHERE source IN (-1)'' ) ' + ''SELECT * FROM combinations WHERE source IN (-1)'' ) ' ); RETURN; END diff --git a/pgtap/withPoints/withPoints/edge_cases/issue_1640.pg b/pgtap/withPoints/withPoints/edge_cases/issue_1640.pg index 08b47796bb1..f9c4f46f619 100644 --- a/pgtap/withPoints/withPoints/edge_cases/issue_1640.pg +++ b/pgtap/withPoints/withPoints/edge_cases/issue_1640.pg @@ -33,7 +33,7 @@ END IF; PREPARE q1 AS SELECT * FROM pgr_withPoints ( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', 'SELECT pid, edge_id, fraction FROM pointsOfInterest WHERE pid IN (-1)', 1, -2 ); @@ -45,9 +45,9 @@ SELECT * FROM is_empty('q1'); PREPARE q2 AS SELECT * FROM pgr_withPoints ( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table', + 'SELECT id, source, target, cost, reverse_cost FROM edges', 'SELECT pid, edge_id, fraction FROM pointsOfInterest WHERE pid IN (-1)', - 1, 2 + 5, 6 ); RETURN QUERY diff --git a/pgtap/withPoints/withPoints/edge_cases/many_to_one_eq_one_to_one.pg b/pgtap/withPoints/withPoints/edge_cases/many_to_one_eq_one_to_one.pg index 7e5fce6e290..a83cd59fe05 100644 --- a/pgtap/withPoints/withPoints/edge_cases/many_to_one_eq_one_to_one.pg +++ b/pgtap/withPoints/withPoints/edge_cases/many_to_one_eq_one_to_one.pg @@ -26,7 +26,7 @@ SELECT PLAN(7); PREPARE q1 AS SELECT path_seq, node, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1], -5, driving_side := 'r', @@ -35,7 +35,7 @@ SELECT path_seq, node, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPo PREPARE q2 AS SELECT path_seq, node, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -5, driving_side := 'r', @@ -46,7 +46,7 @@ SELECT set_eq('q1', 'q2', '1: Right: from point ARRAY[-1] to -5 same as one to o PREPARE q3 AS SELECT path_seq, node, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-4], -5, driving_side := 'r', @@ -55,7 +55,7 @@ SELECT path_seq, node, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoi PREPARE q4 AS SELECT path_seq, node, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -4, -5, driving_side := 'r', @@ -66,7 +66,7 @@ SELECT set_eq('q3','q4','2: Right: from ARRAY[-4] to -5 same as one to one'); PREPARE q5 AS SELECT path_seq, node, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1, -4], -5, driving_side := 'r', @@ -82,7 +82,7 @@ SELECT set_has('q5', 'q4', '6: Right: from point ARRAY[-1,-4] to -5 has results PREPARE q9 AS SELECT -1 AS start_vid, -5 AS end_vid, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1], -5, driving_side := 'r', @@ -92,7 +92,7 @@ SELECT -1 AS start_vid, -5 AS end_vid, round(agg_cost::numeric, 12) AS agg_cos PREPARE q10 AS SELECT start_pid, end_pid, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsCost( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -5, driving_side := 'r', diff --git a/pgtap/withPoints/withPoints/edge_cases/one_to_many.pg b/pgtap/withPoints/withPoints/edge_cases/one_to_many.pg index 2323e5b8828..b9a8924d836 100644 --- a/pgtap/withPoints/withPoints/edge_cases/one_to_many.pg +++ b/pgtap/withPoints/withPoints/edge_cases/one_to_many.pg @@ -26,7 +26,7 @@ SELECT PLAN(8); PREPARE q1 AS WITH the_union AS ( (SELECT path_seq, -2 AS end_pid, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, ARRAY[-2], driving_side := 'r', @@ -34,7 +34,7 @@ WITH the_union AS ( details := true)) UNION ALL (SELECT path_seq, -5 AS end_pid, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, ARRAY[-5], driving_side := 'r', @@ -46,7 +46,7 @@ select row_number() OVER() AS seq, * FROM the_ordered; PREPARE q2 AS SELECT seq, path_seq, end_pid AS end_pid, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, ARRAY[-2, -5], driving_side := 'r', @@ -55,7 +55,7 @@ SELECT seq, path_seq, end_pid AS end_pid, node, agg_cost FROM pgr_withPoints( PREPARE q3 AS SELECT seq, path_seq, end_pid AS end_pid, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, ARRAY[-5, -2], driving_side := 'r', @@ -64,7 +64,7 @@ SELECT seq, path_seq, end_pid AS end_pid, node, agg_cost FROM pgr_withPoints( PREPARE q4 AS SELECT seq, path_seq, end_pid AS end_pid, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, ARRAY[-5, -2, -2, -2, -5, -5, -2], driving_side := 'r', @@ -81,7 +81,7 @@ SELECT set_eq('q2', 'q4', '5: From point 1 to 2 and 5 the 2,5 vs 5,2 eliminate r PREPARE q5 AS SELECT seq, path_seq, -end_pid AS end_pid, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', '(SELECT pid, edge_id, fraction, side from pointsOfInterest) UNION ALL (SELECT pid, edge_id, fraction, side from pointsOfInterest)', 3, ARRAY[5, 1, 1, 5, 5, 1], driving_side := 'r', @@ -92,7 +92,7 @@ SELECT lives_ok('q5'); PREPARE q6 AS SELECT seq, path_seq, -end_pid AS end_pid, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', '(SELECT pid, edge_id, fraction, side from pointsOfInterest) UNION ALL (SELECT 1 as pid, edge_id, fraction, side from pointsOfInterest)', 3, ARRAY[5, 1, 1, 5, 5, 1], driving_side := 'r', @@ -105,7 +105,7 @@ SELECT throws_ok('q6', 'XX000', PREPARE q7 AS SELECT seq, path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', '(SELECT pid, edge_id, fraction, side from pointsOfInterest) UNION ALL (SELECT 1 as pid, edge_id, fraction, side from pointsOfInterest)', 3, 5, driving_side := 'r', @@ -119,7 +119,7 @@ SELECT throws_ok('q7', 'XX000', /* PREPARE q3 AS SELECT seq, path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 3, ARRAY[4], driving_side := 'r', @@ -130,7 +130,7 @@ SELECT set_has('q3','q2','2: Right: from 3 to 4 it passes in front of point 1'); PREPARE q4 AS SELECT seq, path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 3, ARRAY[4], driving_side := 'l', @@ -139,7 +139,7 @@ SELECT seq, path_seq, node, agg_cost FROM pgr_withPoints( PREPARE q5 AS SELECT seq, path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 3, ARRAY[4], driving_side := 'l', @@ -151,7 +151,7 @@ SELECT set_eq('q4', 'q5', '3: Left: from point 3 to 4 it does not pass in front PREPARE q6 AS SELECT seq, path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 3, ARRAY[1], driving_side := 'l', @@ -163,7 +163,7 @@ SELECT set_has('q6','q5','4: Left: from 3 to 1 it passes in front of point 4'); PREPARE q7 AS SELECT seq, path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 3, ARRAY[1], driving_side := 'b', @@ -172,7 +172,7 @@ SELECT seq, path_seq, node, agg_cost FROM pgr_withPoints( PREPARE q8 AS SELECT seq, path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 3, ARRAY[4], driving_side := 'b', @@ -183,7 +183,7 @@ SELECT set_has('q7','q8','Both: from 3 to 1 it passes in front of point 4'); PREPARE q9 AS SELECT -3 AS start_vid, -1 AS end_vid, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 3, ARRAY[1], driving_side := 'r', @@ -193,7 +193,7 @@ SELECT -3 AS start_vid, -1 AS end_vid, agg_cost FROM pgr_withPoints( PREPARE q10 AS SELECT * FROM pgr_withPointsCost( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 3, ARRAY[1], driving_side := 'r', diff --git a/pgtap/withPoints/withPoints/edge_cases/one_to_many_eq_one_to_one.pg b/pgtap/withPoints/withPoints/edge_cases/one_to_many_eq_one_to_one.pg index 6e4e08242b8..f36c636b4d5 100644 --- a/pgtap/withPoints/withPoints/edge_cases/one_to_many_eq_one_to_one.pg +++ b/pgtap/withPoints/withPoints/edge_cases/one_to_many_eq_one_to_one.pg @@ -26,7 +26,7 @@ SELECT PLAN(7); PREPARE q1 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, ARRAY[-5], driving_side := 'r', @@ -35,7 +35,7 @@ SELECT path_seq, node, agg_cost FROM pgr_withPoints( PREPARE q2 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -5, driving_side := 'r', @@ -46,7 +46,7 @@ SELECT set_eq('q1', 'q2', '1: Right: from point -1 to -5 same as one to one'); PREPARE q3 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, ARRAY[-4], driving_side := 'r', @@ -55,7 +55,7 @@ SELECT path_seq, node, agg_cost FROM pgr_withPoints( PREPARE q4 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -4, driving_side := 'r', @@ -66,7 +66,7 @@ SELECT set_eq('q3','q4','2: Right: from -1 to -4 same as one to one'); PREPARE q5 AS SELECT path_seq, node, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, ARRAY[-4, -5], driving_side := 'r', @@ -82,7 +82,7 @@ SELECT set_has('q5', 'q4', '6: Right: from point -1 to -4 & -5 has results of fr PREPARE q9 AS SELECT -1 AS start_vid, -5 AS end_vid, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, ARRAY[-5], driving_side := 'r', @@ -92,7 +92,7 @@ SELECT -1 AS start_vid, -5 AS end_vid, agg_cost FROM pgr_withPoints( PREPARE q10 AS SELECT * FROM pgr_withPointsCost( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -5, driving_side := 'r', diff --git a/pgtap/withPoints/withPoints/edge_cases/one_to_one.pg b/pgtap/withPoints/withPoints/edge_cases/one_to_one.pg index 300e52b1fc2..60bce6506ec 100644 --- a/pgtap/withPoints/withPoints/edge_cases/one_to_one.pg +++ b/pgtap/withPoints/withPoints/edge_cases/one_to_one.pg @@ -24,7 +24,7 @@ SELECT PLAN(6); PREPARE q1 AS SELECT node, edge, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -5, driving_side := 'r', @@ -33,7 +33,7 @@ SELECT node, edge, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( PREPARE q2 AS SELECT node, edge, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -5, driving_side := 'r', @@ -48,7 +48,7 @@ SELECT set_has('q1', 'q21', '2: Right: from p1 to p5 pass in front of p6'); PREPARE q3 AS SELECT seq, path_seq, node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -5, driving_side := 'l', @@ -58,7 +58,7 @@ SELECT seq, path_seq, node, edge, round(cost::numeric, 12) AS cost, round(agg_co PREPARE q4 AS SELECT seq, path_seq, node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -5, driving_side := 'l', @@ -69,7 +69,7 @@ SELECT set_has('q1', 'q2', '3: Right: from p1 to p5 pass dont pass in front of p PREPARE q5 AS SELECT node, edge, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -5, driving_side := 'b', @@ -78,7 +78,7 @@ SELECT node, edge, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( PREPARE q6 AS SELECT node, edge, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, -5, driving_side := 'b', @@ -94,7 +94,7 @@ SELECT set_has('q5', 'q61', '5: both: from p1 to p5 pass in front of p6'); PREPARE q7 AS SELECT -3 AS start_vid, -1 AS end_vid, agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -3, -1, driving_side := 'r', @@ -104,7 +104,7 @@ SELECT -3 AS start_vid, -1 AS end_vid, agg_cost FROM pgr_withPoints( PREPARE q8 AS SELECT * FROM pgr_withPointsCost( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -3, -1, driving_side := 'r', diff --git a/pgtap/withPoints/withPoints/edge_cases/undirected.pg b/pgtap/withPoints/withPoints/edge_cases/undirected.pg index e6ca1e209ee..b3191166398 100644 --- a/pgtap/withPoints/withPoints/edge_cases/undirected.pg +++ b/pgtap/withPoints/withPoints/edge_cases/undirected.pg @@ -43,10 +43,10 @@ INTO test1 FROM (VALUES ( 1 , -1 , 1 , 0.6 , 0), - ( 2 , 2 , 4 , 1 , 0.6), - ( 3 , 5 , 7 , 1 , 1.6), - ( 4 , 8 , 6 , 1 , 2.6), - ( 5 , 7 , -1 , 0 , 3.6) + ( 2 , 6 , 4 , 1 , 0.6), + ( 3 , 7 , 7 , 1 , 1.6), + ( 4 , 3 , 6 , 1 , 2.6), + ( 5 , 1 , -1 , 0 , 3.6) ) AS t (seq, node, edge, cost, agg_cost) ORDER BY seq; @@ -54,9 +54,9 @@ ORDER BY seq; PREPARE q1 AS SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 7, driving_side := 'b', details := false, directed:=false) + -1, 1, driving_side := 'b', details := false, directed:=false) ORDER BY seq; SELECT set_eq('q1', @@ -69,9 +69,9 @@ SELECT set_eq('q1', PREPARE q2 AS SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 7, driving_side := 'r', details := false, directed:=false) + -1, 1, driving_side := 'r', details := false, directed:=false) ORDER BY seq; @@ -83,9 +83,9 @@ SELECT set_eq('q2', PREPARE q3 AS SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 7, driving_side := 'l', details := false, directed:=false) + -1, 1, driving_side := 'l', details := false, directed:=false) ORDER BY seq; @@ -105,11 +105,11 @@ SELECT INTO test2 FROM (VALUES - ( 1 , 12 , 15 , 1 , 0), - ( 2 , 9 , 16 , 1 , 1), - ( 3 , 4 , 3 , 1 , 2), - ( 4 , 3 , 2 , 1 , 3), - ( 5 , 2 , 1 , 0.6 , 4), + ( 1 , 17 , 15 , 1 , 0), + ( 2 , 16 , 16 , 1 , 1), + ( 3 , 15 , 3 , 1 , 2), + ( 4 , 10 , 2 , 1 , 3), + ( 5 , 6 , 1 , 0.6 , 4), ( 6 , -1 , -1 , 0 , 4.6) ) AS t (seq, node, edge, cost, agg_cost) ORDER BY seq; @@ -118,9 +118,9 @@ ORDER BY seq; PREPARE q4 AS SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - 12, -1, driving_side := 'b', details := false, directed:=false) + 17, -1, driving_side := 'b', details := false, directed:=false) ORDER BY seq; SELECT set_eq('q4', @@ -133,9 +133,9 @@ SELECT set_eq('q4', PREPARE q5 AS SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - 12, -1, driving_side := 'r', details := false, directed:=false) + 17, -1, driving_side := 'r', details := false, directed:=false) ORDER BY seq; @@ -147,9 +147,9 @@ SELECT set_eq('q5', PREPARE q6 AS SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - 12, -1, driving_side := 'l', details := false, directed:=false) + 17, -1, driving_side := 'l', details := false, directed:=false) ORDER BY seq; @@ -171,27 +171,27 @@ SELECT INTO test3 FROM (VALUES - ( 1 , 1 , 0.4 , 0), + ( 5 , 1 , 0.4 , 0), ( -1 , 1 , 0.6 , 0.4), - ( 2 , 4 , 0.7 , 1), + ( 6 , 4 , 0.7 , 1), ( -6 , 4 , 0.3 , 1.7), - ( 5 , 7 , 1 , 2), - ( 8 , 6 , 0.7 , 3), + ( 7 , 7 , 1 , 2), + ( 3 , 6 , 0.7 , 3), ( -4 , 6 , 0.3 , 3.7), - ( 7 , -1 , 0 , 4) + ( 1 , -1 , 0 , 4) ) AS t (node, edge, cost, agg_cost); -------- both driving sides PREPARE q7 AS SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - 1, 7, driving_side := 'b', details := true, directed:=false); + 5, 1, driving_side := 'b', details := true, directed:=false); SELECT set_eq('q7', $$SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test3$$, - '1, 7, driving_side := b, details := true, directed:=false'); + '5, 1, driving_side := b, details := true, directed:=false'); @@ -200,29 +200,29 @@ SELECT set_eq('q7', PREPARE q8 AS SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - 1, 7, driving_side := 'r', details := true, directed:=false) + 5, 1, driving_side := 'r', details := true, directed:=false) ORDER BY seq; SELECT set_eq('q8', $$SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test3$$, - '1, 7, driving_side := r, details := true, directed:=false'); + '5, 1, driving_side := r, details := true, directed:=false'); -------- left driving side PREPARE q9 AS SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - 1, 7, driving_side := 'l', details := true, directed:=false) + 5, 1, driving_side := 'l', details := true, directed:=false) ORDER BY seq; SELECT set_eq('q9', $$SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test3$$, - '1, 7, driving_side := l, details := true, directed:=false'); + '5, 1, driving_side := l, details := true, directed:=false'); ------------------ @@ -235,12 +235,12 @@ SELECT INTO test4 FROM (VALUES - ( 12 , 15 , 0.6 , 0), + ( 17 , 15 , 0.6 , 0), ( -2 , 15 , 0.4 , 0.6), - ( 9 , 16 , 1 , 1), - ( 4 , 3 , 1 , 2), - ( 3 , 2 , 1 , 3), - ( 2 , 1 , 0.6 , 4), + ( 16 , 16 , 1 , 1), + ( 15 , 3 , 1 , 2), + ( 10 , 2 , 1 , 3), + ( 6 , 1 , 0.6 , 4), ( -1 , -1 , 0 , 4.6) ) AS t (node, edge, cost, agg_cost); @@ -248,13 +248,13 @@ FROM PREPARE q10 AS SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - 12, -1, driving_side := 'b', details := true, directed:=false); + 17, -1, driving_side := 'b', details := true, directed:=false); SELECT set_eq('q10', $$SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test4$$, - '12, -1, driving_side := b, details := true, directed:=false'); + '17, -1, driving_side := b, details := true, directed:=false'); @@ -262,27 +262,27 @@ SELECT set_eq('q10', PREPARE q11 AS SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - 12, -1, driving_side := 'r', details := true, directed:=false); + 17, -1, driving_side := 'r', details := true, directed:=false); SELECT set_eq('q11', $$SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test4$$, - '12, -1, driving_side := r, details := true, directed:=false'); + '17, -1, driving_side := r, details := true, directed:=false'); -------- left driving side PREPARE q12 AS SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPoints( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - 12, -1, driving_side := 'l', details := true, directed:=false); + 17, -1, driving_side := 'l', details := true, directed:=false); SELECT set_eq('q12', $$SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test4$$, - '12, -1, driving_side := l, details := true, directed:=false'); + '17, -1, driving_side := l, details := true, directed:=false'); diff --git a/pgtap/withPoints/withPoints/inner_query.pg b/pgtap/withPoints/withPoints/inner_query.pg index 51c78dd7ef7..2e3ef4027dd 100644 --- a/pgtap/withPoints/withPoints/inner_query.pg +++ b/pgtap/withPoints/withPoints/inner_query.pg @@ -19,31 +19,31 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(432) ELSE plan(338) END; -- ONE TO ONE SELECT style_dijkstra('pgr_withPoints(', ', $$SELECT * from pointsOfInterest$$, 2, 3, true)'); -SELECT innerquery_points('pgr_withPoints($$SELECT * FROM edge_table$$,', ', 2, 3, true)'); +SELECT innerquery_points('pgr_withPoints($$SELECT * FROM edges$$,', ', 2, 3, true)'); -- ONE TO MANY SELECT style_dijkstra('pgr_withPoints(', ', $$SELECT * from pointsOfInterest$$, 2, ARRAY[3], true)'); -SELECT innerquery_points('pgr_withPoints($$SELECT * FROM edge_table$$,', ', 2, ARRAY[3], true)'); +SELECT innerquery_points('pgr_withPoints($$SELECT * FROM edges$$,', ', 2, ARRAY[3], true)'); -- MANY TO ONE SELECT style_dijkstra('pgr_withPoints(', ', $$SELECT * from pointsOfInterest$$, ARRAY[2], 3, true)'); -SELECT innerquery_points('pgr_withPoints($$SELECT * FROM edge_table$$,', ', ARRAY[2], 3, true)'); +SELECT innerquery_points('pgr_withPoints($$SELECT * FROM edges$$,', ', ARRAY[2], 3, true)'); -- MANY TO MANY SELECT style_dijkstra('pgr_withPoints(', ', $$SELECT * from pointsOfInterest$$, ARRAY[2], ARRAY[3], true)'); -SELECT innerquery_points('pgr_withPoints($$SELECT * FROM edge_table$$,', ', ARRAY[2], ARRAY[3], true)'); +SELECT innerquery_points('pgr_withPoints($$SELECT * FROM edges$$,', ', ARRAY[2], ARRAY[3], true)'); -- COMBINATIONS CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_dijkstra('pgr_withPoints(', ', $$SELECT * from pointsOfInterest$$, $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_points('pgr_withPoints($$SELECT * FROM edge_table$$,', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_withPoints($$SELECT * FROM edge_table$$, $$SELECT * from pointsOfInterest$$,',', true)'); + RETURN QUERY SELECT style_dijkstra('pgr_withPoints(', ', $$SELECT * from pointsOfInterest$$, $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_points('pgr_withPoints($$SELECT * FROM edges$$,', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_withPoints($$SELECT * FROM edges$$, $$SELECT * from pointsOfInterest$$,',', true)'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/withPoints/withPoints/no_crash_test.pg b/pgtap/withPoints/withPoints/no_crash_test.pg index 36c47802a05..c40b63a9822 100644 --- a/pgtap/withPoints/withPoints/no_crash_test.pg +++ b/pgtap/withPoints/withPoints/no_crash_test.pg @@ -19,26 +19,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (102) ELSE plan(85) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE combinations AS -SELECT source, target FROM combinations_table; +SELECT source, target FROM combinations; PREPARE pois AS SELECT pid, edge_id, fraction from pointsOfInterest; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); PREPARE null_combinations AS -SELECT source, target FROM combinations_table WHERE source IN (-1); +SELECT source, target FROM combinations WHERE source IN (-1); CREATE OR REPLACE FUNCTION test_function() @@ -62,14 +62,14 @@ BEGIN params = ARRAY[ '$$edges$$', '$$SELECT pid, edge_id, fraction from pointsOfInterest$$', - '1::BIGINT', - '2::BIGINT' + '5::BIGINT', + '6::BIGINT' ]::TEXT[]; subs = ARRAY[ 'NULL', 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_withPoints', params, subs); @@ -89,8 +89,8 @@ BEGIN subs = ARRAY[ 'NULL', 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_withPoints', params, subs); @@ -110,8 +110,8 @@ BEGIN subs = ARRAY[ 'NULL', 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_withPoints', params, subs); @@ -131,8 +131,8 @@ BEGIN subs = ARRAY[ 'NULL', 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_withPoints', params, subs); @@ -163,7 +163,7 @@ BEGIN subs = ARRAY[ 'NULL', 'NULL', - '$$(SELECT source, target FROM combinations_table WHERE source IN (-1))$$' + '$$(SELECT source, target FROM combinations WHERE source IN (-1))$$' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_withPoints', params, subs); diff --git a/pgtap/withPoints/withPointsCost/edge_cases/empty_combinations_empty_result.pg b/pgtap/withPoints/withPointsCost/edge_cases/empty_combinations_empty_result.pg index 55fb3e2d408..a52dc4d7434 100644 --- a/pgtap/withPoints/withPointsCost/edge_cases/empty_combinations_empty_result.pg +++ b/pgtap/withPoints/withPointsCost/edge_cases/empty_combinations_empty_result.pg @@ -35,9 +35,9 @@ BEGIN RETURN query SELECT is_empty( 'SELECT start_pid, end_pid, agg_cost FROM pgr_withPointsCost( - ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', + ''SELECT id, source, target, cost, reverse_cost FROM edges'', ''SELECT pid, edge_id, fraction, side from pointsOfInterest'', - ''SELECT * FROM combinations_table WHERE source IN (-1)'' ) ' + ''SELECT * FROM combinations WHERE source IN (-1)'' ) ' ); RETURN; END diff --git a/pgtap/withPoints/withPointsCost/inner_query.pg b/pgtap/withPoints/withPointsCost/inner_query.pg index c20a59a04d1..59d01c8031a 100644 --- a/pgtap/withPoints/withPointsCost/inner_query.pg +++ b/pgtap/withPoints/withPointsCost/inner_query.pg @@ -19,31 +19,31 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan(432) ELSE plan(338) END; -- ONE TO ONE SELECT style_dijkstra('pgr_withPointsCost(', ', $$SELECT * from pointsOfInterest$$, 2, 3, true)'); -SELECT innerquery_points('pgr_withPointsCost($$SELECT * FROM edge_table$$,', ', 2, 3, true)'); +SELECT innerquery_points('pgr_withPointsCost($$SELECT * FROM edges$$,', ', 2, 3, true)'); -- ONE TO MANY SELECT style_dijkstra('pgr_withPointsCost(', ', $$SELECT * from pointsOfInterest$$, 2, ARRAY[3], true)'); -SELECT innerquery_points('pgr_withPointsCost($$SELECT * FROM edge_table$$,', ', 2, ARRAY[3], true)'); +SELECT innerquery_points('pgr_withPointsCost($$SELECT * FROM edges$$,', ', 2, ARRAY[3], true)'); -- MANY TO ONE SELECT style_dijkstra('pgr_withPointsCost(', ', $$SELECT * from pointsOfInterest$$, ARRAY[2], 3, true)'); -SELECT innerquery_points('pgr_withPointsCost($$SELECT * FROM edge_table$$,', ', ARRAY[2], 3, true)'); +SELECT innerquery_points('pgr_withPointsCost($$SELECT * FROM edges$$,', ', ARRAY[2], 3, true)'); -- MANY TO MANY SELECT style_dijkstra('pgr_withPointsCost(', ', $$SELECT * from pointsOfInterest$$, ARRAY[2], ARRAY[3], true)'); -SELECT innerquery_points('pgr_withPointsCost($$SELECT * FROM edge_table$$,', ', ARRAY[2], ARRAY[3], true)'); +SELECT innerquery_points('pgr_withPointsCost($$SELECT * FROM edges$$,', ', ARRAY[2], ARRAY[3], true)'); -- COMBINATIONS CREATE OR REPLACE FUNCTION inner_query() RETURNS SETOF TEXT AS $BODY$ BEGIN IF min_version('3.2.0') THEN - RETURN QUERY SELECT style_dijkstra('pgr_withPointsCost(', ', $$SELECT * from pointsOfInterest$$, $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_points('pgr_withPointsCost($$SELECT * FROM edge_table$$,', ', $$SELECT * FROM combinations_table$$, true)'); - RETURN QUERY SELECT innerquery_combinations('pgr_withPointsCost($$SELECT * FROM edge_table$$, $$SELECT * from pointsOfInterest$$,',', true)'); + RETURN QUERY SELECT style_dijkstra('pgr_withPointsCost(', ', $$SELECT * from pointsOfInterest$$, $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_points('pgr_withPointsCost($$SELECT * FROM edges$$,', ', $$SELECT * FROM combinations$$, true)'); + RETURN QUERY SELECT innerquery_combinations('pgr_withPointsCost($$SELECT * FROM edges$$, $$SELECT * from pointsOfInterest$$,',', true)'); ELSE RETURN QUERY SELECT skip(2, 'Combinations signature added on 3.2.0'); END IF; diff --git a/pgtap/withPoints/withPointsCost/no_crash_test.pg b/pgtap/withPoints/withPointsCost/no_crash_test.pg index fc050af25cf..754b61de846 100644 --- a/pgtap/withPoints/withPointsCost/no_crash_test.pg +++ b/pgtap/withPoints/withPointsCost/no_crash_test.pg @@ -19,26 +19,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.2.0') THEN plan (102) ELSE plan(85) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE combinations AS -SELECT source, target FROM combinations_table; +SELECT source, target FROM combinations; PREPARE pois AS SELECT pid, edge_id, fraction from pointsOfInterest; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); PREPARE null_combinations AS -SELECT source, target FROM combinations_table WHERE source IN (-1); +SELECT source, target FROM combinations WHERE source IN (-1); CREATE OR REPLACE FUNCTION test_function() @@ -62,14 +62,14 @@ BEGIN params = ARRAY[ '$$edges$$', '$$SELECT pid, edge_id, fraction from pointsOfInterest$$', - '1::BIGINT', - '2::BIGINT' + '5::BIGINT', + '6::BIGINT' ]::TEXT[]; subs = ARRAY[ 'NULL', 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_withPointsCost', params, subs); @@ -89,8 +89,8 @@ BEGIN subs = ARRAY[ 'NULL', 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_withPointsCost', params, subs); @@ -110,8 +110,8 @@ BEGIN subs = ARRAY[ 'NULL', 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_withPointsCost', params, subs); @@ -131,8 +131,8 @@ BEGIN subs = ARRAY[ 'NULL', 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_withPointsCost', params, subs); @@ -163,7 +163,7 @@ BEGIN subs = ARRAY[ 'NULL', 'NULL', - '$$(SELECT source, target FROM combinations_table WHERE source IN (-1))$$' + '$$(SELECT source, target FROM combinations WHERE source IN (-1))$$' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_withPointsCost', params, subs); diff --git a/pgtap/withPoints/withPointsCostMatrix/inner_query.pg b/pgtap/withPoints/withPointsCostMatrix/inner_query.pg index 992c117cac5..baf47fa73cf 100644 --- a/pgtap/withPoints/withPointsCostMatrix/inner_query.pg +++ b/pgtap/withPoints/withPointsCostMatrix/inner_query.pg @@ -19,13 +19,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(84); -- ONE MATRIX SELECT style_dijkstra('pgr_withPointsCostMatrix(', ', $$SELECT * from pointsOfInterest$$, ARRAY[1,2,3,4], true)'); -SELECT innerquery_points('pgr_withPointsCostMatrix($$SELECT * FROM edge_table$$,', ', ARRAY[1,2,3,4], true)'); +SELECT innerquery_points('pgr_withPointsCostMatrix($$SELECT * FROM edges$$,', ', ARRAY[1,2,3,4], true)'); SELECT finish(); ROLLBACK; diff --git a/pgtap/withPoints/withPointsCostMatrix/no_crash_test.pg b/pgtap/withPoints/withPointsCostMatrix/no_crash_test.pg index d978843ec42..c1101014ddd 100644 --- a/pgtap/withPoints/withPointsCostMatrix/no_crash_test.pg +++ b/pgtap/withPoints/withPointsCostMatrix/no_crash_test.pg @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(19); PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE pois AS SELECT pid, edge_id, fraction from pointsOfInterest; PREPARE null_ret AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); SELECT isnt_empty('pois', 'Should be not empty to tests be meaningful'); @@ -44,13 +44,13 @@ params TEXT[]; subs TEXT[]; BEGIN params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT pid, edge_id, fraction from pointsOfInterest$$', - 'ARRAY[1,2]']::TEXT[]; + 'ARRAY[5,6]']::TEXT[]; subs = ARRAY[ 'NULL', 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_withPointsCostMatrix', params, subs); diff --git a/pgtap/withPoints/withPointsDD/edge_cases/allowed_driving_side.pg b/pgtap/withPoints/withPointsDD/edge_cases/allowed_driving_side.pg index eef42fbb57f..9afa910c6a7 100644 --- a/pgtap/withPoints/withPointsDD/edge_cases/allowed_driving_side.pg +++ b/pgtap/withPoints/withPointsDD/edge_cases/allowed_driving_side.pg @@ -25,39 +25,41 @@ CREATE OR REPLACE FUNCTION compare_old_new() RETURNS SETOF TEXT AS $BODY$ BEGIN + SET client_min_messages TO ERROR; -- the only change is an additional column RETURN QUERY SELECT set_eq( $$SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'r', directed => true)$$, $$SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'r', directed => true)$$, 'old = new: directed right'); RETURN QUERY SELECT set_eq( $$SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'l', directed => true)$$, $$SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'l', directed => true)$$, 'old = new: directed left'); RETURN QUERY SELECT set_eq( $$SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'b', directed => false)$$, $$SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'b', directed => false)$$, 'old = new: undirected both'); +SET client_min_messages TO WARNING; END; $BODY$ @@ -69,111 +71,113 @@ RETURNS SETOF TEXT AS $BODY$ BEGIN +SET client_min_messages TO ERROR; -- everything lives as it gets a default -- directed r, R RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'r', directed => true)$$, 'old lives: directed right'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'R', directed => true)$$, 'old lives: directed Right'); -- directed l, L RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'l', directed => true)$$, 'old lives: directed left'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'L', directed => true)$$, 'old lives: directed Left'); -- directed b, B RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'b', directed => true)$$, 'old lives: directed both'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'B', directed => true)$$, 'old lives: directed Both'); -- directed Invalid RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'i', directed => true)$$, 'old lives: directed invalid'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'I', directed => true)$$, 'old lives: directed Invalid'); -- undirected r, R RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'r', directed => false)$$, 'old lives: undirected right'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'R', directed => false)$$, 'old lives: undirected Right'); -- undirected l, L RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'l', directed => false)$$, 'old lives: undirected left'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'L', directed => false)$$, 'old lives: undirected Left'); -- undirected b, B RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'b', directed => false)$$, 'old lives: undirected both'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'B', directed => false)$$, 'old lives: undirected Both'); -- undirected Invalid RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'i', directed => false)$$, 'old lives: undirected invalid'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side => 'I', directed => false)$$, 'old lives: undirected Invalid'); +SET client_min_messages TO WARNING; END; $BODY$ language plpgsql; @@ -187,7 +191,7 @@ RETURN QUERY SELECT test_old_cases(); IF NOT min_version('3.6.0') THEN RETURN QUERY SELECT skip(1, 'new signature on 3.6.0'); - return; + RETURN; END IF; RETURN QUERY SELECT compare_old_new(); @@ -196,40 +200,40 @@ RETURN QUERY SELECT compare_old_new(); -- directed r, R RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'r', directed => true)$$, 'lives: directed right'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'R', directed => true)$$, 'lives: directed Right'); -- directed l, L RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'l', directed => true)$$, 'lives: directed left'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'L', directed => true)$$, 'lives: directed Left'); -- directed b, B RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'b', directed => true)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: directed both'); RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'B', directed => true)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: directed Both'); @@ -237,14 +241,14 @@ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( -- directed Invalid RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'i', directed => true)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: directed invalid'); RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'I', directed => true)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: directed Invalid'); @@ -253,14 +257,14 @@ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( -- undirected r, R RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'r', directed => false)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: undirected right'); RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'R', directed => false)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: undirected Right'); @@ -268,14 +272,14 @@ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( -- undirected l, L RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'l', directed => false)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: undirected left'); RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'L', directed => false)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: undirected Left'); @@ -283,27 +287,27 @@ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( -- undirected b, B RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'b', directed => false)$$, 'lives: undirected both'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'B', directed => false)$$, 'lives: undirected Both'); -- undirected Invalid RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'i', directed => false)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: undirected invalid'); RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, 'I', directed => false)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: undirected Invalid'); @@ -313,40 +317,40 @@ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( -- directed r, R RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'r', directed => true)$$, 'lives: directed right'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'R', directed => true)$$, 'lives: directed Right'); -- directed l, L RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'l', directed => true)$$, 'lives: directed left'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'L', directed => true)$$, 'lives: directed Left'); -- directed b, B RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'b', directed => true)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: directed both'); RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'B', directed => true)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: directed Both'); @@ -354,14 +358,14 @@ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( -- directed Invalid RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'i', directed => true)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: directed invalid'); RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'I', directed => true)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: directed Invalid'); @@ -370,14 +374,14 @@ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( -- undirected r, R RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'r', directed => false)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: undirected right'); RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'R', directed => false)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: undirected Right'); @@ -385,14 +389,14 @@ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( -- undirected l, L RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'l', directed => false)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: undirected left'); RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'L', directed => false)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: undirected Left'); @@ -400,27 +404,27 @@ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( -- undirected b, B RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'b', directed => false)$$, 'lives: undirected both'); RETURN QUERY SELECT lives_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'B', directed => false)$$, 'lives: undirected Both'); -- undirected Invalid RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'i', directed => false)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: undirected invalid'); RETURN QUERY SELECT throws_ok($$ SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,9], 4.8, 'I', directed => false)$$, 'XX000',$$Invalid value of 'driving side'$$, 'throws: undirected Invalid'); diff --git a/pgtap/withPoints/withPointsDD/edge_cases/compareDD.pg b/pgtap/withPoints/withPointsDD/edge_cases/compareDD.pg index da6436fca00..4c266f179fd 100644 --- a/pgtap/withPoints/withPointsDD/edge_cases/compareDD.pg +++ b/pgtap/withPoints/withPointsDD/edge_cases/compareDD.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT plan(1); CREATE OR REPLACE FUNCTION test_cases() @@ -34,14 +34,14 @@ BEGIN /* withPoinstsDD starting from a vertex NO details*/ prepare nodetails1 AS SELECT seq, depth, start_vid, node, edge, round(cost::numeric, 3) AS cost, round(agg_cost::numeric, 3) AS agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest where pid > 100', 1, 4.8, 'r', directed => true, details => false) WHERE node > 0; prepare expected1 AS SELECT seq, depth, start_vid, node, edge, round(cost::numeric, 3) AS cost, round(agg_cost::numeric, 3) AS agg_cost FROM pgr_drivingDistance( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 1, 4.8, directed => true); RETURN QUERY diff --git a/pgtap/withPoints/withPointsDD/edge_cases/issue_979.pg b/pgtap/withPoints/withPointsDD/edge_cases/issue_979.pg index 3194456b7a6..f86f0575235 100644 --- a/pgtap/withPoints/withPointsDD/edge_cases/issue_979.pg +++ b/pgtap/withPoints/withPointsDD/edge_cases/issue_979.pg @@ -19,326 +19,173 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; -SELECT CASE WHEN min_version('3.6.0') THEN plan(3) ELSE plan(6) END; - -/* TODO remove test_old on v4 */ -CREATE OR REPLACE FUNCTION test_old() -RETURNS SETOF TEXT AS -$BODY$ -BEGIN -PREPARE q1 AS -SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 6.8, driving_side := 'b', details := false) -ORDER BY seq; - -EXECUTE -'CREATE TABLE test1 AS -SELECT - node::BIGINT, edge::BIGINT, round(cost, 12) AS cost, round(agg_cost, 12) AS agg_cost -FROM -(VALUES - ( -1 , -1 , 0 , 0), - ( 1 , 1 , 0.4 , 0.4), - ( 2 , 1 , 0.6 , 0.6), - ( 5 , 4 , 1 , 1.6), - ( 6 , 8 , 1 , 2.6), - ( 8 , 7 , 1 , 2.6), - ( 10 , 10 , 1 , 2.6), - ( 7 , 6 , 1 , 3.6), - ( 9 , 9 , 1 , 3.6), - ( 11 , 11 , 1 , 3.6), - ( 13 , 14 , 1 , 3.6), - ( 4 , 16 , 1 , 4.6), - ( 12 , 13 , 1 , 4.6), - ( 3 , 3 , 1 , 5.6) -) AS t (node, edge, cost, agg_cost)'; - -RETURN QUERY -SELECT set_eq('q1', - $$SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test1$$, - 'Should be aggregating individual costs: both driving sides, DIR'); - - -PREPARE q2 AS -SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 6.8, driving_side := 'r', details := false); - -EXECUTE -'CREATE TABLE test2 AS -SELECT - node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT -FROM -(VALUES - ( -1 , -1 , 0 , 0), - ( 1 , 1 , 0.4 , 0.4), - ( 2 , 1 , 1 , 1.4), - ( 5 , 4 , 1 , 2.4), - ( 6 , 8 , 1 , 3.4), - ( 8 , 7 , 1 , 3.4), - ( 10 , 10 , 1 , 3.4), - ( 7 , 6 , 1 , 4.4), - ( 9 , 9 , 1 , 4.4), - ( 11 , 11 , 1 , 4.4), - ( 13 , 14 , 1 , 4.4), - ( 4 , 16 , 1 , 5.4), - ( 12 , 13 , 1 , 5.4), - ( 3 , 3 , 1 , 6.4) -) AS t (node, edge, cost, agg_cost)'; - -RETURN QUERY -SELECT set_eq('q2', - $$SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test2$$, - 'Should be aggregating individual costs: right driving side, DIR'); - - -PREPARE q3 AS -SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 6.8, driving_side := 'l', details := false) -ORDER BY seq; - -EXECUTE -'CREATE TABLE test3 AS -SELECT - node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT -FROM -(VALUES - (-1 , -1 , 0 , 0), - ( 2 , 1 , 0.6 , 0.6), - ( 5 , 4 , 1 , 1.6), - ( 1 , 1 , 1 , 1.6), - ( 6 , 8 , 1 , 2.6), - ( 8 , 7 , 1 , 2.6), - (10 , 10 , 1 , 2.6), - ( 7 , 6 , 1 , 3.6), - ( 9 , 9 , 1 , 3.6), - ( 11 , 11 , 1 , 3.6), - ( 13 , 14 , 1 , 3.6), - ( 4 , 16 , 1 , 4.6), - ( 12 , 15 , 1 , 4.6), - ( 3 , 3 , 1 , 5.6) -) AS t (node, edge, cost, agg_cost)'; - -RETURN QUERY -SELECT set_eq('q3', - $$SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test3$$, - 'Should be aggregating individual costs: left driving side, DIR'); - - -EXECUTE -'CREATE TABLE test4 AS -SELECT - node::BIGINT, cost::FLOAT, agg_cost::FLOAT -FROM -(VALUES - ( -1 , 0 , 0), - ( 1 , 0.4 , 0.4), - ( 2 , 0.6 , 0.6), - ( 5 , 1 , 1.6), - ( 3 , 1 , 1.6), - ( 6 , 1 , 2.6), - ( 8 , 1 , 2.6), - ( 10 , 1 , 2.6), - ( 4 , 1 , 2.6), - ( 7 , 1 , 3.6), - ( 9 , 1 , 3.6), - ( 11 , 1 , 3.6), - ( 13 , 1 , 3.6), - ( 12 , 1 , 4.6) -) AS t (node, cost, agg_cost)'; - -PREPARE q4 AS -SELECT node, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 6.8, driving_side := 'b', details := false, directed:=false); - -RETURN QUERY -SELECT set_eq('q4', - $$SELECT node, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test4$$, - 'Should be aggregating individual costs: both driving sides, UNDI'); - -PREPARE q5 AS -SELECT node, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 6.8, driving_side := 'r', details := false, directed:=false); - -RETURN QUERY -SELECT set_eq('q5', - $$SELECT node, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test4$$, - 'Should be aggregating individual costs: right driving side, UNDI'); - -PREPARE q6 AS -SELECT node, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 6.8, driving_side := 'l', details := false, directed:=false); - -RETURN QUERY -SELECT set_eq('q6', - $$SELECT node, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test4$$, - 'Should be aggregating individual costs: left driving side, UNDI'); - -DROP TABLE IF EXISTS test1; -DROP TABLE IF EXISTS test2; -DROP TABLE IF EXISTS test3; -DROP TABLE IF EXISTS test4; - -END; -$BODY$ -language plpgsql; - +SET extra_float_digits = -3; +-- UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +SELECT CASE WHEN min_version('3.6.0') THEN plan(6) ELSE plan(3) END; CREATE OR REPLACE FUNCTION test_new() RETURNS SETOF TEXT AS $BODY$ BEGIN ---- ---- DIRECTED GRAPH ---- --------- right driving side - -PREPARE q1 AS -SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + -- queries + IF min_version('3.6.0') THEN + PREPARE q1 AS + SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, 6.8, 'r', details := false); + + PREPARE q2 AS + SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, 6.8, 'l', details := false); + + PREPARE q3 AS + SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, 6.8, 'b', details := false, directed:=false); + + + END IF; + + /* TODO remove old on v4 */ + PREPARE q1old AS + SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 6.8, 'r', details := false); + -1, 6.8, driving_side => 'r', details := false); -EXECUTE -'CREATE TABLE test1 AS -SELECT - node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT -FROM -(VALUES - ( -1 , -1 , 0 , 0), - ( 1 , 1 , 0.4 , 0.4), - ( 2 , 1 , 1 , 1.4), - ( 5 , 4 , 1 , 2.4), - ( 6 , 8 , 1 , 3.4), - ( 8 , 7 , 1 , 3.4), - ( 10 , 10 , 1 , 3.4), - ( 7 , 6 , 1 , 4.4), - ( 9 , 9 , 1 , 4.4), - ( 11 , 11 , 1 , 4.4), - ( 13 , 14 , 1 , 4.4), - ( 4 , 16 , 1 , 5.4), - ( 12 , 13 , 1 , 5.4), - ( 3 , 3 , 1 , 6.4) -) AS t (node, edge, cost, agg_cost)'; - -RETURN QUERY -SELECT set_eq('q1', - $$SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test1$$, - 'Should be aggregating individual costs: right driving side, DIR'); - - --------- left driving side - -PREPARE q2 AS -SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + PREPARE q2old AS + SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 6.8, 'l', details := false) -ORDER BY seq; - -EXECUTE -'CREATE TABLE test2 AS -SELECT - node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT -FROM -(VALUES - (-1 , -1 , 0 , 0), - ( 2 , 1 , 0.6 , 0.6), - ( 5 , 4 , 1 , 1.6), - ( 1 , 1 , 1 , 1.6), - ( 6 , 8 , 1 , 2.6), - ( 8 , 7 , 1 , 2.6), - (10 , 10 , 1 , 2.6), - ( 7 , 6 , 1 , 3.6), - ( 9 , 9 , 1 , 3.6), - ( 11 , 11 , 1 , 3.6), - ( 13 , 14 , 1 , 3.6), - ( 4 , 16 , 1 , 4.6), - ( 12 , 15 , 1 , 4.6), - ( 3 , 3 , 1 , 5.6) -) AS t (node, edge, cost, agg_cost)'; + -1, 6.8, driving_side => 'l', details := false); -EXECUTE 'SELECT todo($1, $2)' USING 'test failing with postgres 16', 1; -RETURN QUERY -SELECT set_eq('q2', - $$SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test2$$, - 'Should be aggregating individual costs: left driving side, DIR'); - ---- ---- UNDIRECTED GRAPH ---- - --- all results on udirected graph are "allegedly" equal - --------- both driving sides - -PREPARE q3 AS -SELECT node, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + PREPARE q3old AS + SELECT node, edge, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM pgr_withPointsDD( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 6.8, 'b', details := false, directed:=false); - -EXECUTE -'CREATE TABLE test3 AS -SELECT - node::BIGINT, cost::FLOAT, agg_cost::FLOAT -FROM -(VALUES - ( -1 , 0 , 0), - ( 1 , 0.4 , 0.4), - ( 2 , 0.6 , 0.6), - ( 5 , 1 , 1.6), - ( 3 , 1 , 1.6), - ( 6 , 1 , 2.6), - ( 8 , 1 , 2.6), - ( 10 , 1 , 2.6), - ( 4 , 1 , 2.6), - ( 7 , 1 , 3.6), - ( 9 , 1 , 3.6), - ( 11 , 1 , 3.6), - ( 13 , 1 , 3.6), - ( 12 , 1 , 4.6) -) AS t (node, cost, agg_cost)'; - -RETURN QUERY -SELECT set_eq('q3', - $$SELECT node, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test3$$, - 'Should be aggregating individual costs: both driving sides, UNDI'); - -DROP TABLE IF EXISTS test1; -DROP TABLE IF EXISTS test2; -DROP TABLE IF EXISTS test3; + -1, 6.8, driving_side => 'b', details := false, directed:=false); -END; -$BODY$ -language plpgsql; + -- expected results + IF min_version('3.6.0') THEN + PREPARE e2 AS + SELECT + node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT + FROM + (VALUES + (-1, -1, 0, 0), + ( 6, 1, 0.6, 0.6), + ( 5, 1, 1, 1.6), + ( 7, 4, 1, 1.6), + ( 3, 7, 1, 2.6), + (11, 8, 1, 2.6), + ( 1, 6, 1, 3.6), + ( 8, 10, 1, 2.6), + (16, 9, 1, 3.6), + (12, 11, 1, 3.6), + ( 9, 14, 1, 3.6), + (17, 15, 1, 4.6), + (15, 16, 1, 4.6), + (10, 3, 1, 5.6) + ) AS t (node, edge, cost, agg_cost); + END IF; + + PREPARE e1 AS + SELECT + node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT + FROM + (VALUES + ( -1, -1, 0, 0), + ( 5, 1, 0.4, 0.4), + ( 6, 1, 1, 1.4), + ( 7, 4, 1, 2.4), + ( 3, 7, 1, 3.4), + ( 11, 8, 1, 3.4), + ( 8, 10, 1, 3.4), + ( 1, 6, 1, 4.4), + ( 16, 9, 1, 4.4), + ( 12, 11, 1, 4.4), + ( 9, 14, 1, 4.4), + ( 17, 13, 1, 5.4), + ( 15, 16, 1, 5.4), + ( 10, 3, 1, 6.4) + ) AS t (node, edge, cost, agg_cost); + + PREPARE e2old AS + SELECT + node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT + FROM + (VALUES + ( -1, -1, 0, 0), + ( 6, 1, 0.6, 0.6), + ( 5, 1, 1, 1.6), + ( 7, 4, 1, 1.6), + ( 3, 7, 1, 2.6), + ( 8, 10, 1, 2.6), + ( 11, 8, 1, 2.6), + ( 1, 6, 1, 3.6), + ( 16, 9, 1, 3.6), + ( 12, 11, 1, 3.6), + ( 9, 14, 1, 3.6), + ( 17, 15, 1, 4.6), + ( 15, 16, 1, 4.6), + ( 10, 3, 1, 5.6) + ) AS t (node, edge, cost, agg_cost); + + PREPARE e3 AS + SELECT + node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT + FROM + (VALUES + ( -1, -1, 0, 0), + ( 6, 1, 0.6, 0.6), + ( 5, 1, 0.4, 0.4), + ( 10, 2, 1, 1.6), + ( 7, 4, 1, 1.6), + ( 15, 3, 1, 2.6), + ( 3, 7, 1, 2.6), + ( 11, 8, 1, 2.6), + ( 8, 10, 1, 2.6), + ( 1, 6, 1, 3.6), + ( 16, 9, 1, 3.6), + ( 12, 11, 1, 3.6), + ( 9, 14, 1, 3.6), + ( 17, 13, 1, 4.6) + ) AS t (node, edge, cost, agg_cost); + + + IF min_version('3.6.0') THEN + RETURN QUERY + SELECT set_eq('q1', 'e1', 'right driving side, DIR'); + + RETURN QUERY + SELECT set_eq('q2', 'e2', 'left driving side, DIR'); + + RETURN QUERY + SELECT set_eq('q3', 'e3', 'both driving sides, UNDI'); + END IF; + + SET client_min_messages TO ERROR; + /* TODO remove old tests on v4 */ + RETURN QUERY + SELECT set_eq('q1old', 'e1', 'old: right driving side, DIR'); + + RETURN QUERY + SELECT set_eq('q2old', 'e2old', 'old: left driving side, DIR'); + + RETURN QUERY + SELECT set_eq('q3old', 'e3', 'old: both driving sides, UNDI'); + SET client_min_messages TO WARNING; -CREATE OR REPLACE FUNCTION do_test() -RETURNS SETOF TEXT AS -$BODY$ -BEGIN - IF min_version('3.6.0') THEN - RETURN QUERY SELECT * FROM test_new(); - ELSE - RETURN QUERY SELECT * FROM test_old(); - END IF; END; $BODY$ language plpgsql; -SELECT do_test(); +SELECT test_new(); SELECT finish(); ROLLBACK; diff --git a/pgtap/withPoints/withPointsDD/edge_cases/subset_and_ordering.pg b/pgtap/withPoints/withPointsDD/edge_cases/subset_and_ordering.pg index ff8035bf13e..15c9531ba11 100644 --- a/pgtap/withPoints/withPointsDD/edge_cases/subset_and_ordering.pg +++ b/pgtap/withPoints/withPointsDD/edge_cases/subset_and_ordering.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. BEGIN; SET extra_float_digits=-3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT CASE WHEN min_version('3.6.0') THEN PLAN(13) ELSE plan(1) END; @@ -34,17 +34,17 @@ BEGIN PREPARE dbigset AS SELECT depth, start_vid, node, edge, cost , agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 3, 3.2, 'r',details => true); PREPARE dmediumset AS SELECT depth, start_vid, node, edge, cost , agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 3, 2.8, 'r',details => true); PREPARE dsmallset AS SELECT depth, start_vid, node, edge, cost , agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 3, 1.8, 'r', details => true); @@ -57,17 +57,17 @@ SELECT set_has('dmediumset', 'dsmallset', '3 with details: dist 2.8 has results PREPARE ndbigset AS SELECT depth, start_vid, node, edge, cost , agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 10, 3.2, 'r',details => false) WHERE node > 0; PREPARE ndmediumset AS SELECT depth, start_vid, node, edge, cost , agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 10, 2.8, 'r',details => false) WHERE node > 0; PREPARE ndsmallset AS SELECT depth, start_vid, node, edge, cost , agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 10, 1.8, 'r', details => false) WHERE node > 0; @@ -80,17 +80,17 @@ SELECT set_has('ndmediumset', 'ndsmallset', '3 no details: dist 2.8 has results PREPARE dfrom16 AS SELECT depth, start_vid, node, edge, agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 16, 3.2, 'r',details => true); PREPARE dfromNeg1 AS SELECT depth, start_vid, node, edge, agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 3.2, 'r',details => true); PREPARE dfrom16andNeg1 AS SELECT depth, start_vid, node, edge, agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,16], 3.2, 'r',details => true); @@ -101,7 +101,7 @@ SELECT set_has('dfrom16andNeg1', 'dfromNeg1', '2 with details, aggregate query h PREPARE dequicost AS SELECT depth, start_vid, node, edge, agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,16], 3.2, 'r',details => true, equicost => true); @@ -110,17 +110,17 @@ SELECT set_has('dfrom16andNeg1', 'dequicost', '3, aggregate query with details PREPARE ndfrom16 AS SELECT depth, start_vid, node, edge, agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 16, 3.2, 'r',details => false) WHERE node > 0; PREPARE ndfromNeg1 AS SELECT depth, start_vid, node, edge, agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 3.2, 'r',details => false) WHERE node > 0; PREPARE ndfrom16andNeg1 AS SELECT depth, start_vid, node, edge, agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,16], 3.2, 'r',details => false) WHERE node > 0; @@ -131,7 +131,7 @@ SELECT set_has('ndfrom16andNeg1', 'ndfromNeg1', '2 no details, aggregate query h PREPARE ndequicost AS SELECT depth, start_vid, node, edge, agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,16], 3.2, 'r', details => false, equicost => true) WHERE node > 0; @@ -141,12 +141,12 @@ SELECT set_has('ndfrom16andNeg1', 'ndequicost', '3, aggregate query no details h /* checking ordering */ prepare tocheck AS SELECT seq, depth, start_vid, node, edge, cost , agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,-2], 3.2, 'r',details => true) ORDER BY start_vid, depth, agg_cost; prepare ordered AS SELECT row_number() over (ORDER BY start_vid, depth, agg_cost) AS seq, depth, start_vid, node, edge, cost , agg_cost FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1,-2], 3.2, 'r',details => true); diff --git a/pgtap/withPoints/withPointsDD/edge_cases/undirected_driving_side.pg b/pgtap/withPoints/withPointsDD/edge_cases/undirected_driving_side.pg index 7d2d8421d4b..4b9411771cb 100644 --- a/pgtap/withPoints/withPointsDD/edge_cases/undirected_driving_side.pg +++ b/pgtap/withPoints/withPointsDD/edge_cases/undirected_driving_side.pg @@ -34,7 +34,7 @@ SET client_min_messages TO ERROR; -------- both driving sides PREPARE q1 AS SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side := 'b', details := true, directed:=false) ORDER BY seq; @@ -43,7 +43,7 @@ ORDER BY seq; PREPARE q2 AS SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side := 'r', details := true, directed:=false) ORDER BY seq; @@ -53,7 +53,7 @@ ORDER BY seq; PREPARE q3 AS SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD( - 'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 4.8, driving_side := 'l', details := true, directed:=false) ORDER BY seq; diff --git a/pgtap/withPoints/withPointsDD/inner_query.pg b/pgtap/withPoints/withPointsDD/inner_query.pg index 454efbd7780..6a2440b043d 100644 --- a/pgtap/withPoints/withPointsDD/inner_query.pg +++ b/pgtap/withPoints/withPointsDD/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT plan(168); CREATE OR REPLACE FUNCTION test_innerquery() @@ -30,28 +30,28 @@ BEGIN IF min_version('3.6.0') THEN -- SINGLE VERTEX RETURN QUERY - SELECT style_dijkstra('pgr_withPointsDD(', ', $$SELECT * from pointsOfInterest$$, 2, 3.8, $$r$$, true)'); + SELECT style_dijkstra('pgr_withPointsDD(', ', $$SELECT * from pointsOfInterest$$, 5, 3.8, $$r$$, true)'); RETURN QUERY - SELECT innerquery_points('pgr_withPointsDD($$SELECT * FROM edge_table$$,', ', 2, 3.8, $$l$$,true)'); + SELECT innerquery_points('pgr_withPointsDD($$SELECT * FROM edges$$,', ', 5, 3.8, $$l$$,true)'); -- MULTIPLE VERTEX RETURN QUERY - SELECT style_dijkstra('pgr_withPointsDD(', ', $$SELECT * from pointsOfInterest$$, ARRAY[2,3], 3.8, $$l$$,true)'); + SELECT style_dijkstra('pgr_withPointsDD(', ', $$SELECT * from pointsOfInterest$$, ARRAY[5,10], 3.8, $$l$$,true)'); RETURN QUERY - SELECT innerquery_points('pgr_withPointsDD($$SELECT * FROM edge_table$$,', ', ARRAY[2,3], 3.8, $$r$$,true)'); + SELECT innerquery_points('pgr_withPointsDD($$SELECT * FROM edges$$,', ', ARRAY[5,10], 3.8, $$r$$,true)'); ELSE SET client_min_messages TO ERROR; -- SINGLE VERTEX RETURN QUERY - SELECT style_dijkstra('pgr_withPointsDD(', ', $$SELECT * from pointsOfInterest$$, 2, 3.8, true)'); + SELECT style_dijkstra('pgr_withPointsDD(', ', $$SELECT * from pointsOfInterest$$, 5, 3.8, true)'); RETURN QUERY - SELECT innerquery_points('pgr_withPointsDD($$SELECT * FROM edge_table$$,', ', 2, 3.8, true)'); + SELECT innerquery_points('pgr_withPointsDD($$SELECT * FROM edges$$,', ', 5, 3.8, true)'); -- MULTIPLE VERTEX RETURN QUERY - SELECT style_dijkstra('pgr_withPointsDD(', ', $$SELECT * from pointsOfInterest$$, ARRAY[2,3], 3.8, true)'); + SELECT style_dijkstra('pgr_withPointsDD(', ', $$SELECT * from pointsOfInterest$$, ARRAY[2,10], 3.8, true)'); RETURN QUERY - SELECT innerquery_points('pgr_withPointsDD($$SELECT * FROM edge_table$$,', ', ARRAY[2,3], 3.8, true)'); + SELECT innerquery_points('pgr_withPointsDD($$SELECT * FROM edges$$,', ', ARRAY[5,10], 3.8, true)'); END IF; diff --git a/pgtap/withPoints/withPointsDD/no_crash_test.pg b/pgtap/withPoints/withPointsDD/no_crash_test.pg index a66059ead3b..898065f6f73 100644 --- a/pgtap/withPoints/withPointsDD/no_crash_test.pg +++ b/pgtap/withPoints/withPointsDD/no_crash_test.pg @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.6.0') THEN plan(50) ELSE plan(42) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE pois AS SELECT pid, edge_id, fraction from pointsOfInterest; PREPARE null_ret AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); SELECT set_eq('null_ret', 'SELECT NULL::BIGINT[]', 'Should be empty to tests be meaningful'); @@ -46,7 +46,7 @@ IF min_version('3.6.0') THEN -- 1 to distance params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT pid, edge_id, fraction from pointsOfInterest$$', '1', '1.3::FLOAT', @@ -55,7 +55,7 @@ IF min_version('3.6.0') THEN subs = ARRAY[ 'NULL', 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL', 'NULL' ]::TEXT[]; @@ -73,7 +73,7 @@ IF min_version('3.6.0') THEN -- many to distance params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT pid, edge_id, fraction from pointsOfInterest$$', 'ARRAY[1]', '1.3::FLOAT', @@ -82,7 +82,7 @@ IF min_version('3.6.0') THEN subs = ARRAY[ 'NULL', 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL', 'NULL' ]::TEXT[]; @@ -104,7 +104,7 @@ ELSE SET client_min_messages TO ERROR; -- 1 to distance params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT pid, edge_id, fraction from pointsOfInterest$$', '1', '1.3::FLOAT' @@ -112,7 +112,7 @@ SET client_min_messages TO ERROR; subs = ARRAY[ 'NULL', 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; @@ -128,7 +128,7 @@ SET client_min_messages TO ERROR; -- many to distance params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$', + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$', '$$SELECT pid, edge_id, fraction from pointsOfInterest$$', 'ARRAY[1]', '1.3::FLOAT' @@ -136,7 +136,7 @@ SET client_min_messages TO ERROR; subs = ARRAY[ 'NULL', 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', 'NULL' ]::TEXT[]; diff --git a/pgtap/withPoints/withPointsVia/compare_dijkstraVia/directed.pg b/pgtap/withPoints/withPointsVia/compare_dijkstraVia/directed.pg index 1ac9503a8af..487574fef14 100644 --- a/pgtap/withPoints/withPointsVia/compare_dijkstraVia/directed.pg +++ b/pgtap/withPoints/withPointsVia/compare_dijkstraVia/directed.pg @@ -22,7 +22,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN CASE WHEN version() LIKE '%SQL 10%' OR version() LIKE '%SQL 11%' THEN plan(1024) ELSE plan(2048) END ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT withPointsVia_VS_dijstraVia(16, true); diff --git a/pgtap/withPoints/withPointsVia/compare_dijkstraVia/undirected.pg b/pgtap/withPoints/withPointsVia/compare_dijkstraVia/undirected.pg index a807b3aa8c0..6d82a969d09 100644 --- a/pgtap/withPoints/withPointsVia/compare_dijkstraVia/undirected.pg +++ b/pgtap/withPoints/withPointsVia/compare_dijkstraVia/undirected.pg @@ -22,7 +22,7 @@ BEGIN; SELECT CASE WHEN min_version('3.4.0') THEN CASE WHEN version() LIKE '%SQL 10%' OR version() LIKE '%SQL 11%' THEN plan(1024) ELSE plan(2048) END ELSE plan(1) END; SET extra_float_digits = -3; -UPDATE edge_table SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; +UPDATE edges SET cost = sign(cost) + 0.001 * id * id, reverse_cost = sign(reverse_cost) + 0.001 * id * id; SELECT withPointsVia_VS_dijstraVia(16, false); diff --git a/pgtap/withPoints/withPointsVia/inner_query.pg b/pgtap/withPoints/withPointsVia/inner_query.pg index 8536e508527..484d08b29aa 100644 --- a/pgtap/withPoints/withPointsVia/inner_query.pg +++ b/pgtap/withPoints/withPointsVia/inner_query.pg @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(84) ELSE plan(1) END; CREATE OR REPLACE FUNCTION inner_query() @@ -33,7 +33,7 @@ BEGIN -- ONE VIA RETURN QUERY SELECT style_dijkstra('pgr_withPointsVia(', ', $$SELECT * FROM pointsOfInterest$$, ARRAY[2,9,12])'); - RETURN QUERY SELECT innerquery_points('pgr_withPointsVia($$SELECT * FROM edge_table$$,', ', ARRAY[2,9,12])'); + RETURN QUERY SELECT innerquery_points('pgr_withPointsVia($$SELECT * FROM edges$$,', ', ARRAY[2,9,12])'); END; $BODY$ diff --git a/pgtap/withPoints/withPointsVia/no_crash_test.pg b/pgtap/withPoints/withPointsVia/no_crash_test.pg index d14b25b7f8a..135eb251c1a 100644 --- a/pgtap/withPoints/withPointsVia/no_crash_test.pg +++ b/pgtap/withPoints/withPointsVia/no_crash_test.pg @@ -19,17 +19,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ********************************************************************PGR-GNU*/ BEGIN; -UPDATE edge_table SET cost = sign(cost), reverse_cost = sign(reverse_cost); +UPDATE edges SET cost = sign(cost), reverse_cost = sign(reverse_cost); SELECT CASE WHEN min_version('3.4.0') THEN plan(19) ELSE plan(4) END; PREPARE edges AS -SELECT id, source, target, cost, reverse_cost FROM edge_table; +SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS -SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS -SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); +SELECT array_agg(id) FROM vertices WHERE id IN (-1); SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); @@ -51,15 +51,15 @@ END IF; -- ONE VIA params = ARRAY[ -'$$SELECT * FROM edge_table$$', +'$$SELECT * FROM edges$$', '$$SELECT * FROM pointsOfInterest$$', -'ARRAY[2,5]::BIGINT[]' +'ARRAY[6,7]::BIGINT[]' ]::TEXT[]; subs = ARRAY[ 'NULL', 'NULL', -'(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' +'(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test('pgr_withPointsvia', params, subs); diff --git a/tools/developer/taptest.sh b/tools/developer/taptest.sh index de6a4516755..539477d1b35 100755 --- a/tools/developer/taptest.sh +++ b/tools/developer/taptest.sh @@ -56,7 +56,7 @@ do psql "${PGFLAGS}" -d "$PGDATABASE" -c "SELECT * FROM pgr_full_version();" psql "${PGFLAGS}" -d "$PGDATABASE" -X -q --set client_min_messages=WARNING --set ON_ERROR_STOP=1 --pset pager=off \ - -f sampledata_pgtap.sql \ + -f sampledata.sql \ -f vrppdtw_data.sql \ -f solomon_100_rc101.data.sql \ -f innerQuery.sql \ @@ -65,11 +65,9 @@ do -f old_inner_styles.sql \ -f no_crash_test.sql \ -f alphaShapeTester.sql \ - -f binaryBreadthFirstSearch_pgtap_data.sql \ -f general_pgtap_tests.sql \ -f no_crash_general.sql \ -f dijkstra_pgtap_tests.sql \ - -f tmp_net.sql \ -f flow_pgtap_tests.sql \ -f trsp_tests.sql \ -f spanningtree.sql \ diff --git a/tools/testers/allpairs_tests.sql b/tools/testers/allpairs_tests.sql new file mode 100644 index 00000000000..081dfafc708 --- /dev/null +++ b/tools/testers/allpairs_tests.sql @@ -0,0 +1,139 @@ +/*PGR-GNU***************************************************************** + +Copyright (c) 2023 pgRouting developers +Mail: project@pgrouting.org + +------ +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + ********************************************************************PGR-GNU*/ + +CREATE OR REPLACE FUNCTION test_agg_cost(fn TEXT, directed BOOLEAN) +RETURNS SETOF TEXT AS +$BODY$ +DECLARE + q1 TEXT; + q2 TEXT; + q3 TEXT; + q4 TEXT; + +BEGIN + + q1 := format( + $$ SELECT * FROM %1$s('SELECT id, source, target, cost, reverse_cost FROM edges', + %2$L::BOOLEAN) WHERE agg_cost < 0 + $$, fn, directed); + RETURN QUERY + SELECT is_empty(q1, fn || ': c & rc, ' || directed || ': No cost can be negative'); + + q2 := format($$ SELECT * FROM %1$s( 'SELECT id, source, target, cost FROM edges', + %2$L::BOOLEAN) WHERE agg_cost < 0 + $$, fn, directed); + RETURN QUERY + SELECT is_empty(q2, fn || ': c, ' || directed || ': No cost can be negative'); + + q3 := format($$ SELECT * FROM %1$s( 'SELECT id, source, target, cost, -1 as reverse_cost FROM edges', + %2$L::BOOLEAN) WHERE agg_cost < 0 + $$, fn, directed); + RETURN QUERY + SELECT is_empty(q3, fn || ': c & -1, ' || directed || ': No cost can be negative'); + + q4 := format($$ SELECT * FROM %1$s( 'SELECT id, source, target, -1 AS cost, reverse_cost FROM edges', + %2$L::BOOLEAN) WHERE agg_cost < 0 + $$, fn, directed); + RETURN QUERY + SELECT is_empty(q4, fn || ' -1 & rc, ' || directed || ': No cost can be negative'); + +END; +$BODY$ +LANGUAGE plpgsql; + +CREATE OR REPLACE FUNCTION allPairs_compare_dijkstra(fn TEXT, directed BOOLEAN) +RETURNS SETOF TEXT AS +$BODY$ +DECLARE + q1 TEXT; + e1 TEXT; + +BEGIN + + q1 := format($$ SELECT start_vid, end_vid, round(agg_cost::NUMERIC,2) FROM %1$s( 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 1', + %2$L::BOOLEAN) + $$, fn, directed); + e1 := format($$ SELECT start_vid, end_vid, round(agg_cost::NUMERIC,2) FROM pgr_dijkstraCostMatrix( 'SELECT id, source, target, cost, reverse_cost FROM edges', + %2$L::BIGINT[], %3$L::BOOLEAN) + $$, fn, ARRAY[5,6], directed); + RETURN QUERY + SELECT set_eq(q1, e1, fn || ': compare subgraph with 2 vertices'); + + q1 := format($$ SELECT start_vid, end_vid, round(agg_cost::NUMERIC,2) FROM %1$s( 'SELECT id, source, target, cost, reverse_cost FROM edges', + %2$L::BOOLEAN) + $$, fn, directed); + e1 := format($$ + SELECT start_vid, end_vid, round(agg_cost::NUMERIC,2) FROM pgr_dijkstraCostMatrix( + 'SELECT id, source, target, cost, reverse_cost FROM edges', + %2$L::BIGINT[], + %3$L::BOOLEAN)$$, + fn, ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17], directed); + RETURN QUERY + SELECT set_eq(q1, e1, fn || ': compare complete graph'); + +END; +$BODY$ +LANGUAGE plpgsql; + +CREATE OR REPLACE FUNCTION allPairs_test_flags(fn TEXT) +RETURNS SETOF TEXT AS +$BODY$ +DECLARE + q1 TEXT; + e1 TEXT; + +BEGIN + + q1 := format($$ SELECT * FROM %1$s( + 'SELECT id, source, target, cost, reverse_cost FROM edges') + $$, fn); + RETURN QUERY + SELECT lives_ok(q1, fn || ': lives with no flags'); + + q1 := format($$ SELECT * FROM %1$s( + 'SELECT id, source, target, cost, reverse_cost FROM edges', FALSE) + $$, fn); + RETURN QUERY + SELECT lives_ok(q1, fn || ': lives with 1 flag'); + + q1 := format($$ SELECT * FROM %1$s( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + directed => FALSE)$$, fn); + RETURN QUERY + SELECT lives_ok(q1, fn || ': lives with named flag'); + + q1 := format($$ SELECT * FROM %1$s( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + dir =>FALSE)$$, fn); + RETURN QUERY + SELECT throws_ok(q1, + '42883','function ' || fn || '(unknown, dir => boolean) does not exist', + fn || ': throws with invalid flags name'); + + q1 := format($$ SELECT * FROM %1$s( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + FALSE, TRUE)$$, fn); + RETURN QUERY + SELECT throws_ok(q1, + '42883','function ' || fn || '(unknown, boolean, boolean) does not exist', + fn || ': throws with invalid flags name'); + +END; +$BODY$ +LANGUAGE plpgsql; diff --git a/tools/testers/binaryBreadthFirstSearch_pgtap_data.sql b/tools/testers/binaryBreadthFirstSearch_pgtap_data.sql deleted file mode 100644 index f0007a52295..00000000000 --- a/tools/testers/binaryBreadthFirstSearch_pgtap_data.sql +++ /dev/null @@ -1,32 +0,0 @@ - -DROP TABLE IF EXISTS roadworks CASCADE; -CREATE table roadworks ( - id BIGINT not null primary key, - source BIGINT, - target BIGINT, - road_work FLOAT, - reverse_road_work FLOAT - -); - - -INSERT INTO roadworks( - id, source, target, road_work, reverse_road_work) VALUES - (1, 1, 2, 0, 0), - (2, 2, 3, -1, 1), - (3, 3, 4, -1, 0), - (4, 2, 5, 0, 0), - (5, 3, 6, 1, -1), - (6, 7, 8, 1, 1), - (7, 8, 5, 0, 0), - (8, 5, 6, 1, 1), - (9, 6, 9, 1, 1), - (10, 5, 10, 1, 1), - (11, 6, 11, 1, -1), - (12, 10, 11, 0, -1), - (13, 11, 12, 1, -1), - (14, 10, 13, 1, 1), - (15, 9, 12, 0, 0), - (16, 4, 9, 0, 0), - (17, 14, 15, 0, 0), - (18, 16, 17, 0, 0); \ No newline at end of file diff --git a/tools/testers/compare_dijkstra.sql b/tools/testers/compare_dijkstra.sql index 824223e8c16..eb14ed61fdd 100644 --- a/tools/testers/compare_dijkstra.sql +++ b/tools/testers/compare_dijkstra.sql @@ -45,7 +45,7 @@ BEGIN FOR j IN 1.. cant LOOP -- with reverse cost - inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edges'; dijkstra_sql := 'SELECT ' || ret_c || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', directed => ' || directed || ') ' || where_c; @@ -55,7 +55,7 @@ BEGIN -- no reverse cost - inner_sql := 'SELECT id, source, target, cost FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost FROM edges'; dijkstra_sql := 'SELECT ' || ret_c || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || i || ', ' || j || ', directed => ' || directed || ') ' || where_c; @@ -88,13 +88,13 @@ BEGIN arr := 'ARRAY[1,2,3,4,5,6,7,8]'; -- with reverse cost - inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edges'; dijkstra_sql := 'SELECT ' || ret_c || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || arr || ', ' || j || ', directed => ' || directed || ')' || where_c; fn_sql := 'SELECT ' || ret_c || ' FROM '|| fn || '($$' || inner_sql || '$$, ' || arr || ', ' || j || ', directed => ' || directed || ')' || where_c; RETURN query SELECT set_eq(fn_sql, dijkstra_sql, fn_sql); -- no reverse cost - inner_sql := 'SELECT id, source, target, cost FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost FROM edges'; dijkstra_sql := 'SELECT ' || ret_c || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || arr || ', ' || j || ', directed => ' || directed || ')' || where_c; fn_sql := 'SELECT ' || ret_c || ' FROM '|| fn || '($$' || inner_sql || '$$, ' || arr || ', ' || j || ', directed => ' || directed || ')' || where_c; RETURN query SELECT set_eq(fn_sql, dijkstra_sql, fn_sql); @@ -122,13 +122,13 @@ BEGIN arr := 'ARRAY[1,2,3,4,5,6,7,8]'; -- with reverse cost - inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edges'; dijkstra_sql := 'SELECT ' || ret_c || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || j || ', ' || arr || ', directed => ' || directed || ') ' || where_c; fn_sql := 'SELECT ' || ret_c || ' FROM '|| fn || '($$' || inner_sql || '$$, ' || j || ', ' || arr || ', directed => ' || directed || ') ' || where_c; RETURN query SELECT set_eq(fn_sql, dijkstra_sql, fn_sql); -- no reverse cost - inner_sql := 'SELECT id, source, target, cost FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost FROM edges'; dijkstra_sql := 'SELECT ' || ret_c || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || j || ', ' || arr || ', directed => ' || directed || ') ' || where_c; fn_sql := 'SELECT ' || ret_c || ' FROM '|| fn || '($$' || inner_sql || '$$, ' || j || ', ' || arr || ', directed => ' || directed || ') ' || where_c; RETURN query SELECT set_eq(fn_sql, dijkstra_sql, fn_sql); @@ -156,13 +156,13 @@ BEGIN arr2 := 'ARRAY[9,10,11,12,13,14,15]'; -- with reverse cost - inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edges'; dijkstra_sql := 'SELECT ' || ret_c || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || arr1 || ', ' || arr2 || ', directed => ' || directed || ') ' || where_c; fn_sql := 'SELECT ' || ret_c || ' FROM '|| fn || '($$' || inner_sql || '$$, ' || arr1 || ', ' || arr2 || ', directed => ' || directed || ') ' || where_c; RETURN query SELECT set_eq(fn_sql, dijkstra_sql, fn_sql); -- no reverse cost - inner_sql := 'SELECT id, source, target, cost FROM edge_table'; + inner_sql := 'SELECT id, source, target, cost FROM edges'; dijkstra_sql := 'SELECT ' || ret_c || ' FROM pgr_dijkstra($$' || inner_sql || '$$, ' || arr1 || ', ' || arr2 || ', directed => ' || directed || ') ' || where_c; fn_sql := 'SELECT ' || ret_c || ' FROM '|| fn || '($$' || inner_sql || '$$, ' || arr1 || ', ' || arr2 || ', directed => ' || directed || ') ' || where_c; RETURN query SELECT set_eq(fn_sql, dijkstra_sql, fn_sql); @@ -184,15 +184,15 @@ DECLARE BEGIN -- with reverse cost - inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edge_table'; - dijkstra_sql := 'SELECT ' || ret_c || ' FROM pgr_dijkstra($$' || inner_sql || '$$, $$SELECT source, target FROM combinations_table$$, directed => ' || directed || ') ' || where_c; - fn_sql := 'SELECT ' || ret_c || ' FROM ' || fn || '($$' || inner_sql || '$$, $$SELECT source, target FROM combinations_table$$, directed => ' || directed || ') ' || where_c; + inner_sql := 'SELECT id, source, target, cost, reverse_cost FROM edges'; + dijkstra_sql := 'SELECT ' || ret_c || ' FROM pgr_dijkstra($$' || inner_sql || '$$, $$SELECT source, target FROM combinations$$, directed => ' || directed || ') ' || where_c; + fn_sql := 'SELECT ' || ret_c || ' FROM ' || fn || '($$' || inner_sql || '$$, $$SELECT source, target FROM combinations$$, directed => ' || directed || ') ' || where_c; RETURN query SELECT set_eq(fn_sql, dijkstra_sql, fn_sql); -- no reverse cost - inner_sql := 'SELECT id, source, target, cost FROM edge_table'; - dijkstra_sql := 'SELECT ' || ret_c || ' FROM pgr_dijkstra($$' || inner_sql || '$$, $$SELECT source, target FROM combinations_table$$, directed => ' || directed || ') ' || where_c; - fn_sql := 'SELECT ' || ret_c || ' FROM ' || fn || '($$' || inner_sql || '$$, $$SELECT source, target FROM combinations_table$$, directed => ' || directed || ') ' || where_c; + inner_sql := 'SELECT id, source, target, cost FROM edges'; + dijkstra_sql := 'SELECT ' || ret_c || ' FROM pgr_dijkstra($$' || inner_sql || '$$, $$SELECT source, target FROM combinations$$, directed => ' || directed || ') ' || where_c; + fn_sql := 'SELECT ' || ret_c || ' FROM ' || fn || '($$' || inner_sql || '$$, $$SELECT source, target FROM combinations$$, directed => ' || directed || ') ' || where_c; RETURN query SELECT set_eq(fn_sql, dijkstra_sql, fn_sql); END diff --git a/tools/testers/contraction_tapfuncs.sql b/tools/testers/contraction_tapfuncs.sql new file mode 100644 index 00000000000..d66c6e490b9 --- /dev/null +++ b/tools/testers/contraction_tapfuncs.sql @@ -0,0 +1,119 @@ +/*PGR-GNU***************************************************************** + +Copyright (c) 2023 pgRouting developers +Mail: project@pgrouting.org + +------ +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + ********************************************************************PGR-GNU*/ +CREATE OR REPLACE FUNCTION test_ids_size(pow INTEGER, directed BOOLEAN) +RETURNS SETOF TEXT AS +$BODY$ +DECLARE +vids BIGINT[] = ARRAY[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; +x BIGINT; +q TEXT; +mainq TEXT; +expected TEXT; +BEGIN + UPDATE edges + SET id = id + POWER(10, pow), source = source + POWER(10, pow), target = target + POWER(10, pow); + + FOR i IN 1..18 LOOP + vids[i] := POWER(10, pow) + vids[i]; + END LOOP; + + mainq = $d$ SELECT * FROM pgr_contraction( + $$SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = ANY('%1$s'::BIGINT[]) $$, + ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], '%2$s'::BOOLEAN)$d$; + + q = format(mainq, ARRAY[vids[5]], directed); + + RETURN QUERY + SELECT set_eq(q, + $$SELECT + 'v'::CHAR AS type, + $$ || vids[11] || $$::BIGINT AS id, + ARRAY[ $$ || vids[10] || $$]::BIGINT[] AS contracted_vertices, + -1::BIGINT AS source, + -1::BIGINT AS target, + -1::FLOAT AS cost$$); + + q = format(mainq, ARRAY[vids[2],vids[4],vids[5],vids[8]], directed); + + RETURN QUERY + SELECT is_empty(q); + + q = format(mainq, ARRAY[vids[1]], directed); + + RETURN QUERY + SELECT set_eq(q, + $$SELECT + 'v'::CHAR AS type, + $$ || vids[6] || $$::BIGINT AS id, + ARRAY[ $$ || vids[5] || $$]::BIGINT[] AS contracted_vertices, + -1::BIGINT AS source, + -1::BIGINT AS target, + -1::FLOAT AS cost$$); + + q = format(mainq, ARRAY[vids[1], vids[2]], directed); + + RETURN QUERY + SELECT set_eq(q, + $$SELECT + 'v'::CHAR AS type, + $$ || vids[10] || $$::BIGINT AS id, + ARRAY[ $$ || vids[5] || $$,$$ || vids[6] || $$]::BIGINT[] AS contracted_vertices, + -1::BIGINT AS source, + -1::BIGINT AS target, + -1::FLOAT AS cost$$); + + q = format(mainq, ARRAY[vids[1], vids[2], vids[3]], directed); + + expected = format($d$ + SELECT type, id, contracted_vertices, source, target, cost + FROM (VALUES + ('v'::CHAR, %1$s::BIGINT, '%2$s'::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT) + ) AS t(type, id, contracted_vertices, source, target, cost )$d$, + vids[6], ARRAY[vids[5], vids[10], vids[15]]) ; + + RETURN QUERY + SELECT set_eq(q, expected); + + q = format($d$ SELECT * FROM pgr_contraction( + $$SELECT id, source, target, cost, reverse_cost FROM edges$$, + ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], '%1$s'::BOOLEAN)$d$, directed); + + expected = format($d$ + SELECT type, id, contracted_vertices, source, target, cost + FROM (VALUES + ('v'::CHAR, %1$s::BIGINT, '%2$s'::BIGINT[], -1::BIGINT, -1::BIGINT, -1::FLOAT), + ('v', %3$s, '%4$s'::BIGINT[], -1, -1, -1), + ('v', %5$s, '%6$s'::BIGINT[], -1, -1, -1), + ('v', %7$s, '%8$s'::BIGINT[], -1, -1, -1), + ('v', %9$s, '%10$s'::BIGINT[], -1, -1, -1) + ) AS t(type, id, contracted_vertices, source, target, cost )$d$, + vids[4], ARRAY[vids[2]], + vids[6], ARRAY[vids[5]], + vids[7], ARRAY[vids[1], vids[3]], + vids[8], ARRAY[vids[9]], + vids[14], ARRAY[vids[13]]); + + RETURN QUERY + SELECT set_eq(q, expected); + + UPDATE edges + SET id = id - POWER(10, pow), source = source - POWER(10, pow), target = target - POWER(10, pow); +END; +$BODY$ +LANGUAGE plpgSQL; diff --git a/tools/testers/dijkstra_pgtap_tests.sql b/tools/testers/dijkstra_pgtap_tests.sql index 039fd411e9f..46790131259 100644 --- a/tools/testers/dijkstra_pgtap_tests.sql +++ b/tools/testers/dijkstra_pgtap_tests.sql @@ -10,16 +10,16 @@ BEGIN -- pgr_dijkstra, -- pgr_dijkstraCost - PREPARE edges AS - SELECT id, source, target, cost, reverse_cost FROM edge_table; + PREPARE edgesn AS + SELECT id, source, target, cost, reverse_cost FROM edges; PREPARE null_ret AS - SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); + SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS - SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); + SELECT array_agg(id) FROM vertices WHERE id IN (-1); - RETURN QUERY SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); + RETURN QUERY SELECT isnt_empty('edgesn', 'Should be not empty to tests be meaningful'); RETURN QUERY SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); @@ -28,14 +28,14 @@ BEGIN -- one to one params = ARRAY[ - '$$SELECT id, source, target, cost, reverse_cost FROM edge_table$$' - ,'1::BIGINT', - '2::BIGINT' + '$$SELECT id, source, target, cost, reverse_cost FROM edges$$' + ,'5::BIGINT', + '6::BIGINT' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN QUERY SELECT * FROM no_crash_test(fn_name, params, subs); @@ -48,11 +48,11 @@ BEGIN RETURN QUERY SELECT * FROM no_crash_test(fn_name, params, subs); -- one to many - params = ARRAY['$$edges$$','1', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; + params = ARRAY['$$edgesn$$','1', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN QUERY SELECT * FROM no_crash_test(fn_name, params, subs); @@ -65,11 +65,11 @@ BEGIN RETURN QUERY SELECT * FROM no_crash_test(fn_name, params, subs); -- many to one - params = ARRAY['$$edges$$', 'ARRAY[2,5]::BIGINT[]', '1']::TEXT[]; + params = ARRAY['$$edgesn$$', 'ARRAY[2,5]::BIGINT[]', '1']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN QUERY SELECT * FROM no_crash_test(fn_name, params, subs); @@ -82,11 +82,11 @@ BEGIN RETURN QUERY SELECT * FROM no_crash_test(fn_name, params, subs); -- many to many - params = ARRAY['$$edges$$','ARRAY[1]::BIGINT[]', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; + params = ARRAY['$$edgesn$$','ARRAY[1]::BIGINT[]', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN QUERY SELECT * FROM no_crash_test(fn_name, params, subs); @@ -104,20 +104,20 @@ BEGIN END IF; PREPARE combinations AS - SELECT source, target FROM combinations_table; + SELECT source, target FROM combinations; PREPARE null_combinations AS - SELECT source, target FROM combinations_table WHERE false; + SELECT source, target FROM combinations WHERE false; RETURN QUERY SELECT isnt_empty('combinations', 'Should be not empty to tests be meaningful'); RETURN QUERY SELECT is_empty('null_combinations', 'Should be empty to tests be meaningful'); -- Combinations SQL - params = ARRAY['$$edges$$','$$combinations$$']::TEXT[]; + params = ARRAY['$$edgesn$$','$$combinations$$']::TEXT[]; subs = ARRAY[ 'NULL', - '$$(SELECT source, target FROM combinations_table WHERE false )$$' + '$$(SELECT source, target FROM combinations WHERE false )$$' ]::TEXT[]; RETURN QUERY SELECT * FROM no_crash_test(fn_name, params, subs); @@ -218,3 +218,55 @@ END IF; END $BODY$ LANGUAGE plpgsql VOLATILE; + + +/* tests 5 overloads +currently +- tried on pgr_dijstra +- tests: + - empty + - isnt_empty +*/ +CREATE OR REPLACE FUNCTION taptest(test TEXT, q TEXT, v1 INTEGER, v2 INTEGER, directed BOOLEAN) +RETURNS SETOF TEXT AS +$BODY$ +BEGIN + RETURN QUERY EXECUTE format( + $q$ SELECT %5$s( + $$SELECT * from pgr_dijkstra(%1$L, %2$s, %3$s, %4$L::BOOLEAN)$$, + $$%5$s: SELECT * from pgr_dijkstra(%1$L, %2$s, %3$s, %4$L::BOOLEAN)$$) + $q$, + q, v1, v2, directed, test); + + RETURN QUERY EXECUTE format( + $q$ SELECT %5$s( + $$SELECT * from pgr_dijkstra(%1$L, array[%2$s], %3$s, %4$L::BOOLEAN)$$, + $$%5$s: SELECT * from pgr_dijkstra(%1$L, array[%2$s], %3$s, %4$L::BOOLEAN)$$) + $q$, + q, v1, v2, directed, test); + + RETURN QUERY EXECUTE format( + $q$ SELECT %5$s( + $$SELECT * from pgr_dijkstra(%1$L, %2$s, array[%3$s], %4$L::BOOLEAN)$$, + $$%5$s: SELECT * from pgr_dijkstra(%1$L, %2$s, array[%3$s], %4$L::BOOLEAN)$$) + $q$, + q, v1, v2, directed, test); + + RETURN QUERY EXECUTE format( + $q$ SELECT %5$s( + $$SELECT * from pgr_dijkstra(%1$L, array[%2$s], array[%3$s], %4$L::BOOLEAN)$$, + $$%5$s: SELECT * from pgr_dijkstra(%1$L, array[%2$s], array[%3$s], %4$L::BOOLEAN)$$) + $q$, + q, v1, v2, directed, test); + + IF min_version('3.1.0') THEN + RETURN QUERY EXECUTE format( + $q$ SELECT %5$s( + $$SELECT * from pgr_dijkstra(%1$L, 'SELECT %2$s AS source, %3$s AS target', %4$L::BOOLEAN)$$, + $$%5$s: SELECT * from pgr_dijkstra(%1$L, 'SELECT %2$s AS source, %3$s AS target', %4$L::BOOLEAN)$$) + $q$, + q, v1, v2, directed, test); + END IF; +END; +$BODY$ +LANGUAGE plpgsql; diff --git a/tools/testers/flow_pgtap_tests.sql b/tools/testers/flow_pgtap_tests.sql index e901f2977e7..7051ff23010 100644 --- a/tools/testers/flow_pgtap_tests.sql +++ b/tools/testers/flow_pgtap_tests.sql @@ -5,27 +5,36 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN + + IF NOT min_version('3.2.0') AND fn_name IN ('pgr_maxFlowMinCost', 'pgr_maxFlowMinCost_Cost') THEN + RETURN QUERY + SELECT skip(1, 'Can not test before 3.2.0 on ' || fn_name); + RETURN; + END IF; + IF fn_name = 'pgr_edgeDisjointPaths' THEN PREPARE edges AS - SELECT id, source, target, cost, reverse_cost FROM edge_table; + SELECT id, source, target, cost, reverse_cost FROM edges; ELSE PREPARE edges AS SELECT id, source, target, capacity, - reverse_capacity - FROM edge_table + reverse_capacity, + cost, + reverse_cost + FROM edges ORDER BY id; END IF; PREPARE null_ret AS - SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); + SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS - SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); + SELECT array_agg(id) FROM vertices WHERE id IN (-1); RETURN QUERY @@ -37,13 +46,13 @@ BEGIN -- one to one params = ARRAY['$$edges$$', - '1::BIGINT', - '2::BIGINT' + '5::BIGINT', + '6::BIGINT' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test(fn_name,params, subs); @@ -58,12 +67,12 @@ BEGIN params = ARRAY['$$edges$$', '1::BIGINT', - 'ARRAY[2,5]::BIGINT[]' + 'ARRAY[6,7]::BIGINT[]' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test(fn_name,params, subs); @@ -77,13 +86,13 @@ BEGIN -- many to one params = ARRAY['$$edges$$', - 'ARRAY[2,5]::BIGINT[]', - '1' + 'ARRAY[6,7]::BIGINT[]', + '5' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test(fn_name,params, subs); @@ -97,13 +106,13 @@ BEGIN -- many to many params = ARRAY['$$edges$$', - 'ARRAY[1]::BIGINT[]', - 'ARRAY[2,5]::BIGINT[]' + 'ARRAY[5]::BIGINT[]', + 'ARRAY[6,7]::BIGINT[]' ]::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test(fn_name,params, subs); @@ -122,9 +131,9 @@ BEGIN END IF; PREPARE combinations AS - SELECT source, target FROM combinations_table WHERE target > 2; + SELECT source, target FROM combinations WHERE target NOT IN (5,6); PREPARE null_combinations AS - SELECT source, target FROM combinations_table WHERE source IN (-1); + SELECT source, target FROM combinations WHERE source IN (-1); RETURN QUERY SELECT isnt_empty('combinations', 'Should be not empty to tests be meaningful'); RETURN QUERY @@ -133,7 +142,7 @@ BEGIN params = ARRAY['$$edges$$', '$$combinations$$']::TEXT[]; subs = ARRAY[ 'NULL', - '$$(SELECT source, target FROM combinations_table WHERE source IN (-1))$$' + '$$(SELECT source, target FROM combinations WHERE source IN (-1))$$' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test(fn_name, params, subs); diff --git a/tools/testers/innerQuery.sql b/tools/testers/innerQuery.sql index 678d624d8a9..aec4ebfa35d 100644 --- a/tools/testers/innerQuery.sql +++ b/tools/testers/innerQuery.sql @@ -3,7 +3,7 @@ CREATE OR REPLACE FUNCTION test_anyInteger( begin_sql TEXT, rest_sql TEXT, params TEXT[], parameter TEXT, - tbl TEXT DEFAULT 'edge_table') + tbl TEXT DEFAULT 'edges') RETURNS SETOF TEXT AS $BODY$ DECLARE @@ -68,7 +68,7 @@ CREATE OR REPLACE FUNCTION test_anyNumerical( begin_sql TEXT, rest_sql TEXT, params TEXT[], parameter TEXT, -tbl TEXT DEFAULT 'edge_table') +tbl TEXT DEFAULT 'edges') RETURNS SETOF TEXT AS $BODY$ DECLARE diff --git a/tools/testers/innerQuery_old.sql b/tools/testers/innerQuery_old.sql index 51f52eabf10..b1ed6e46814 100644 --- a/tools/testers/innerQuery_old.sql +++ b/tools/testers/innerQuery_old.sql @@ -2,7 +2,7 @@ DROP TABLE IF EXISTS edge_table_old; SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost INTO edge_table_old -FROM edge_table; +FROM edges; CREATE OR REPLACE FUNCTION test_Integer(fn TEXT, rest_sql TEXT, params TEXT[], parameter TEXT) diff --git a/tools/testers/inner_styles.sql b/tools/testers/inner_styles.sql index 6ad3d74d76c..013c53e1d1e 100644 --- a/tools/testers/inner_styles.sql +++ b/tools/testers/inner_styles.sql @@ -46,11 +46,11 @@ $BODY$ BEGIN RETURN QUERY SELECT test_anyInteger(fn, rest_sql, ARRAY['source', 'target'], - 'source','combinations_table WHERE target NOT IN (1,2)'); + 'source','combinations WHERE target NOT IN (5,6)'); RETURN QUERY SELECT test_anyInteger(fn, rest_sql, ARRAY['source', 'target'], - 'target','combinations_table WHERE target NOT IN (1,2)'); + 'target','combinations WHERE target NOT IN (5,6)'); END; $BODY$ LANGUAGE plpgsql; @@ -265,8 +265,8 @@ RETURNS SETOF TEXT AS $BODY$ BEGIN -ALTER TABLE edge_table RENAME cost TO going; -ALTER TABLE edge_table RENAME reverse_cost TO coming; +ALTER TABLE edges RENAME cost TO going; +ALTER TABLE edges RENAME reverse_cost TO coming; --with reverse cost RETURN QUERY SELECT test_anyInteger(fn, rest_sql, @@ -300,8 +300,8 @@ RETURN QUERY SELECT test_anyNumerical(fn, rest_sql, ARRAY['id', 'source', 'target', 'going'], 'going'); -ALTER TABLE edge_table RENAME going TO cost; -ALTER TABLE edge_table RENAME coming TO reverse_cost; +ALTER TABLE edges RENAME going TO cost; +ALTER TABLE edges RENAME coming TO reverse_cost; END; $BODY$ diff --git a/tools/testers/no_crash_general.sql b/tools/testers/no_crash_general.sql index efd331413ca..6b45bb63c77 100644 --- a/tools/testers/no_crash_general.sql +++ b/tools/testers/no_crash_general.sql @@ -6,28 +6,28 @@ DECLARE params TEXT[]; subs TEXT[]; BEGIN - PREPARE edges AS - SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table; + PREPARE edges_q AS + SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges; PREPARE null_ret AS - SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1); + SELECT id FROM vertices WHERE id IN (-1); PREPARE null_ret_arr AS - SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1); + SELECT array_agg(id) FROM vertices WHERE id IN (-1); RETURN QUERY - SELECT isnt_empty('edges', 'Should be not empty to tests be meaningful'); + SELECT isnt_empty('edges_q', 'Should be not empty to tests be meaningful'); RETURN QUERY SELECT is_empty('null_ret', 'Should be empty to tests be meaningful'); RETURN QUERY SELECT set_eq('null_ret_arr', 'SELECT NULL::BIGINT[]', 'Should be empty to tests be meaningful'); -- one to one - params = ARRAY['$$edges$$','1::BIGINT', '2::BIGINT']::TEXT[]; + params = ARRAY['$$edges_q$$','5::BIGINT', '6::BIGINT']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test(fn_name, params, subs); @@ -40,11 +40,11 @@ BEGIN RETURN query SELECT * FROM no_crash_test(fn_name, params, subs); -- one to many - params = ARRAY['$$edges$$','1', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; + params = ARRAY['$$edges_q$$','5', 'ARRAY[6,7]::BIGINT[]']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT id FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test(fn_name, params, subs); @@ -57,11 +57,11 @@ BEGIN RETURN query SELECT * FROM no_crash_test(fn_name, params, subs); -- many to one - params = ARRAY['$$edges$$', 'ARRAY[2,5]::BIGINT[]', '1']::TEXT[]; + params = ARRAY['$$edges_q$$', 'ARRAY[6,7]::BIGINT[]', '5']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT id FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT id FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test(fn_name, params, subs); @@ -74,11 +74,11 @@ BEGIN RETURN query SELECT * FROM no_crash_test(fn_name, params, subs); -- many to many - params = ARRAY['$$edges$$','ARRAY[1]::BIGINT[]', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; + params = ARRAY['$$edges_q$$','ARRAY[5]::BIGINT[]', 'ARRAY[6,7]::BIGINT[]']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test(fn_name, params, subs); @@ -90,11 +90,11 @@ BEGIN RETURN query SELECT * FROM no_crash_test(fn_name, params, subs); -- many to many - params = ARRAY['$$edges$$','ARRAY[1]::BIGINT[]', 'ARRAY[2,5]::BIGINT[]']::TEXT[]; + params = ARRAY['$$edges_q$$','ARRAY[5]::BIGINT[]', 'ARRAY[6,7]::BIGINT[]']::TEXT[]; subs = ARRAY[ 'NULL', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))', - '(SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id IN (-1))' + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))', + '(SELECT array_agg(id) FROM vertices WHERE id IN (-1))' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test(fn_name, params, subs); @@ -112,23 +112,23 @@ BEGIN RETURN; END IF; - PREPARE combinations AS - SELECT source, target FROM combinations_table; + PREPARE combinations_q AS + SELECT source, target FROM combinations; PREPARE null_combinations AS - SELECT source, target FROM combinations_table WHERE source IN (-1); + SELECT source, target FROM combinations WHERE source IN (-1); RETURN QUERY - SELECT isnt_empty('combinations', 'Should be not empty to tests be meaningful'); + SELECT isnt_empty('combinations_q', 'Should be not empty to tests be meaningful'); RETURN QUERY SELECT is_empty('null_combinations', 'Should be empty to tests be meaningful'); -- Combinations SQL - params = ARRAY['$$edges$$', '$$combinations$$']::TEXT[]; + params = ARRAY['$$edges_q$$', '$$combinations_q$$']::TEXT[]; subs = ARRAY[ 'NULL', - '$$(SELECT source, target FROM combinations_table WHERE source IN (-1))$$' + '$$(SELECT source, target FROM combinations WHERE source IN (-1))$$' ]::TEXT[]; RETURN query SELECT * FROM no_crash_test(fn_name, params, subs); diff --git a/tools/testers/no_crash_test.sql b/tools/testers/no_crash_test.sql index 70902f85b32..f8a4c1ed6d1 100644 --- a/tools/testers/no_crash_test.sql +++ b/tools/testers/no_crash_test.sql @@ -28,15 +28,17 @@ BEGIN q1 := q1 || ')'; - -- RAISE WARNING '%', q1; + --RAISE WARNING '%', q1; - RETURN query SELECT * FROM lives_ok(q1, 'lives_ok' || q1); + RETURN query SELECT * FROM lives_ok(q1, 'lives_ok ' || q1); IF i = 0 THEN - RETURN query SELECT * FROM isnt_empty(q1, 'isnt_empty' || q1); + RETURN query SELECT * FROM isnt_empty(q1, 'isnt_empty ' || q1); ELSE IF func='pgr_alphashape' THEN RETURN query SELECT * FROM isnt_empty(q1, 'isnt_empty' || q1); + ELSIF func='pgr_maxFlow' OR func='pgr_maxFlowMinCost_Cost' THEN + RETURN query SELECT * FROM set_eq(q1, 'SELECT NULL::BIGINT', 'set_eq' || q1); ELSE RETURN query SELECT * FROM is_empty(q1, 'is_empty' || q1); END IF; diff --git a/tools/testers/sampledata.sql b/tools/testers/sampledata.sql index 4a4fb2c1114..231ae32e724 100644 --- a/tools/testers/sampledata.sql +++ b/tools/testers/sampledata.sql @@ -93,36 +93,16 @@ CREATE TABLE pointsOfInterest( edge_id BIGINT, side CHAR, fraction FLOAT, - geom geometry, - newPoint geometry); + geom geometry); /* -- p2 */ -INSERT INTO pointsOfInterest (geom) VALUES -(ST_POINT(1.8, 0.4)), -(ST_POINT(4.2, 2.4)), -(ST_POINT(2.6, 3.2)), -(ST_POINT(0.3, 1.8)), -(ST_POINT(2.9, 1.8)), -(ST_POINT(2.2, 1.7)); +INSERT INTO pointsOfInterest (edge_id, side, fraction, geom) VALUES +(1, 'l' , 0.4, ST_POINT(1.8, 0.4)), +(15, 'r' , 0.4, ST_POINT(4.2, 2.4)), +(12, 'l' , 0.6, ST_POINT(2.6, 3.2)), +(6, 'r' , 0.3, ST_POINT(0.3, 1.8)), +(5, 'l' , 0.8, ST_POINT(2.9, 1.8)), +(4, 'b' , 0.7, ST_POINT(2.2, 1.7)); /* -- p3 */ -UPDATE pointsOfInterest AS p SET - edge_id = q.edge_id, - side = q.side, - fraction = q.fraction, - newPoint = ST_endPoint(q.edge) -FROM (SELECT * FROM pgr_findCloseEdges( - $$SELECT id, geom FROM edges$$, - (SELECT array_agg(geom) FROM pointsOfInterest), - 0.5, partial => false)) AS q -WHERE p.geom = q.geom; -/* -- p4 */ -UPDATE pointsOfInterest SET side = 'b' -WHERE pid = 6; -/* -- p5 */ -SELECT pid, edge_id, side, fraction, - ST_AsText(geom), ST_AsText(newPoint) -FROM pointsOfInterest -ORDER BY pid; -/* -- p6 */ /* --POINTS CREATE end */ /* --COMBINATIONS CREATE start */ diff --git a/tools/testers/sampledata_pgtap.sql b/tools/testers/sampledata_pgtap.sql deleted file mode 100644 index 069c53c9327..00000000000 --- a/tools/testers/sampledata_pgtap.sql +++ /dev/null @@ -1,213 +0,0 @@ -SET client_min_messages = WARNING; - - ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- --- SAMPLE DATA ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- - -DROP TABLE IF EXISTS edge_table; -DROP TABLE IF EXISTS edge_table_vertices_pgr; -DROP table if exists pointsOfInterest; -DROP TABLE IF EXISTS old_restrictions; -DROP TABLE IF EXISTS restrictions; -DROP TABLE IF EXISTS retrict; -DROP TABLE IF EXISTS combinations_table; -DROP TABLE IF EXISTS vertex_table; -DROP TABLE IF EXISTS categories; -DROP TABLE IF EXISTS vehicles; -DROP TABLE IF EXISTS orders; - ---EDGE TABLE CREATE start -CREATE TABLE edge_table ( - id BIGSERIAL, - dir character varying, - source BIGINT, - target BIGINT, - cost FLOAT, - reverse_cost FLOAT, - capacity BIGINT, - reverse_capacity BIGINT, - category_id INTEGER, - reverse_category_id INTEGER, - x1 FLOAT, - y1 FLOAT, - x2 FLOAT, - y2 FLOAT, - the_geom geometry -); ---EDGE TABLE CREATE end ---EDGE TABLE ADD DATA start -INSERT INTO edge_table ( - category_id, reverse_category_id, - cost, reverse_cost, - capacity, reverse_capacity, - x1, y1, - x2, y2) VALUES -(3, 1, 1, 1, 80, 130, 2, 0, 2, 1), -(3, 2, -1, 1, -1, 100, 2, 1, 3, 1), -(2, 1, -1, 1, -1, 130, 3, 1, 4, 1), -(2, 4, 1, 1, 100, 50, 2, 1, 2, 2), -(1, 4, 1, -1, 130, -1, 3, 1, 3, 2), -(4, 2, 1, 1, 50, 100, 0, 2, 1, 2), -(4, 1, 1, 1, 50, 130, 1, 2, 2, 2), -(2, 1, 1, 1, 100, 130, 2, 2, 3, 2), -(1, 3, 1, 1, 130, 80, 3, 2, 4, 2), -(1, 4, 1, 1, 130, 50, 2, 2, 2, 3), -(1, 2, 1, -1, 130, -1, 3, 2, 3, 3), -(2, 3, 1, -1, 100, -1, 2, 3, 3, 3), -(2, 4, 1, -1, 100, -1, 3, 3, 4, 3), -(3, 1, 1, 1, 80, 130, 2, 3, 2, 4), -(3, 4, 1, 1, 80, 50, 4, 2, 4, 3), -(3, 3, 1, 1, 80, 80, 4, 1, 4, 2), -(1, 2, 1, 1, 130, 100, 0.5, 3.5, 1.999999999999,3.5), -(4, 1, 1, 1, 50, 130, 3.5, 2.3, 3.5,4); ---EDGE TABLE ADD DATA end - ---EDGE TABLE update geometry start - -UPDATE edge_table SET the_geom = st_makeline(st_point(x1,y1),st_point(x2,y2)), -dir = CASE WHEN (cost>0 AND reverse_cost>0) THEN 'B' -- both ways - WHEN (cost>0 AND reverse_cost<0) THEN 'FT' -- direction of the LINESSTRING - WHEN (cost<0 AND reverse_cost>0) THEN 'TF' -- reverse direction of the LINESTRING - ELSE '' END; -- unknown - ---EDGE TABLE update geometry end - ---EDGE TABLE TOPOLOGY start -SELECT pgr_createTopology('edge_table',0.001); ---EDGE TABLE TOPOLOGY end - ---POINTS CREATE start -CREATE TABLE pointsOfInterest( - pid BIGSERIAL, - x FLOAT, - y FLOAT, - edge_id BIGINT, - side CHAR, - fraction FLOAT, - the_geom geometry, - newPoint geometry -); - -INSERT INTO pointsOfInterest (x, y, edge_id, side, fraction) VALUES -(1.8, 0.4, 1, 'l', 0.4), -(4.2, 2.4, 15, 'r', 0.4), -(2.6, 3.2, 12, 'l', 0.6), -(0.3, 1.8, 6, 'r', 0.3), -(2.9, 1.8, 5, 'l', 0.8), -(2.2, 1.7, 4, 'b', 0.7); -UPDATE pointsOfInterest SET the_geom = st_makePoint(x,y); - -UPDATE pointsOfInterest - SET newPoint = ST_LineInterpolatePoint(e.the_geom, fraction) - FROM edge_table AS e WHERE edge_id = id; ---POINTS CREATE end - ---RESTRICTIONS OLD CREATE start -CREATE TABLE old_restrictions ( - rid BIGINT NOT NULL, - to_cost FLOAT, - target_id BIGINT, - via_path TEXT -); - -INSERT INTO old_restrictions (rid, to_cost, target_id, via_path) VALUES -(1, 100, 7, '4'), -(1, 100, 11, '8'), -(1, 100, 10, '7'), -(2, 4, 9, '5, 3'), -(3, 100, 9, '16'); ---RESTRICTIONS OLD CREATE end - ---RESTRICTIONS CREATE start -CREATE TABLE restrictions ( - id SERIAL PRIMARY KEY, - path BIGINT[], - cost FLOAT -); - -INSERT INTO restrictions (path, cost) VALUES -(ARRAY[4, 7], 100), -(ARRAY[8, 11], 100), -(ARRAY[7, 10], 100), -(ARRAY[3, 5, 9], 4), -(ARRAY[9, 16], 100); ---RESTRICTIONS CREATE end - - ---VEHICLES TABLE START - -CREATE TABLE vehicles ( - id BIGSERIAL PRIMARY KEY, - capacity FLOAT, - start_node_id BIGINT, - start_x FLOAT, - start_y FLOAT, - start_open FLOAT, - start_close FLOAT -); - -INSERT INTO vehicles -(start_node_id, start_x, start_y, start_open, start_close, capacity) VALUES -( 6, 3, 2, 0, 50, 50), -( 6, 3, 2, 0, 50, 50); - ---VEHICLES TABLE END - - - ---ORDERS TABLE START -CREATE TABLE orders ( - id BIGSERIAL PRIMARY KEY, - demand FLOAT, - -- the pickups - p_node_id BIGINT, - p_x FLOAT, - p_y FLOAT, - p_open FLOAT, - p_close FLOAT, - p_service FLOAT, - -- the deliveries - d_node_id BIGINT, - d_x FLOAT, - d_y FLOAT, - d_open FLOAT, - d_close FLOAT, - d_service FLOAT -); - - -INSERT INTO orders -(demand, - p_node_id, p_x, p_y, p_open, p_close, p_service, - d_node_id, d_x, d_y, d_open, d_close, d_service) VALUES -(10, - 3, 3, 1, 2, 10, 3, - 8, 1, 2, 6, 15, 3), -(20, - 9, 4, 2, 4, 15, 2, - 4, 4, 1, 6, 20, 3), -(30, - 5, 2, 2, 2, 10, 3, - 11, 3, 3, 3, 20, 3); - - ---ORDERS TABLE END - ---COMBINATIONS CREATE start -CREATE TABLE combinations_table ( - source BIGINT, - target BIGINT -); - -INSERT INTO combinations_table ( - source, target) VALUES -(1, 2), -(1, 3), -(2, 1), -(2, 4), -(2, 17); - ---COMBINATIONS CREATE end diff --git a/tools/testers/setup_db.sh b/tools/testers/setup_db.sh index 057f4685139..a40c97190b0 100755 --- a/tools/testers/setup_db.sh +++ b/tools/testers/setup_db.sh @@ -31,7 +31,8 @@ psql -p "$1" -U "$3" -d "$2" -X -q --set client_min_messages=WARNING --set ON_E -c "CREATE EXTENSION IF NOT EXISTS pgtap; CREATE EXTENSION IF NOT EXISTS pgrouting WITH VERSION '${4}' CASCADE;" psql -p "$1" -U "$3" -d "$2" -X -q --set client_min_messages=WARNING --set ON_ERROR_STOP=1 --pset pager=off \ - -f "${DIR}/sampledata_pgtap.sql" \ + -f "${DIR}/sampledata.sql" \ + -f "${DIR}/allpairs_tests.sql" \ -f "${DIR}/solomon_100_rc101.data.sql" \ -f "${DIR}/innerQuery.sql" \ -f "${DIR}/innerQuery_old.sql" \ @@ -39,11 +40,9 @@ psql -p "$1" -U "$3" -d "$2" -X -q --set client_min_messages=WARNING --set ON_E -f "${DIR}/old_inner_styles.sql" \ -f "${DIR}/no_crash_test.sql" \ -f "${DIR}/alphaShapeTester.sql" \ - -f "${DIR}/binaryBreadthFirstSearch_pgtap_data.sql" \ -f "${DIR}/general_pgtap_tests.sql" \ -f "${DIR}/no_crash_general.sql" \ -f "${DIR}/dijkstra_pgtap_tests.sql" \ - -f "${DIR}/tmp_net.sql" \ -f "${DIR}/flow_pgtap_tests.sql" \ -f "${DIR}/trsp_tests.sql" \ -f "${DIR}/tsp_pgtap_tests.sql" \ @@ -51,4 +50,5 @@ psql -p "$1" -U "$3" -d "$2" -X -q --set client_min_messages=WARNING --set ON_E -f "${DIR}/types_check.sql" \ -f "${DIR}/via_compare.sql" \ -f "${DIR}/compare_dijkstra.sql" \ + -f "${DIR}/contraction_tapfuncs.sql" \ -f "${DIR}/spanningtree.sql" diff --git a/tools/testers/tmp_net.sql b/tools/testers/tmp_net.sql deleted file mode 100644 index 0fd600ba85b..00000000000 --- a/tools/testers/tmp_net.sql +++ /dev/null @@ -1,21657 +0,0 @@ -DROP TABLE IF EXISTS tmp_net; - -CREATE TABLE tmp_net ( - id integer, - source integer, - target integer, - cost integer -); - - - --- --- Data for Name: tmp_net; Type: TABLE DATA; Schema: scratch; Owner: vicky --- - -COPY tmp_net (id, source, target, cost) FROM stdin; -296660 37013 78991 200 -296077 33800 22673 131 -139693 59487 22673 99 -234665 13455 19112 10 -93481 44276 19112 9 -225459 80609 62261 63 -165234 41023 62261 90 -186814 81211 11720 10 -169899 68151 11720 85 -365120 90011 69239 27 -18539 49569 69239 113 -342540 16971 54101 16 -16082 23113 54101 16 -352051 81294 24478 8 -221783 54101 24478 17 -378786 99805 17875 41 -28790 117720 17875 42 -309293 52 67862 720 -186139 77554 36976 132 -191096 100479 87397 186 -246083 87152 69632 113 -299134 56397 78771 91 -174072 1039 86485 133 -262234 66487 115066 137 -31780 38315 49877 4 -309799 3320 57554 165 -376814 72269 36093 6 -177517 18841 36093 40 -201170 43550 36947 10 -347326 101119 22510 10 -276342 28216 22510 170 -337417 34984 16406 82 -175664 9538 16406 11 -93799 45676 98141 164 -18882 53453 98141 88 -345617 81212 60616 140 -190938 99797 60616 102 -359019 90690 24849 125 -17772 41845 24849 136 -365372 92354 94489 57 -219348 35557 94489 21 -378372 96061 113914 17 -284898 88435 113914 21 -85572 106248 23463 29 -54447 51374 23463 26 -198002 23463 106248 29 -230954 108264 109291 16 -85183 102120 109291 33 -191679 103495 49495 224 -155128 67470 49495 128 -103909 19124 29524 45 -31276 31227 29524 47 -212644 116229 109111 35 -141932 74694 109111 50 -354239 112410 74694 80 -289019 109111 74694 50 -347783 112425 111777 113 -28464 113372 111777 82 -314620 28267 1365 8 -225104 78865 78489 53 -241977 61195 68783 7 -243001 68783 77027 7 -259245 42689 112328 7 -282637 76237 84504 63 -339469 86136 83319 91 -289515 113153 83319 102 -134660 28460 104491 14 -8328 16784 104491 16 -358328 80619 49491 9 -280679 61001 49491 11 -202212 52351 106996 123 -372336 99992 8261 87 -23574 25441 8261 113 -83177 70223 28371 136 -5317 62051 28371 135 -340574 97856 30912 10 -274336 17455 30912 14 -241731 59103 52475 58 -167372 52913 52475 42 -371847 94831 19466 10 -50408 7459 19466 34 -362729 32719 53776 9 -203051 58757 53776 9 -334240 98420 64204 8 -12446 60906 64204 7 -97775 69885 8903 102 -46313 40661 8903 104 -31183 30322 45800 86 -154801 65228 65915 130 -39449 42327 65915 132 -211317 106100 96033 28 -63495 40703 96033 79 -378034 92972 24415 9 -294193 22225 24415 44 -1610 22389 116152 15 -228770 96376 49569 111 -77370 33238 49569 127 -242288 63571 53519 45 -70079 93659 53519 49 -96344 60300 15189 107 -12598 62699 15189 107 -343836 35930 5144 11 -229802 101041 5144 11 -373444 9580 25661 9 -14601 6817 25661 9 -251497 116232 85895 45 -122678 44070 63436 91 -45452 29501 63436 89 -375839 47535 51447 9 -268706 100933 51447 7 -378993 102307 1915 134 -45280 27905 1915 134 -370099 61526 50696 9 -54806 55100 50696 8 -114008 93003 31134 85 -39645 44473 31134 25 -237956 31134 93003 85 -98250 72888 93003 175 -374805 26459 30222 6 -52388 28352 30222 16 -359039 90895 25442 55 -54525 52120 25442 42 -113450 81323 29169 101 -29044 8142 29169 89 -144494 113831 81645 23 -28016 90708 81645 55 -243809 74694 113372 48 -114580 103714 113372 58 -372179 98277 48080 9 -315991 37220 48080 9 -353867 102318 55498 17 -32912 49825 55498 18 -98933 84152 76171 32 -21683 1198 76171 8 -343941 37570 46158 88 -246021 86758 46158 9 -340547 97620 53854 47 -5008 58743 53854 49 -78051 39301 47231 9 -11296 48318 47231 9 -196044 13559 18606 7 -65900 53938 18606 7 -377086 80780 17491 8 -275131 21645 17491 10 -109091 49846 17289 104 -55452 61831 17289 105 -334493 100720 48383 6 -33686 58318 48383 23 -258131 34892 110296 107 -70092 93937 110296 27 -142935 96578 34835 86 -3960 46885 34835 67 -343670 33385 8283 9 -27210 66931 8283 44 -104572 22834 7008 257 -19148 56154 7008 111 -235591 17830 22834 196 -346892 96736 12549 11 -36495 9984 12549 10 -209372 95993 75427 9 -58239 10109 75427 9 -72423 2637 50171 178 -46362 41086 50171 96 -211442 107025 2637 88 -81693 59881 2637 91 -194142 2637 2319 88 -93374 43701 50625 73 -41004 59335 50625 73 -320801 73817 69594 49 -139453 58092 69594 39 -374760 25959 25312 159 -237450 27194 25312 100 -202466 54691 50176 178 -120255 29169 90895 102 -45910 35497 117238 46 -96340 60267 31417 163 -45053 25599 31417 168 -287921 101832 109109 31 -157428 101827 109109 34 -251030 112939 87989 28 -173656 115842 87989 10 -125913 62824 82815 80 -20794 89944 82815 110 -264276 80334 31565 8 -74347 17525 31565 8 -378008 92643 779 9 -195300 9452 779 8 -96457 60934 56901 105 -53330 40073 56901 104 -181201 40673 73216 102 -63966 43539 73216 78 -210772 102511 62497 124 -75837 25079 62497 249 -203523 62497 32862 174 -66583 58231 11252 44 -12788 65251 11252 44 -363256 43629 36116 7 -187682 85594 36116 7 -199695 33430 60074 9 -75857 25198 60074 8 -60385 22269 53272 154 -56768 106548 53272 153 -225097 78849 110123 95 -85549 106003 110123 96 -212761 117271 116695 111 -84321 85671 116695 74 -290942 4871 112334 26 -337027 28664 93363 92 -221790 54140 93363 64 -186228 78098 99103 8 -7294 117136 38042 9 -366024 98713 17322 11 -19612 61226 17322 54 -281398 66923 41984 47 -154692 64546 41984 19 -337954 49087 19292 68 -247444 92992 19292 8 -237804 29711 58066 76 -322343 82629 84222 11 -324162 91507 49350 108 -192664 110296 93937 27 -88416 15150 93937 64 -275662 24823 48311 63 -164590 37268 48311 123 -345066 67300 37268 117 -317372 48311 37268 123 -333436 90752 8036 10 -2815 34764 8036 10 -78496 41871 55414 102 -5117 60133 55414 102 -345731 82281 11532 9 -151 6378 11532 24 -63883 42971 68422 99 -19750 62707 68422 99 -329221 10100 53796 9 -190437 97701 53796 9 -289008 108988 117248 128 -143399 103941 117248 163 -290044 117248 112335 146 -320708 73020 93972 61 -335505 9145 23075 9 -229827 101083 23075 9 -156574 83375 17761 21 -52707 31183 17761 12 -293368 17761 83375 21 -70282 98466 83375 79 -187266 83375 98466 79 -108312 45374 98466 68 -89960 23398 52219 35 -13483 76478 52219 34 -365191 90616 24466 9 -11731 53089 24466 9 -141518 71783 20196 35 -41183 61374 20196 35 -331351 43669 9411 9 -288013 102373 9411 8 -2305 28860 66400 21 -122170 41213 68347 13 -7350 370 68347 11 -262489 68347 41213 13 -63965 43531 41213 31 -181265 41213 43531 31 -70531 102276 43531 29 -182830 53090 74082 31 -98386 73816 74082 40 -224415 74082 73816 40 -81642 59608 73816 29 -320818 73983 53296 18 -83753 73904 53296 61 -202307 53296 73904 61 -83775 74121 73904 96 -201448 46487 63765 136 -84891 96758 63765 129 -299933 63039 66127 239 -91295 30299 66127 223 -343940 37562 24962 20 -225253 79745 24962 9 -358502 82198 107401 68 -224368 73753 107401 35 -208949 94276 61607 7 -93781 45585 61607 18 -222777 61607 45585 18 -67697 65124 45585 20 -308024 108912 95601 17 -135093 30909 95601 11 -286537 95601 30909 11 -152103 47704 30909 29 -295638 30909 47704 29 -107855 42926 47704 32 -257099 28171 43332 48 -199056 29050 60875 27 -156005 73583 60875 20 -299678 60875 73583 20 -94961 52222 73583 22 -224339 73583 52222 22 -81631 59550 52222 21 -209049 94671 63389 30 -85195 102261 63389 25 -183178 55991 52709 64 -60005 20303 52709 1 -257364 30282 98528 76 -147479 20322 98528 63 -193685 117315 84077 7 -226160 84077 85636 8 -365527 93978 18053 69 -37679 22510 18053 70 -149339 30377 17600 49 -17705 41082 17600 48 -340947 101453 15807 71 -305404 94899 15807 7 -334212 98134 11747 7 -271338 1412 11747 99 -139708 59621 25514 49 -3616 44125 25514 47 -78444 41610 12750 50 -54815 55155 12750 49 -208704 93227 58325 9 -59421 16855 58325 10 -68801 72713 9719 49 -34027 62023 9719 49 -188648 89965 37900 10 -358390 81170 12788 9 -292295 12252 12788 8 -93811 45730 37978 45 -32992 50430 37978 44 -228541 95567 24535 11 -138637 53015 24535 12 -123691 49941 19532 45 -54440 51317 19532 45 -366094 99493 67912 10 -295163 27389 67912 9 -190314 97067 73140 52 -77812 37399 73140 40 -340108 93273 60810 12 -180681 37174 60810 25 -152969 53276 20624 20 -8751 20770 20624 21 -316511 40797 60749 268 -172213 102045 60749 242 -311757 13876 58215 5 -157458 102108 58215 37 -299397 58215 102108 37 -82255 63389 102108 46 -177947 21092 40132 81 -127505 73635 40132 53 -258908 40132 73635 53 -157392 101239 73635 60 -301326 73635 101239 60 -154463 62976 64547 124 -306779 101100 43629 7 -134640 28396 43629 27 -290055 117314 96522 85 -191167 100740 3749 7 -219566 36769 55662 145 -77256 32358 55662 145 -194237 3197 49446 113 -102110 8261 49446 113 -249108 100387 25441 76 -154913 65900 25441 113 -93138 42341 73538 98 -56761 106276 73538 219 -224327 73538 42341 98 -121054 34580 42341 38 -259204 42341 34580 38 -155616 70958 34580 82 -215465 14566 23113 37 -111082 61586 23113 9 -147897 22556 30201 89 -53325 40043 30201 88 -335183 59 46820 9 -266349 90311 46820 8 -262863 71027 34286 4 -180683 37189 595 159 -371665 93182 51917 8 -302717 81786 51917 49 -123451 48383 28204 47 -47243 50694 28204 47 -257103 28204 58318 65 -62992 37997 58318 24 -347735 111214 82623 12 -56578 89202 82623 11 -87921 11949 17867 41 -41556 66237 17867 39 -370788 81254 13247 10 -238354 33685 13247 13 -68825 72790 49678 40 -48381 64431 49678 43 -334051 96492 29579 10 -194300 3594 29579 12 -285491 90975 66066 34 -172004 98513 66066 34 -319749 66066 98513 34 -154947 66127 98513 234 -56833 109629 110130 78 -57297 116213 112882 38 -374013 16954 26121 96 -276892 32396 26121 73 -373952 16324 38821 216 -56016 69845 38821 176 -282317 74051 37581 13 -138578 52634 37581 20 -277792 37581 52634 20 -121601 38362 52634 18 -260420 52634 38362 18 -114393 101284 38362 16 -306985 102230 64962 33 -67512 63835 64962 41 -184343 64962 63835 41 -83721 73633 63835 35 -203695 63835 73633 35 -260728 54877 22522 55 -68944 73624 22522 46 -178199 22522 73624 46 -98362 73590 73624 82 -224345 73624 73590 82 -65600 52243 73590 108 -360233 104057 28374 9 -48424 65067 28374 9 -77119 31677 10140 9 -11639 52040 10140 32 -208774 93494 72578 65 -142209 80072 72578 85 -337339 34038 30885 9 -296510 36140 30885 54 -168215 57629 50300 59 -53915 45980 50300 59 -317793 51114 108950 27 -112975 73600 108950 30 -67035 60924 23536 113 -18994 54704 23536 129 -340950 101478 27492 145 -26373 57023 27492 40 -198839 27492 12983 84 -29029 7844 55024 14 -25417 46372 73020 16 -96804 62962 62204 66 -38020 25922 62204 80 -231602 112948 106085 59 -85496 105531 106085 80 -183464 58067 53974 21 -111675 65044 53974 44 -241108 53974 65044 44 -127742 75828 65044 42 -262648 69347 90467 28 -68958 73739 90467 20 -337160 31565 9452 7 -189469 93420 9452 8 -379049 102897 17525 8 -7354 779 17525 9 -75502 23280 19805 34 -51803 22917 19805 34 -363313 45580 21645 9 -210308 100068 21645 10 -336512 22081 71077 8 -188987 91310 71077 8 -143186 101541 113936 78 -57198 114820 113936 91 -360306 105949 101541 80 -289617 113936 101541 78 -274589 18830 59486 73 -125053 57766 70870 240 -49817 113339 111214 10 -171250 82425 62962 36 -18436 48384 62962 50 -301526 75221 76451 9 -172071 99797 76451 21 -321168 76451 99797 21 -62458 33352 99797 38 -346713 95335 6253 128 -35458 110052 6253 48 -213841 6253 75439 79 -98913 83755 75439 36 -224604 75439 83755 36 -157068 94393 83755 21 -367472 12603 36793 9 -208668 93021 36793 8 -336753 25235 37400 8 -283490 81592 37400 7 -352161 82214 24102 8 -11881 54941 24102 8 -346132 89706 28726 22 -18018 44597 28726 22 -152915 52946 31332 33 -21377 114471 31332 24 -295670 31332 52946 33 -171891 96396 52946 45 -318050 52946 96396 45 -98653 76477 96396 38 -348588 13084 6970 7 -227190 89675 6970 6 -347010 97895 6845 7 -22472 14463 6845 7 -149629 32043 9270 90 -17948 43909 9270 89 -63989 43656 21249 131 -40028 48309 21249 130 -343520 31063 20415 48 -189357 92934 20415 8 -365460 93258 26377 10 -19501 59952 26377 9 -259305 43373 98195 170 -68257 69331 98195 138 -357991 70870 72630 187 -214830 11835 72630 173 -306828 101327 39734 26 -67616 64513 39734 48 -181077 39734 64513 48 -111237 62390 64513 212 -242414 64513 62390 212 -242826 67635 96481 179 -104452 22268 96481 106 -237609 28122 5132 63 -95764 56760 5132 75 -76492 28695 47504 73 -49920 114434 47504 75 -346109 89476 95247 12 -49316 94551 95247 44 -301739 76746 100341 131 -148946 28275 100341 76 -188602 89759 49129 12 -372324 99849 33179 8 -204662 71077 33179 8 -106187 31286 60073 105 -47415 52466 60073 105 -239012 37803 9145 9 -75728 24466 9145 9 -345384 75349 53089 9 -197932 23075 53089 9 -97817 70144 27601 12 -46247 39997 27601 55 -218038 27601 70144 12 -141831 73718 70144 18 -281849 70144 73718 18 -138622 52917 73718 13 -282274 73718 52917 13 -170771 73836 52917 9 -211398 106693 73589 40 -142883 95444 73589 28 -282264 73589 95444 28 -87903 11880 95444 82 -203190 59894 100638 47 -90877 28196 100638 11 -229718 100638 28196 11 -165518 42608 28196 30 -263200 73662 82847 37 -115504 112497 82847 79 -102361 10126 6686 34 -4540 53238 6686 35 -165899 44653 17712 108 -3374 41397 17712 74 -294547 24482 24208 54 -67903 66778 24208 10 -351984 80596 49702 9 -37119 16849 49702 8 -344135 41891 19016 90 -22120 10317 19016 90 -148347 24980 36584 8 -16985 31527 36584 8 -186662 80547 20314 12 -122547 43380 20314 38 -255588 20314 43380 38 -171811 94476 43380 119 -287529 100066 35930 11 -90422 25661 35930 9 -330842 32851 6817 9 -213629 5144 6817 11 -156893 91075 72552 77 -5438 63564 72552 40 -301183 72552 91075 77 -93685 45160 91075 48 -355585 19166 42509 64 -227348 90448 42509 13 -167135 51549 99966 89 -156511 82018 58170 58 -48392 64585 58170 25 -299390 58170 82018 58 -142023 75505 82018 42 -287387 99469 16508 9 -67809 66107 16508 10 -318958 60419 59730 37 -122517 43207 59730 10 -318387 55962 26838 9 -110062 55768 26838 12 -341168 106085 117264 151 -49951 114704 117264 145 -290765 3572 93121 56 -245303 82847 45267 39 -167347 52788 45267 33 -317016 45267 52788 33 -129400 106365 52788 32 -260442 52788 106365 32 -157464 102174 106365 26 -79915 49643 31539 57 -5813 69020 31539 56 -170254 70665 100118 30 -316793 43131 52533 8 -138634 53006 52533 17 -241195 54646 43357 46 -165673 43526 43357 40 -316819 43357 43526 40 -167505 53677 43526 43 -316842 43526 53677 43 -171657 91420 53677 34 -318141 53677 91420 34 -58932 14247 91420 10 -278745 45455 64619 30 -127743 75830 64619 38 -340848 100456 97463 31 -223229 65069 97463 25 -258266 35800 29114 4 -155828 72351 29114 8 -307592 106059 28070 19 -129011 102256 28070 17 -261546 61388 60580 8 -126751 68975 60580 6 -337078 29742 33854 2 -267438 95309 33854 3 -170778 73941 54702 111 -11832 54447 54702 41 -318261 54702 73941 111 -156072 74125 73941 106 -325651 97583 8440 10 -79249 45739 8440 9 -339796 90372 21102 9 -198921 28113 21102 10 -229890 101411 45073 23 -97454 67452 45073 37 -269548 106305 96102 32 -166366 47044 96102 32 -191806 104285 47711 8 -156275 76451 47711 10 -363372 46987 60982 10 -270585 114020 60982 51 -130080 112827 88619 12 -35135 86593 88619 13 -265812 87961 111808 43 -93346 43529 111808 66 -231430 111808 43529 66 -110047 55684 43529 31 -239184 38782 38203 9 -80448 52679 18581 103 -19437 59279 18581 101 -107524 40774 21666 96 -33335 54314 21666 97 -357180 48985 49434 13 -249385 101609 49434 14 -369618 48393 55958 7 -260022 49434 55958 12 -344592 53976 73430 257 -49736 112259 73430 67 -368846 32358 108834 148 -221904 55012 108834 147 -138571 52578 53167 14 -279698 53167 52578 14 -99442 94927 52578 52 -350628 45706 94927 101 -221604 52578 94927 52 -221068 48616 49642 103 -68969 73839 40270 61 -41486 64987 40270 114 -181146 40270 73839 61 -68967 73807 73839 92 -358412 81374 14618 9 -236901 24732 14618 8 -82150 62705 52367 133 -31621 35998 52367 132 -375716 43766 14569 10 -189531 93729 14569 8 -119295 23928 29479 66 -3472 42439 29479 65 -345016 65324 15188 67 -19462 59563 15188 46 -194946 7483 60078 234 -96045 58560 60078 164 -346386 92174 24820 10 -228626 95836 24820 20 -169314 64001 16693 174 -54569 52588 16693 175 -351127 57487 33685 18 -323923 90574 33685 13 -216885 21385 16110 171 -60646 23594 16110 85 -352553 89423 23594 50 -182547 50962 23594 132 -78948 44189 7454 19 -27586 71589 7454 10 -257116 28287 20484 148 -132494 16324 20484 126 -279115 48574 16954 156 -164816 38821 16954 183 -365295 91649 69845 47 -314206 26121 69845 89 -279460 51029 79966 44 -106175 31230 79966 27 -98578 75439 95335 119 -256957 27499 24472 51 -120672 31591 24472 9 -264535 81351 57329 30 -90986 28722 57329 30 -222225 57329 24587 107 -370407 70313 28106 59 -244844 80840 28106 9 -171788 94069 65252 221 -35456 110048 65252 152 -183888 61323 54942 105 -330162 22183 61323 122 -10566 41127 61323 109 -136951 43397 70665 47 -53007 35839 70665 24 -281906 70665 43397 47 -92392 38098 43397 43 -220428 43397 38098 43 -78801 43498 38098 22 -200503 38098 43498 22 -158133 108821 43498 19 -297603 43498 108821 19 -136115 38557 108821 12 -288986 108821 38557 12 -103900 19082 38557 27 -312858 19149 39859 62 -201163 43485 41127 99 -146954 17368 41127 60 -259264 42960 7483 226 -77523 34928 7483 100 -127055 70850 41291 63 -32986 50364 41291 10 -265657 87233 70850 62 -99448 94986 70850 65 -143622 105979 115717 170 -361814 19306 80768 95 -271600 2896 80768 158 -301227 72805 11277 7 -89558 21116 11277 8 -120317 29549 48366 40 -53930 46065 48366 43 -267836 97169 16490 11 -109874 54612 16490 8 -371778 94123 56291 9 -233700 8426 56291 12 -96164 59242 56849 43 -55828 67162 56849 43 -225920 82595 10100 10 -57922 8036 10100 10 -201856 49569 33238 127 -169111 62886 33238 40 -89665 21760 19493 54 -5547 64910 19493 54 -215804 16158 69512 11 -139043 55585 69512 47 -358115 74593 20068 12 -287031 97781 20068 53 -140556 64833 36070 64 -31863 39260 36070 65 -287588 100296 23157 8 -72673 6529 23157 7 -377708 90103 33791 9 -198772 27227 33791 10 -229720 100654 28664 93 -82180 62853 28664 62 -208740 93363 40084 87 -143122 100427 40084 75 -117636 14769 39669 90 -13294 72332 39669 44 -291031 5379 7645 29 -84873 96469 7645 31 -194976 7645 96469 31 -162252 23044 96469 26 -341639 3440 3496 10 -325340 96383 3496 8 -285474 90884 26021 7 -75779 24789 26021 8 -18468 48697 60267 149 -100466 108834 55012 147 -19095 55662 55012 144 -127297 72331 61622 30 -33243 53224 61622 29 -144762 116103 19312 34 -38721 32332 19312 35 -343719 33918 21656 10 -325903 98578 21656 9 -190125 96278 16839 68 -119202 23509 16839 10 -360078 101254 27341 36 -264178 79852 27341 35 -223016 63193 94621 18 -138163 50336 94621 14 -249486 102144 73606 15 -126390 66081 73606 20 -319564 64666 63193 34 -99427 94621 63193 18 -137447 45987 16618 6 -47318 51561 16618 53 -365589 94621 11641 27 -285377 90511 11641 22 -174415 2739 111229 102 -144667 115279 111229 108 -214550 10322 91464 138 -138821 54251 91464 98 -181308 41588 43552 35 -84909 97132 43552 49 -201171 43552 97132 49 -112711 72023 97132 30 -247655 93913 55087 5 -120979 33615 55087 5 -341289 110123 117271 95 -35783 114125 117271 70 -63901 43051 16918 132 -22644 16176 16918 130 -329637 15667 11125 9 -189594 94023 11125 8 -328857 1581 15108 8 -175079 6492 15108 5 -338228 55662 60924 147 -180521 36155 60924 63 -372790 108834 32358 148 -203327 60924 32358 62 -141848 73826 69756 32 -40391 52157 69756 17 -242565 65650 39056 9 -88134 13468 39056 23 -333470 91112 19329 14 -215380 14292 19329 15 -324480 92916 36936 16 -134230 26195 36936 5 -282320 74076 74134 14 -113016 73958 74134 13 -243689 74134 73958 13 -129033 102691 73958 81 -263236 73958 102691 81 -121669 38760 102691 80 -353746 100799 92526 44 -322404 82947 92526 81 -355096 13341 69947 9 -25655 48815 69947 7 -210444 100727 50704 214 -174312 2208 101453 140 -94203 47807 46937 107 -3313 40686 46937 107 -126870 69871 43651 105 -46947 47260 43651 104 -68814 72759 32651 137 -54208 48825 32651 139 -128873 99948 44151 93 -20306 70673 44151 19 -364306 74233 97487 84 -77847 37769 73134 8 -204946 73134 37769 8 -62940 37674 37769 21 -360068 101110 91567 71 -290435 1754 70061 11 -168676 60135 70061 11 -376095 52596 39110 149 -261648 62135 39110 37 -176308 12926 14979 7 -162928 26653 14979 9 -339445 85851 9570 5 -280764 61766 9570 6 -239075 38138 53386 57 -113931 91518 53386 37 -241051 53386 91518 37 -123990 51436 91518 25 -109671 53402 32306 57 -18252 46635 32306 79 -318799 58962 52429 79 -125260 59027 52429 91 -301365 73944 53892 14 -151328 43551 53892 22 -375818 46826 16056 7 -8010 13374 16056 27 -374345 20625 18448 166 -52929 34891 18448 165 -312712 18448 37572 196 -334344 99313 94085 46 -233977 9878 94085 50 -237006 25188 70814 41 -99585 97503 70814 40 -223994 70814 97503 40 -366274 101150 64544 12 -50430 7723 64544 22 -339793 90326 9992 165 -41029 59628 9992 169 -357649 61549 32611 60 -12497 61469 32611 11 -330308 24158 27804 140 -10818 43843 27804 143 -107139 38688 45907 10 -2387 29571 45907 49 -246935 90914 5575 67 -124226 52697 5575 65 -280762 61746 101051 50 -89919 23160 101051 49 -304574 91198 21923 7 -82375 64204 21923 8 -343595 32660 60906 7 -195023 7865 60906 6 -163800 31037 38710 42 -18174 45892 38710 41 -364676 82462 54941 7 -200404 37400 54941 8 -41549 66066 45031 46 -20487 72630 40032 112 -331160 38494 27290 195 -288824 107770 27290 195 -179139 27290 66978 279 -150803 40759 66978 92 -261916 64097 3489 119 -280932 63174 64722 82 -222600 60208 80713 49 -151553 44828 80713 35 -306304 98874 59813 6 -78779 43359 59813 7 -315762 36060 71018 80 -58604 12168 71018 115 -331127 37544 29321 5 -4128 48461 29321 40 -243629 73531 39034 49 -169447 64884 39034 78 -316287 39034 64884 78 -99866 102240 64884 97 -223214 64884 102240 97 -164636 37562 102240 74 -282548 75666 88000 63 -28342 111745 116723 72 -184831 68173 4167 60 -186106 77313 84966 220 -252079 2121 68870 66 -2849 35164 2486 60 -309658 2486 77085 81 -95770 56806 63207 22 -223019 63207 56806 22 -153435 56289 56806 41 -299187 56806 56289 41 -140286 63247 56289 26 -280102 56289 63247 26 -153886 59421 63247 7 -299959 63247 59421 7 -66819 59714 59421 26 -183665 59421 59714 26 -98463 74498 59714 47 -222548 59714 74498 47 -139534 58579 74498 36 -379226 107702 82417 96 -187514 84912 82417 111 -271853 4533 85907 237 -106865 36609 85907 168 -207181 86506 23575 459 -152183 48130 23575 31 -341219 107520 10719 55 -304615 91317 10719 88 -379345 111507 84950 125 -243728 74261 84950 389 -73247 10993 25170 80 -7718 9911 25170 51 -197528 20868 10993 68 -128550 93679 10993 53 -335288 4769 93679 6 -253652 10993 93679 53 -284552 86610 104555 56 -172776 107908 104555 31 -269716 107471 4748 43 -117076 11239 4748 12 -116238 4444 109593 49 -110107 56000 64987 144 -42213 76183 64987 130 -221828 54411 267 41 -329714 16403 20015 10 -36158 3573 20015 41 -338361 58700 35457 112 -323284 87506 35457 83 -341509 116790 113966 169 -309473 1455 113966 153 -371087 86619 6098 68 -193681 117288 6098 106 -246550 89260 113963 109 -84044 77752 113963 113 -289066 109476 109475 98 -113826 89439 109475 113 -228943 97126 87117 76 -379298 109685 7646 12 -302974 83045 7646 11 -99555 96959 7502 46 -16266 24820 7502 42 -75917 25478 17766 138 -56072 70524 17766 130 -335524 9330 107694 45 -307840 107699 107694 34 -376921 75255 25354 10 -47044 48232 25354 10 -140694 65888 19451 66 -55469 62041 19451 67 -348274 8312 28594 11 -283268 80412 28594 12 -230577 105870 8684 100 -142560 88373 8684 8 -345959 87440 105870 156 -210614 101572 105870 155 -272575 8684 105142 43 -101829 5867 105142 71 -249975 105142 105872 80 -172846 108649 105872 164 -327202 105872 108649 164 -172796 108135 108649 148 -12606 62770 4238 47 -213495 4238 68603 91 -204342 68603 2984 55 -252215 2984 79507 44 -186446 79507 3450 50 -271688 3450 66823 71 -223438 66823 101117 146 -350849 50390 13229 8 -209486 96489 13229 9 -123961 51222 39301 9 -8515 18606 39301 7 -267313 94790 57151 69 -138484 52132 57151 70 -324880 94559 24120 7 -142084 76465 24120 14 -12578 62497 67267 151 -367583 14168 95312 8 -180993 39251 95312 9 -224700 76171 84152 32 -143100 99732 84152 64 -225117 78912 92810 91 -40204 50460 49189 10 -192756 110930 99002 28 -164067 32700 99002 21 -186247 78230 85904 40 -322715 84966 112380 263 -261023 57284 87417 297 -320280 69933 104551 47 -263788 77535 78780 361 -299459 58874 98948 54 -149395 30643 98948 52 -305436 95128 66386 8 -138214 50625 66386 73 -210869 102974 30363 16 -168878 61222 30363 6 -326180 99806 3057 9 -68787 72612 3057 9 -378772 99658 49120 10 -174498 3057 49120 9 -127739 75764 39804 117 -32199 42442 39804 72 -334584 101626 72060 137 -25037 42513 72060 137 -363531 50688 164 9 -3534 43217 164 9 -262733 69978 84015 57 -92190 36460 84015 16 -252718 5880 83944 61 -205518 77371 67871 112 -232872 3574 78583 213 -309386 729 69069 240 -309760 3143 2906 132 -184883 68553 78584 92 -186521 79877 37189 171 -262716 69904 2545 40 -251829 595 783 143 -205517 77370 4177 188 -225197 79417 79925 168 -205682 78300 3363 219 -265946 88541 117278 12 -251870 847 78585 198 -244480 79131 784 111 -296659 37012 69071 49 -282973 78585 68872 92 -186329 78771 68873 85 -363674 54810 56493 7 -282315 74043 73910 134 -84760 94578 73910 132 -226457 85824 112905 6 -308605 112905 78559 5 -243963 75759 90680 5 -194014 1824 1956 43 -290309 1030 36233 183 -200061 35309 88626 135 -7995 13166 1639 21 -271380 1639 83879 56 -194372 4038 68570 57 -19730 62472 68234 36 -209459 96405 58442 80 -276493 29179 2076 12 -203930 65728 49238 15 -300816 69659 4179 57 -309829 3451 65509 62 -309770 3189 3451 55 -184421 65509 1749 71 -194003 1749 3364 234 -262436 67893 4180 173 -301878 77528 4181 108 -232782 3076 77528 169 -321706 79864 12 341 -212841 12 603 320 -205980 79998 68191 306 -320025 68191 2723 72 -281346 66511 73588 152 -126431 66428 73588 29 -5020 58911 113406 17 -254368 14357 63866 7 -204373 68828 440 46 -271959 5105 83304 30 -171943 97368 83304 29 -261137 57980 77612 114 -77848 37775 39997 102 -45247 27601 39997 55 -359620 96898 18801 7 -309701 2728 18801 8 -357175 48913 39679 71 -32820 48681 39679 69 -318055 52980 13 26 -232258 13 686 15 -10546 40981 3493 39 -194057 2159 56285 57 -271275 996 77685 68 -301679 76233 82456 46 -60730 24035 82456 76 -373607 12094 24035 147 -187092 82456 24035 76 -313823 24315 76047 58 -99628 98264 76047 93 -226475 85915 69433 107 -265487 86485 111831 386 -283870 83309 87422 163 -173624 115292 87422 28 -19080 55547 54205 9 -2259 28406 75852 55 -263908 78312 77202 24 -283969 83910 15945 20 -247223 92131 10731 7 -179213 27804 12609 82 -203305 60745 93595 69 -55444 61763 13341 9 -282593 75981 83821 78 -245594 84722 84849 46 -157062 94301 84849 64 -194074 2258 84082 24 -69542 83234 84082 10 -187389 84082 83234 10 -86945 4703 83234 32 -276487 29128 63748 92 -157441 101914 63748 71 -340720 99234 32365 11 -21793 5541 32365 15 -12609 62793 54966 52 -231662 113476 2864 15 -6286 75381 46294 65 -310720 8555 84295 24 -340527 97422 98613 14 -185588 73984 98613 18 -245548 84464 88316 48 -232065 116277 84367 7 -265120 84510 62178 107 -302133 79036 15 305 -339093 80164 65193 12 -223927 70342 65193 81 -346709 95271 246 11 -283463 81420 246 10 -294748 25498 261 10 -54810 55111 100514 133 -228993 97322 38166 11 -49045 73628 115730 33 -28157 105071 1330 46 -249777 103734 65955 25 -70463 101781 65955 43 -245889 86113 75319 6 -136908 43186 75319 5 -47352 51917 279 46 -38390 29379 39274 11 -27957 84950 105874 142 -322709 84950 86506 551 -77487 34756 86506 460 -198408 25478 75749 77 -145370 6588 75749 122 -183047 55081 16046 105 -19036 55044 69024 9 -130769 2391 20041 105 -32401 44626 20041 57 -290941 4848 90678 53 -309506 1626 52225 12 -167280 52320 52225 12 -325040 95156 31114 17 -124439 54014 31114 21 -257454 31114 54014 21 -142904 95876 54014 17 -279822 54014 95876 17 -110963 60866 95876 10 -328652 116464 103317 114 -101220 115301 103317 164 -234090 10544 101169 69 -314515 27539 10804 149 -41890 70999 49784 12 -157354 100358 56760 38 -15537 18049 56760 62 -367538 13553 21297 11 -267427 95282 21297 12 -31647 36313 21875 70 -303185 84675 90690 41 -337753 43647 51124 77 -219116 34288 51124 66 -369902 55994 71464 30 -202063 51124 71464 75 -334476 100614 13150 39 -299007 55418 13150 38 -346545 93778 54202 11 -43982 14694 54202 12 -103903 19102 28122 59 -19363 58585 28122 17 -67857 66405 19102 95 -21763 5132 19102 103 -352635 90250 44587 14 -31617 35981 44587 59 -68785 72590 47683 44 -32665 47085 47683 45 -337712 41963 15763 8 -190310 97051 15763 10 -56994 112258 39063 89 -357802 65390 26488 9 -45327 28286 26488 8 -340728 99383 14589 10 -47074 48564 14589 10 -333832 94470 33960 9 -10102 33960 93120 91 -136907 43183 70490 67 -31175 30279 70490 44 -281889 70490 43183 67 -128858 99763 43183 48 -263983 78710 66468 66 -180524 36181 80004 262 -189297 92604 5131 35 -96693 62359 5131 35 -229383 99010 19322 7 -90525 26258 19322 7 -221471 51598 11341 7 -141826 73700 11341 7 -366070 99204 54964 8 -221085 48682 54964 8 -116937 10134 39298 44 -39676 44730 39298 45 -363041 37608 19772 62 -264199 79945 19772 8 -223203 64749 58275 50 -142738 92248 57629 31 -51908 23981 57629 88 -243691 74147 73978 29 -84112 80866 73978 36 -367527 13319 32829 58 -43882 13577 113415 27 -224387 73943 53613 12 -124440 54026 53613 9 -370113 61910 19927 13 -39575 43919 19927 13 -13972 112246 75854 12 -223676 68473 1727 81 -271401 1727 96070 49 -232556 1795 4106 61 -205772 78779 478 132 -185603 74140 74126 27 -124257 52859 74126 19 -72218 116635 70254 163 -11241 47816 70254 165 -363843 59979 17455 17 -188803 90535 17455 15 -16567 27623 37570 97 -229386 99024 62487 87 -241617 58136 53169 9 -106034 30687 53169 10 -128141 84929 4444 37 -29088 8672 4444 86 -368876 32717 22984 32 -43168 309 8548 40 -315641 35133 109353 579 -284123 84854 83441 28 -334945 111903 117288 115 -28559 114690 117288 106 -177697 19709 115137 124 -173461 113936 115137 89 -261208 58618 64721 40 -211426 106856 98252 226 -151277 43238 73953 19 -333068 86599 76997 82 -199954 34544 76997 83 -260025 49463 74190 9 -267031 93528 38487 26 -296908 38487 82778 9 -319677 65556 67661 29 -70496 102030 67661 24 -184757 67661 102030 24 -125731 61735 102030 10 -280894 62849 106527 27 -96594 61707 106527 20 -230663 106527 61707 20 -125774 62013 61707 38 -245233 82529 80105 70 -308945 115412 86201 15 -239493 40935 73893 36 -282294 73893 4185 9 -326036 99112 3855 241 -107995 43926 44362 92 -21192 112294 44362 90 -262535 68618 1428 44 -320853 74260 49075 9 -363876 61005 24693 10 -239585 41752 24693 9 -203224 60111 75211 13 -125444 60160 75211 16 -349211 20714 17741 10 -264608 81637 17741 11 -287858 101434 20300 18 -260000 49238 1232 63 -320811 73902 53138 15 -127517 73796 53138 20 -260495 53138 73796 20 -141883 74118 73796 21 -340583 97899 54613 9 -275868 25753 54613 11 -182459 50373 29571 49 -149756 32923 29571 72 -244655 80026 70342 147 -332931 84010 8189 35 -293475 18289 8189 51 -3841 45907 1195 46 -257418 30813 1660 9 -247069 91554 16971 7 -90169 24478 16971 8 -184951 69024 25700 11 -96506 61216 25700 10 -233666 8221 105684 109 -114524 103115 105684 128 -179115 27189 17593 218 -122771 44587 17593 61 -35544 111568 104567 15 -35663 112825 115736 13 -209182 95212 26116 7 -147526 20608 26116 9 -34926 74025 77684 94 -311295 11834 55885 10 -169662 66461 18943 11 -1966 25700 18943 12 -322306 82472 12002 54 -100671 110914 12002 107 -332417 71824 26037 13 -285912 92872 26037 11 -370876 82078 22773 8 -30018 19417 22773 9 -77606 35541 11365 38 -47958 59325 11365 38 -154855 65574 24559 108 -12700 64088 24559 109 -163628 30165 39682 124 -19535 60346 39682 125 -64135 44289 21791 49 -51858 23530 21791 49 -240572 49638 110161 8 -320266 69878 87711 48 -302006 78306 115737 15 -329935 19102 100358 66 -299179 56760 100358 38 -282671 76503 84505 21 -128082 83699 84505 17 -265119 84505 83699 17 -142346 83167 83699 29 -283935 83699 83167 29 -172136 101028 83167 37 -306622 100341 49154 142 -187048 82272 12087 9 -159621 6865 12087 10 -324328 92283 60240 67 -345954 87356 32285 12 -237690 28594 32285 12 -120426 30206 23186 72 -19074 55484 23186 71 -193929 1201 4530 134 -142305 82287 4530 96 -63566 41223 10155 29 -30741 26118 10155 14 -318272 54847 1259 98 -98970 84915 1259 96 -290745 3439 85397 38 -271228 585 85644 70 -243965 75776 95768 29 -224894 77463 6241 55 -235173 15802 116207 27 -341749 6376 116213 41 -322933 85895 116213 39 -350630 45783 109619 85 -270592 114054 109619 57 -368455 25441 113422 113 -28603 115239 113422 114 -376547 64669 65900 112 -49839 113508 65900 114 -187610 85335 113980 44 -301926 77758 87424 6 -200017 34873 13097 35 -65030 48616 13097 45 -343154 25643 48616 39 -4095 48171 48616 38 -330331 24473 102933 92 -206710 83596 102933 90 -283881 83347 83758 14 -180909 38673 71763 9 -201821 49327 51430 6 -251409 115557 117294 14 -325263 96102 56732 19 -140852 67057 56732 56 -279654 52761 66161 44 -316368 39469 117293 103 -270661 114659 106366 7 -156636 84861 106458 7 -289717 114660 106461 8 -177862 20596 21439 38 -245333 82980 30326 63 -49135 76402 54877 33 -327176 105714 73586 45 -169686 66602 73586 74 -318033 52764 67553 102 -280397 58513 102199 96 -164653 37733 102199 99 -376621 67434 37733 50 -326656 102199 37733 99 -260734 54912 17092 32 -281458 67418 92062 55 -111480 63837 92062 64 -247202 92062 63837 64 -111915 67049 63837 97 -212509 115222 5319 25 -171565 89332 5319 54 -221916 55112 4078 9 -344639 55298 53496 8 -148903 28059 82193 45 -41180 61341 82193 44 -305612 95900 26183 6 -151503 44546 26183 8 -332303 68997 55838 6 -295522 29935 55838 5 -152948 53141 53304 45 -584 11997 53304 44 -357305 52118 22784 8 -317845 51447 22784 7 -105555 28200 14716 45 -32600 46486 14716 44 -233917 9485 17748 6 -160384 12067 17748 8 -338321 57816 15932 6 -319993 67929 15932 5 -150781 40596 9950 44 -9738 30126 9950 43 -182797 52791 88933 10 -16692 28756 12862 10 -32237 42810 50816 134 -229264 98555 70614 8 -224883 77405 789 134 -304564 91146 71366 30 -204691 71366 78090 33 -321417 78090 687 19 -318018 52630 42882 48 -143077 99409 42882 49 -351033 55282 37638 8 -240133 46610 37638 10 -237937 30970 43365 29 -77901 38182 43365 31 -184346 64977 42527 43 -113903 91006 42527 28 -239674 42527 91006 28 -138934 54860 91006 58 -286780 96748 54860 89 -128636 95392 54860 57 -221805 54240 73972 29 -127524 73830 73972 31 -263238 73972 73830 31 -99047 86868 73830 55 -162860 26358 28881 77 -18761 51853 28881 6 -313844 24400 26358 78 -168411 58716 26358 77 -163183 27966 40876 63 -54252 49485 40876 66 -316520 40876 27966 63 -125963 63116 27966 6 -244992 81500 28376 45 -61716 29313 28376 45 -331200 39274 32626 11 -32278 43301 32626 10 -97540 68192 13114 103 -50191 1811 13114 114 -372494 101745 113979 28 -322858 85595 113979 14 -251364 115215 79118 83 -378119 93700 69686 8 -11381 49446 2884 113 -36788 13447 49049 16 -27183 66353 49428 4 -201838 49428 116737 3 -327903 111323 55109 41 -66717 59068 55109 42 -283938 83721 86204 60 -43467 8249 37704 31 -259188 42192 42479 17 -111926 67219 42479 14 -241809 59946 43124 19 -239670 42479 67219 14 -98345 73447 67219 16 -223492 67219 73447 16 -111937 67280 73447 25 -204996 73473 37749 18 -68012 67729 37749 17 -180767 37749 67729 17 -92336 37712 67729 23 -223571 67729 37712 23 -68934 73568 37712 25 -180762 37712 73568 25 -151040 42059 73568 32 -301316 73568 42059 32 -96151 59159 42059 23 -316141 38136 34510 36 -370073 60772 27389 10 -229409 99157 27389 9 -345127 69276 13000 12 -48609 67912 13000 10 -107130 38653 38036 133 -17422 38215 38036 132 -342232 13469 15535 10 -245049 81707 15535 9 -360034 100779 31682 11 -15091 13112 31682 10 -379008 102452 5394 11 -5357 62558 5394 10 -149525 31377 24589 133 -51695 21803 24589 132 -372621 103712 63186 11 -55503 62660 63186 11 -271173 263 87127 13 -206660 83236 83043 61 -320384 70596 37562 35 -88252 14308 37562 46 -245422 83533 83236 61 -361432 14733 68151 85 -324185 91618 68151 140 -315622 34959 80522 44 -149533 31417 80522 169 -305790 96582 73019 86 -182536 50833 68905 102 -264142 79669 10180 28 -365521 93921 29219 45 -16280 24906 29219 15 -377942 92139 69285 11 -9378 26535 69285 11 -148315 24815 22225 83 -53571 42309 22225 43 -220385 43012 43548 175 -70429 101262 43548 35 -232756 2884 71319 85 -114317 99992 71319 57 -243352 71319 99992 57 -150501 39077 99992 122 -376611 67088 64669 85 -291554 8261 64669 112 -129050 103034 111259 22 -21047 109143 111259 25 -270236 111259 103034 22 -172283 103032 103034 64 -326825 103034 103032 64 -85551 106021 103032 61 -210882 103032 106021 61 -85597 106484 106021 16 -211369 106483 106045 21 -173508 114290 106045 24 -192732 110745 4848 31 -226414 85621 115748 14 -183766 60571 63663 51 -173081 110759 63663 100 -5443 63663 124 52 -11163 47058 48652 6 -28461 113352 111255 8 -295446 29388 59264 60 -152959 53233 59264 38 -183801 60777 53378 8 -97125 65108 53378 49 -35738 113702 114570 102 -200079 35457 112396 117 -114613 104020 112396 116 -206501 82288 54847 52 -159266 1259 54847 98 -351065 56122 7844 10 -259977 49129 7844 14 -130272 114431 9461 21 -27870 76448 9461 20 -268687 100857 54443 16 -167174 51777 54443 59 -229861 101295 33556 36 -109548 52590 33556 48 -275205 22169 43193 68 -114324 100086 43193 111 -332997 85593 1811 20 -277763 37396 38279 13 -122569 43512 38279 13 -258630 38279 43512 13 -153062 53918 43512 21 -297608 43512 53918 21 -107040 38108 53918 31 -241101 53918 38108 31 -156951 92034 38108 31 -378046 93086 92034 35 -296845 38108 92034 31 -247116 91757 44440 37 -68988 73960 44440 54 -181659 44440 73960 54 -93296 43210 73960 143 -351034 55305 43210 331 -224391 73960 43210 143 -252153 2627 74601 121 -278896 46822 77363 70 -335409 7454 17137 11 -48019 59933 17137 10 -212502 115157 69629 313 -178555 24534 1670 87 -309514 1670 52519 48 -107000 37750 52519 49 -54566 52519 6757 47 -264046 79122 2540 226 -266085 89148 115161 48 -63915 43146 115161 59 -70300 98846 51777 71 -55839 67416 51777 57 -221897 54932 55221 73 -99125 88588 55221 24 -290161 249 17490 52 -152499 50347 17490 132 -293760 19775 26508 138 -111869 66597 26508 37 -247167 91919 38494 9 -67924 66978 38494 92 -297382 41879 48899 11 -178721 25348 52100 98 -246569 89329 112399 45 -164334 35073 36060 113 -55973 69323 36060 44 -91000 28791 35073 79 -56126 71018 35073 115 -348065 3183 33376 21 -228261 94347 33376 9 -212258 113426 68906 264 -263374 74939 77754 620 -264144 79675 3317 215 -354457 1464 17689 12 -25028 42366 17689 13 -319268 62694 57125 54 -101908 6533 57125 28 -241490 57125 65324 49 -89553 21095 65324 75 -373862 15186 21095 54 -215597 15188 21095 89 -361917 20484 48574 148 -38047 26121 48574 150 -166916 50491 16324 108 -37127 16954 16324 135 -316259 38821 50491 156 -69049 74640 50491 42 -142963 97097 84156 77 -49337 97891 84156 88 -344845 60078 97097 149 -284014 84156 97097 77 -365264 91335 27671 11 -281982 71265 27671 11 -69496 82436 75470 77 -41001 59277 75470 62 -185811 75470 82436 77 -165264 41187 82436 42 -372131 97808 28143 14 -324220 91800 28143 33 -170995 76249 22983 6 -337066 29547 13064 8 -260268 51547 13064 13 -149641 32116 1589 54 -10422 39684 1589 53 -339908 91307 27670 8 -299014 55451 27670 8 -324525 93133 6286 11 -59522 17571 6286 12 -352149 82070 45739 9 -8783 21102 45739 9 -186476 79665 77755 149 -187292 83502 82932 24 -128056 83059 82932 27 -89091 18830 21141 81 -53297 39859 21141 73 -141016 68312 18830 64 -19977 65767 18830 73 -364722 83879 83309 189 -175103 6588 83309 209 -301603 75749 6588 122 -69545 83309 6588 209 -352935 93075 80026 82 -218450 30114 80026 93 -321111 75985 81572 37 -168061 56539 81572 51 -121979 40316 56539 39 -52099 25809 56539 39 -356608 34427 2368 6 -184031 62442 2368 8 -245498 84161 83639 10 -228931 97097 61852 36 -149768 33009 44669 59 -54397 50903 44669 46 -17812 42264 20151 88 -333774 93972 50788 66 -294419 23609 50788 22 -296075 33799 45842 98 -157353 100341 76746 131 -2598 31439 76746 72 -194035 2001 86817 217 -308582 112714 104573 141 -205981 80004 79122 313 -244170 77102 1703 258 -223648 68234 113426 114 -297568 43176 43308 32 -109799 54076 43308 34 -322595 84235 75689 57 -377336 85020 14884 57 -195113 8407 76388 7 -142324 82763 44169 68 -4611 54085 44169 49 -278621 44169 82763 68 -163115 27633 82763 28 -185580 73839 73807 92 -358492 82090 52350 9 -260459 52914 52350 9 -114227 97932 70330 42 -30253 21600 70330 21 -243213 70330 97932 42 -122478 43044 97932 29 -268590 100458 43644 8 -58313 10413 43644 8 -352616 90091 48449 8 -180968 39009 48449 9 -379035 102769 23218 8 -292906 15287 23218 10 -359012 90636 23420 12 -195123 8451 23420 11 -97597 68687 29668 48 -31142 29948 29668 47 -227706 92013 63774 10 -98333 73347 63774 39 -367305 10183 51683 10 -222546 59693 51683 10 -147851 22320 26584 48 -47377 52128 26584 45 -184717 67451 102052 41 -97380 66901 102052 57 -281325 66323 102143 27 -85016 99412 102143 35 -353881 102441 25809 7 -322073 81572 25809 21 -325013 95081 70524 36 -79850 49149 70524 10 -204572 70524 49149 10 -109397 51684 49149 46 -322656 84656 62507 36 -116502 7125 62507 39 -261701 62507 7125 39 -171344 84450 7125 78 -175427 8408 84439 26 -156566 83171 84439 37 -303160 84439 83171 37 -128831 99149 83171 27 -299544 59610 61180 47 -156061 74005 61180 42 -324325 92265 61177 77 -170610 72558 61177 120 -373443 9562 72558 139 -312209 15946 72558 78 -320654 72558 21120 88 -142962 97067 21120 68 -330725 30215 97067 38 -275050 21120 97067 68 -206636 83059 84084 20 -90446 25753 84084 15 -365544 94179 25753 27 -226161 84084 25753 15 -206765 83954 76316 65 -142916 96104 76316 42 -21244 112817 105163 38 -191913 105163 89749 61 -14845 10105 1404 6 -23776 27455 1644 135 -221872 54721 51547 10 -363205 42050 28761 9 -287556 100201 28761 8 -359354 94206 64273 6 -276429 28761 64273 8 -38619 31485 62668 51 -287501 99968 54635 10 -114285 99226 54635 32 -332382 71018 99226 67 -241192 54635 99226 32 -372423 100804 29099 13 -274141 16515 29099 12 -67958 67262 61246 26 -44333 18600 61246 8 -315992 37223 67028 14 -69864 89904 67028 35 -184651 67028 89904 35 -132920 18870 89904 32 -91100 29255 9315 35 -38771 32915 9315 5 -223012 63169 106997 32 -97039 64366 106997 26 -300172 64893 106995 37 -92157 36212 106995 22 -365824 96832 16515 27 -304977 92978 16515 9 -319631 65216 103967 20 -114868 106515 103967 17 -249801 103967 106515 17 -114444 101938 106515 13 -250167 106515 101938 13 -143185 101538 101938 10 -287944 101938 101538 10 -111826 66141 101538 20 -262116 65446 102145 11 -143148 100938 102145 11 -240939 52632 62894 21 -140848 67030 62894 12 -280905 62894 67030 12 -77838 37710 67030 11 -272088 5735 72992 8 -157462 102147 72992 13 -301241 72992 102147 13 -114360 100664 102147 15 -230004 102118 66673 8 -85173 101903 66673 8 -204077 66673 101903 8 -85188 102177 101903 7 -242688 66519 102115 8 -85942 110360 102115 7 -210687 102115 110360 7 -114456 102049 110360 9 -250694 110360 102049 9 -129005 102142 102049 8 -268917 102049 102142 8 -156969 92462 102142 7 -260356 52179 94487 14 -97653 69083 94487 17 -181529 43384 37591 54 -150277 37685 37591 52 -296777 37591 37685 52 -314040 25312 49974 154 -265012 83829 83640 13 -84237 83511 83640 14 -206712 83640 83511 14 -156586 83711 83511 15 -2016 26246 15260 35 -261138 57981 85914 240 -282823 77567 87427 49 -56673 104234 18964 136 -321326 77538 3190 178 -121546 37943 51165 40 -27147 65744 51165 23 -331758 54167 49244 6 -170086 69522 22845 43 -4711 55217 22845 42 -318626 57625 69522 7 -173185 111680 69522 6 -313570 22913 76320 21 -128702 96692 76320 42 -222368 58371 80254 7 -351256 61304 44119 40 -249253 100953 44119 11 -338915 74405 9738 10 -22071 9841 9738 26 -77750 36680 19822 169 -12070 56593 19822 169 -109629 53142 23142 35 -3811 45661 23142 35 -210451 100757 17389 11 -148587 26488 17389 10 -268700 100914 50332 9 -169412 64576 50332 10 -365562 94342 51110 10 -311304 11886 51110 10 -6236 74648 3814 23 -290523 2250 51461 6 -26850 62104 57625 6 -12127 57341 75928 39 -264078 79338 88327 32 -234643 13332 13340 10 -78218 40235 13340 9 -322446 83304 97368 29 -159986 9325 97368 7 -362155 24160 36398 8 -286581 95789 36398 8 -245558 84508 3897 8 -311659 13542 13081 10 -87719 10698 13081 7 -354840 9981 10698 6 -215106 13081 10698 7 -357063 46171 96965 32 -259002 40909 96965 44 -116222 3718 22610 49 -29122 9171 22610 176 -310721 8573 83885 165 -342608 17867 21385 166 -34991 75441 21385 193 -105569 28278 5739 97 -2421 29782 5739 96 -211055 104214 7282 12 -328769 117360 82463 94 -184773 67725 46171 8 -119039 22610 46171 48 -346727 95430 95611 14 -221637 52875 95611 45 -66821 59721 50575 18 -20559 73738 50575 19 -123658 49782 16187 34 -10949 45048 16187 35 -268336 99486 9073 12 -147887 22518 9073 10 -192814 111501 268 18 -98605 75690 268 41 -212884 268 75690 41 -142344 83125 75690 75 -263465 75476 76110 19 -170984 76111 76110 23 -321124 76110 76111 23 -99726 100084 76111 18 -224694 76111 100084 18 -125969 63158 100084 69 -156697 86878 63158 81 -34420 67724 63158 88 -128110 84299 60379 17 -46217 39734 60379 23 -261395 60379 84299 17 -82640 66072 84299 20 -27418 70022 15258 98 -45438 29401 15256 10 -317494 49049 72983 33 -373574 11720 91618 65 -28044 98768 91618 93 -162507 24385 49490 50 -47151 49665 49490 50 -344761 57941 48682 8 -311127 10902 48682 7 -332800 81620 63824 9 -19026 54964 63824 8 -153816 58994 39341 46 -55464 62007 39341 47 -336781 25551 69346 8 -302204 79453 69346 8 -338943 75032 50912 9 -204430 69346 50912 8 -94988 52409 11656 43 -13713 104422 11656 43 -331427 45952 15761 6 -225511 80796 15761 7 -335313 5656 23481 8 -176875 15761 23481 8 -154664 64363 46034 132 -47515 54053 46034 132 -368512 26116 29905 8 -303577 86448 29905 7 -262745 70078 100820 82 -61719 29321 100820 40 -191187 100820 48461 77 -78512 41913 48461 42 -146833 16618 19368 141 -3728 44903 19368 142 -374300 20072 51561 182 -293689 19368 51561 189 -80485 52860 64078 38 -20011 66101 64078 39 -319183 61989 7126 40 -171309 83641 7126 21 -310438 7126 83641 21 -128763 97700 83641 29 -105815 29497 90708 39 -27933 81645 90708 55 -246875 90663 13482 8 -359681 97545 57477 9 -232879 3608 57477 61 -58229 10033 6228 30 -29032 7928 6228 28 -341567 1365 91737 11 -239055 38038 91737 20 -333238 88879 17751 25 -227644 91737 17751 25 -281786 69733 56287 100 -248614 98353 2777 29 -218275 28768 10870 8 -329498 13769 88943 7 -255 8079 72716 19 -67382 62909 61002 110 -30389 22839 61002 187 -185240 71212 96376 103 -97670 69239 96376 46 -260018 49399 14566 36 -95281 54101 14566 46 -333695 93259 56719 7 -222809 61887 56719 7 -174246 1857 85915 159 -174065 981 85654 97 -262541 68645 34195 195 -323639 89305 115751 96 -269352 104802 1039 45 -372202 98513 63039 38 -23250 22567 63039 37 -43067 116576 1987 79 -175230 7313 442 199 -299665 60792 59121 16 -70017 92488 59121 134 -53027 36155 55550 108 -66423 57190 22694 39 -12523 61893 22694 40 -99421 94489 35557 21 -50934 14128 35557 41 -204199 67470 108264 30 -100508 109291 108264 16 -334189 97950 103495 138 -306963 102120 103495 143 -201465 46667 64723 66 -142245 80992 64723 52 -219587 36850 63850 42 -112656 71813 25188 49 -52366 28171 25188 40 -359313 93767 62395 10 -200517 38206 62395 21 -279805 53899 95946 106 -98182 72506 95946 82 -340835 100321 45058 8 -7391 3097 45058 12 -348198 7008 17830 152 -3250 40129 17830 49 -171513 88354 115168 53 -31555 35169 115168 21 -203779 64508 102219 23 -85813 109111 116229 35 -57234 115222 116229 11 -203847 65061 30684 101 -51125 16354 10872 49 -192886 111974 78865 52 -37602 21778 48189 51 -319261 62648 76237 41 -363998 64721 73924 65 -201457 46575 73924 92 -357986 70711 28237 12 -10947 45027 28237 10 -38335 28743 27267 17 -280387 58455 52351 132 -85645 106996 52351 123 -376507 63663 105171 100 -6694 105174 105171 88 -113912 91162 50128 58 -49684 111477 50128 87 -350803 49446 100387 76 -278746 45458 100387 57 -326297 100443 12071 10 -77617 35648 12071 12 -180181 34035 59979 11 -135094 30912 59979 10 -109528 52475 59103 58 -4498 52604 59103 101 -342216 13219 69089 7 -268465 99935 69089 6 -368521 26183 29935 6 -296640 36870 29935 5 -125416 59974 5129 89 -11234 47751 5129 88 -368702 28623 12252 9 -247318 92515 12252 8 -148814 27627 17878 132 -12762 64837 17878 132 -376692 69414 47781 48 -285848 92547 47781 8 -362706 32530 17177 48 -248070 95847 17177 8 -208911 94122 9458 8 -79077 44912 9458 9 -336500 21923 7865 7 -206298 81359 7865 6 -220358 42753 33474 59 -91109 29290 33474 18 -280325 57977 51845 88 -137493 46228 51845 48 -368224 22335 22763 7 -24445 35082 22763 11 -358343 80710 21066 7 -19205 56719 21066 7 -249475 102089 19549 6 -164494 36449 19549 10 -333223 88560 101102 15 -271370 1578 101102 103 -71596 111708 32912 44 -10656 42020 32912 46 -365023 88863 27089 11 -296066 33759 27089 144 -344509 51330 53300 9 -45813 33759 53300 141 -142292 81954 62923 52 -13292 72314 62923 35 -316949 44678 102265 53 -111803 65962 102265 36 -223334 65962 30621 51 -137052 43969 30621 88 -297228 40802 110346 50 -70111 94372 110346 69 -365501 93678 27188 40 -267224 94372 27188 73 -184226 64128 106100 36 -84834 96033 106100 28 -270121 110409 114579 32 -294722 25355 66998 170 -280733 61486 63571 38 -109693 53519 63571 45 -340846 100433 6763 10 -25256 45016 6763 11 -301695 76355 89622 97 -73180 10321 89622 17 -200847 40617 65926 25 -251296 114696 116232 72 -366666 110130 105174 76 -193549 116376 105174 89 -371617 92830 50855 10 -15910 21472 50855 10 -249966 104994 13420 8 -131112 7276 13420 9 -97075 64687 13176 133 -46762 45523 13176 132 -133455 21933 13211 139 -50728 11546 13211 138 -370597 76840 2178 11 -30261 21664 2178 10 -359945 100043 12462 9 -238474 34368 12462 63 -360830 5337 62685 8 -299945 63129 62685 7 -348190 6960 66338 93 -19159 56300 66338 93 -256652 26026 24473 6 -67136 61525 24473 24 -188946 91162 45783 85 -115615 113422 45783 114 -115423 111777 112410 114 -52411 28613 112410 115 -360244 104122 61730 8 -34923 73993 61730 8 -252786 6283 83111 23 -113552 83276 83111 18 -360359 107469 89856 36 -282657 76396 89856 41 -216756 20620 71470 10 -162257 23085 71470 9 -1684 22990 31921 89 -115412 111705 19325 32 -39886 46951 19325 33 -267697 96537 75984 32 -85078 100413 75984 108 -248265 96816 20764 11 -95183 53637 20764 11 -131501 10054 59404 48 -37579 21563 59404 48 -334094 96855 25362 10 -185771 75263 25362 111 -313302 21394 56281 7 -126647 68296 56281 74 -36642 11733 28491 77 -250749 110840 8376 125 -247312 92496 45580 9 -140076 61796 45580 7 -29126 9219 31556 54 -339761 90102 7959 11 -25887 51440 7959 52 -365236 91006 96748 62 -319587 64976 96748 56 -273876 15303 44622 35 -59020 14871 44622 5 -334617 102414 69118 48 -188607 89781 69118 7 -295277 28158 34892 246 -129778 110296 34892 107 -340027 92529 24841 9 -49137 76421 24841 9 -276903 32467 103756 34 -172029 98972 103756 64 -333926 95344 18119 9 -55255 59815 18119 8 -287986 102205 7263 7 -150642 39852 7263 8 -331917 58325 9226 9 -248644 98472 9226 8 -135947 37145 93921 72 -362675 31931 59057 11 -325417 96675 59057 10 -369794 52573 1319 12 -227875 92688 1319 10 -82094 62446 12718 133 -4276 49957 12718 134 -372035 96874 38811 12 -320015 68113 38811 49 -222613 60339 65054 37 -83759 73930 65054 39 -364048 66386 91563 42 -243671 73930 91563 44 -347012 97898 31466 9 -43498 8851 31466 9 -292078 11139 73817 51 -170095 69594 73817 49 -104940 24771 26091 9 -50983 14853 26091 8 -359926 99904 36702 9 -178443 23940 36702 9 -359860 99391 38850 10 -315598 34718 38850 7 -238601 35239 43669 9 -67854 66400 43669 21 -375546 39110 52596 149 -2608 31550 52596 132 -70390 100529 52494 70 -47234 50571 54444 68 -184972 69183 102745 71 -151752 45842 102745 91 -128272 88044 101833 20 -270680 114754 101832 38 -143945 109109 101832 31 -212827 117637 112939 50 -113756 87989 112939 28 -231179 109903 101831 16 -85812 109108 101831 17 -231078 109135 113438 38 -129364 106047 113438 56 -68892 73216 40673 102 -27560 71337 40673 74 -205131 74620 7728 66 -88023 12522 7728 83 -107491 40617 27976 40 -12701 64089 27976 39 -373187 4438 53772 17 -4091 48109 53772 13 -340567 97792 5199 9 -31435 32873 5199 11 -136338 39855 22944 53 -2817 34818 22944 53 -106430 32847 27476 59 -36171 4399 27476 30 -78556 42065 18713 66 -24196 31216 18713 68 -94729 50862 48241 59 -12430 60723 48241 58 -366068 99189 19286 11 -9225 25076 19286 64 -378909 101063 20756 7 -310814 9060 20756 7 -331549 48642 105176 104 -323445 88354 105176 80 -42468 104390 114585 17 -263224 73827 54140 38 -99357 93363 54140 64 -82519 65135 29119 43 -31031 28918 29119 38 -329471 13428 9331 83 -209251 95520 9331 10 -232496 1471 2611 9 -174059 921 78866 7 -290649 2923 78098 11 -224791 76841 19642 7 -171123 79727 19642 7 -260921 56497 66923 92 -136703 41984 66923 47 -210226 99803 16289 33 -107945 43626 16289 3 -365230 90972 68503 7 -4952 58121 68503 8 -366993 2757 69954 10 -29923 18341 69954 5 -106638 35005 29711 78 -46611 43906 29711 56 -249928 104761 82629 24 -55478 62219 10855 7 -40153 49942 76326 11 -3107 38833 84508 7 -368204 21977 15287 11 -302379 80436 15287 10 -369206 37587 16344 10 -227561 91369 16344 9 -343921 37268 67300 117 -50425 7682 67300 105 -360948 7682 24823 109 -319894 67289 24823 64 -313885 24597 7682 104 -137853 48311 7682 112 -376441 62261 108290 196 -281184 65276 108290 196 -60712 23935 22261 97 -17630 40502 22261 97 -365584 94599 74176 10 -311035 10505 74176 11 -375658 41688 13930 7 -19520 60189 13930 8 -340410 96146 142 9 -4352 50895 142 9 -318893 59853 53090 19 -69003 74082 53090 31 -301373 73992 73983 40 -167441 53296 73983 18 -45865 34973 27891 89 -91865 33760 26980 118 -38363 29050 26980 132 -262429 67826 73753 20 -100329 107401 73753 35 -242354 63939 65457 41 -144091 110459 65457 33 -64181 44437 46890 6 -44702 22117 46890 7 -319632 65217 94276 11 -81965 61607 94276 7 -259209 42405 52777 10 -140902 67397 52777 33 -319905 67397 108912 35 -157116 95601 108912 17 -181477 42926 105358 17 -143233 102060 105358 31 -123421 48248 29975 167 -2639 31766 29975 201 -359201 92662 32821 9 -37876 24520 32821 8 -266806 92459 20561 7 -79604 47675 20561 59 -167323 52600 43630 81 -4039 47621 43630 83 -170982 76047 12094 125 -27086 64800 12094 92 -313493 22567 28171 18 -122540 43332 28171 48 -277207 33760 29050 30 -81844 60875 29050 27 -340982 102108 94671 48 -239418 40458 94671 21 -287994 102261 64437 32 -100415 108263 64437 44 -225451 80600 52162 21 -112980 73652 52162 27 -343279 26980 94307 132 -243638 73652 94307 42 -183185 56016 102455 47 -107709 41874 102455 14 -109638 53217 51897 86 -45103 26114 51897 93 -234838 14308 51536 110 -65680 52709 55991 64 -31189 30374 55991 68 -260913 56445 30282 22 -128797 98528 30282 76 -132779 18053 28216 231 -10720 42643 28216 208 -270761 115254 107735 57 -88132 13413 107735 94 -249942 104850 114595 114 -116055 117288 114595 114 -153412 56106 12941 48 -31372 32198 12941 47 -345546 80636 65512 8 -218739 32516 65512 6 -151473 44392 15120 50 -24961 41503 15120 49 -377697 89985 27237 9 -312881 19243 27237 136 -139403 57725 48980 50 -29232 10307 48980 49 -360092 101407 17082 10 -206017 80156 28623 8 -147365 19711 28623 10 -90537 26377 31063 48 -9860 31127 31063 47 -102401 10306 32734 45 -27684 72692 32734 45 -377183 81685 19969 10 -183431 57885 19969 10 -332723 80900 35988 10 -200746 39716 35988 10 -189276 92523 15667 9 -59100 15291 15667 10 -248855 99352 60772 10 -146264 13000 60772 12 -362840 33832 19376 9 -235682 18315 19376 8 -188630 89852 31931 11 -131863 12549 31931 11 -207709 88968 116243 40 -116791 9262 116243 36 -68881 73140 30215 23 -39475 42631 30215 10 -243044 69150 37174 150 -59094 15238 37174 24 -181550 43532 53218 74 -128676 96124 53218 67 -168782 60749 40797 268 -45238 27480 40797 35 -373701 13282 97925 24 -229990 102045 97925 19 -353673 100205 11764 6 -39930 47376 11764 68 -338409 59813 11489 6 -54050 47083 11489 6 -6200 73270 117314 23 -307736 107018 48939 23 -101140 114668 112425 113 -6865 111466 112425 113 -377468 86910 117317 107 -244434 78920 117317 113 -202341 53529 97150 46 -79209 45550 97150 40 -341827 7728 7706 94 -272754 9723 7706 90 -57511 2586 31975 22 -13000 68881 31975 40 -213237 2586 42170 29 -17801 42170 61665 40 -318535 56979 91507 126 -162471 24209 91507 116 -116341 5635 68703 10 -16033 22682 68703 6 -67794 65951 18816 89 -38744 32580 18816 88 -377682 89866 38528 8 -45472 29627 38528 7 -372355 100147 16270 8 -252857 6563 16270 7 -122587 43625 24075 131 -48168 61849 24075 130 -365070 89539 50675 9 -46102 38601 50675 48 -350236 36478 74997 8 -206161 80765 74997 7 -60337 22031 22548 131 -16850 30170 22548 131 -108101 44373 64062 64 -38565 31082 64062 63 -378496 97069 24428 7 -23431 24142 24428 7 -374385 21095 32245 101 -4571 53629 32245 56 -220822 46984 71027 5 -121034 34286 71027 4 -242959 68463 79938 455 -376394 61177 15946 90 -27048 64285 15946 70 -375272 34157 84719 29 -239070 38107 84719 44 -363633 53844 24520 8 -278459 42640 24520 9 -286903 97232 57487 16 -108629 46938 57487 18 -131141 7546 10887 51 -48140 61431 10887 51 -97893 70634 72159 93 -20082 67478 72159 40 -148923 28189 39003 55 -38246 28001 39003 54 -260321 51902 91377 106 -78377 41177 91377 94 -108549 46532 37239 89 -32975 50315 37239 89 -260199 50822 73936 81 -138809 54184 73936 40 -182960 54184 94589 27 -67118 61447 94589 11 -250140 106276 73189 148 -99220 90477 73189 67 -177963 21211 73643 32 -67882 66669 73643 40 -346541 93756 20223 9 -321788 80289 20223 61 -257381 30499 90975 86 -137289 45031 90975 46 -222081 56379 85406 39 -345918 86841 117319 80 -21061 109962 117319 112 -143452 104423 23139 43 -55288 60104 23139 43 -345627 81300 12852 8 -197109 18752 12852 8 -198335 25116 32396 78 -137887 48574 32396 133 -239833 43851 71945 92 -297600 43469 74051 14 -136001 37581 74051 13 -181700 44854 57192 28 -156485 81552 57192 18 -328882 2198 62442 7 -238205 32947 62442 7 -154753 64962 102230 33 -12913 67433 102230 45 -249442 101915 61802 65 -98339 73402 61802 72 -222794 61781 26622 4 -89445 20616 26622 4 -182776 52647 59690 52 -113828 89443 59690 60 -375476 37733 67434 50 -266158 89443 67434 60 -214786 11690 21309 33 -119017 22522 21309 36 -110154 56315 19612 9 -14864 10303 19612 7 -367540 13565 12204 9 -283047 79174 12204 7 -335515 9250 56259 53 -33763 59101 56259 7 -204972 73392 66852 7 -146992 17598 66852 53 -139728 59761 51481 139 -52258 27237 51481 137 -19167 56454 57144 58 -184336 64931 39472 9 -109891 54678 39472 7 -376855 73254 17794 7 -32449 45057 17794 42 -73741 13986 23968 11 -48819 70738 23968 9 -257387 30508 4589 12 -155320 69099 4589 9 -329047 6757 24534 86 -223818 69646 54207 32 -69403 80411 54207 15 -298872 54075 53249 19 -127522 73815 53249 18 -243654 73815 73821 29 -109585 52830 73821 26 -261392 60365 73908 28 -268568 100370 45874 36 -76197 27011 45874 5 -172873 108950 51114 27 -56314 73001 51114 8 -224341 73600 63696 25 -140619 65365 63696 26 -262104 65365 96832 30 -134777 29099 96832 29 -279703 53206 27807 89 -89979 23536 27807 114 -13697 104132 105185 169 -353807 101312 60878 9 -12295 59217 60878 10 -140136 62204 15054 68 -34123 63197 15054 208 -261782 63197 18933 192 -136195 39071 18933 22 -367335 10689 18475 9 -2454 30112 18475 9 -350534 43210 55305 331 -318815 59084 55305 329 -251298 114700 103850 92 -189602 94062 72117 93 -300198 65084 67167 35 -97083 64743 67167 40 -346387 92179 90697 57 -299682 60895 90697 43 -220047 40101 74085 51 -136944 43352 74085 26 -202331 53459 103868 65 -114168 96568 103868 58 -190192 96568 52604 82 -95084 53004 52604 60 -260470 53004 37350 10 -114185 97076 37350 52 -331407 45384 29108 8 -22678 16568 29108 25 -362869 34128 25786 31 -293925 20538 25786 18 -337567 38678 19750 10 -304083 88865 19750 9 -300900 70190 53017 64 -44743 22517 70407 49 -100205 106085 112948 59 -57359 116790 112948 104 -366687 111229 110693 102 -14301 117036 110693 57 -261404 60513 58067 31 -65906 53974 58067 21 -282569 75828 19201 17 -164029 32392 19201 45 -352027 81030 17352 81 -181819 46009 69347 16 -128379 90467 69347 28 -149563 31669 5748 34 -47184 50031 5748 34 -64047 43924 23672 34 -38910 35680 23672 34 -131458 9901 19170 34 -20470 72505 19170 34 -379468 115137 115188 123 -36380 8414 115188 120 -177438 18443 55241 9 -98413 73986 55241 26 -271598 2888 114605 70 -187587 85260 112947 8 -270702 114850 113456 88 -205304 75779 95794 33 -72961 9081 95794 25 -369585 47711 75221 8 -210633 101692 75221 8 -356212 27791 56430 7 -218915 33352 56430 24 -83384 71567 23966 132 -18526 49386 23966 132 -140298 63321 18824 64 -27601 71774 18824 62 -376219 56320 62694 62 -33984 61641 62694 34 -346339 91779 26515 12 -55125 58390 26515 31 -106177 31234 16300 89 -23557 25298 16300 88 -364601 81766 32195 8 -279717 53293 32195 7 -361319 13403 71265 10 -264216 80040 71265 9 -179579 30366 43373 68 -128788 98195 43373 170 -181991 47056 22183 99 -1705 23202 9695 94 -324024 91029 11835 141 -92724 40032 11835 149 -256561 25592 33122 68 -169336 64125 33122 38 -320400 70697 67635 119 -114163 96481 67635 179 -348858 16490 8426 10 -197611 21327 8426 11 -372188 98357 64642 14 -39839 46456 64642 37 -285709 91996 8312 11 -106366 32285 8312 9 -227138 89464 113453 73 -244456 79018 37078 5 -30140 20630 48877 81 -222561 59774 73832 145 -70344 99675 73832 38 -199990 34698 22081 8 -83565 72580 22081 8 -13662 102230 67433 45 -81389 58278 64937 73 -20722 82016 64937 183 -250348 107901 106693 26 -83716 73589 106693 40 -85090 100638 59894 47 -9754 30228 59894 62 -369040 34580 80194 75 -201486 46867 80194 80 -204638 70958 73662 67 -128046 82847 73662 37 -334640 102706 53865 11 -17789 41982 53865 11 -346867 96548 26156 61 -48782 70366 26156 63 -332765 81263 23553 7 -53454 41092 23553 9 -354896 10982 8747 91 -37569 21406 8747 91 -378868 100709 15510 9 -48922 71922 15510 9 -362280 25425 36856 8 -32100 41281 36856 7 -172962 109713 111291 69 -28080 103850 111291 87 -327715 109713 103228 33 -129965 111946 103228 63 -135012 30550 66356 82 -26823 61894 66356 81 -368765 30181 23277 10 -327611 108886 23277 46 -261439 60784 60419 63 -168599 59730 60419 37 -189155 91915 68141 88 -166760 49567 68141 79 -250830 111438 106800 46 -159171 117264 106800 153 -191470 102174 73486 31 -69928 91029 73486 56 -329597 15134 40679 7 -38903 35627 40679 41 -365217 90833 96793 123 -299443 58706 96793 55 -297597 43443 43131 10 -167316 52533 43131 8 -202281 53006 37942 28 -167457 53392 37942 24 -202325 53392 54646 30 -107901 43357 54646 46 -190428 97659 53349 18 -125993 63305 53349 2 -140525 64619 45455 30 -46266 40133 45455 27 -181653 44403 65069 47 -99582 97463 65069 25 -280124 56517 35800 4 -120236 29114 35800 4 -362696 32398 64489 12 -283755 82770 64489 10 -322560 84035 83380 205 -83947 76127 83380 88 -185894 76127 102931 32 -143257 102288 102931 36 -57484 1785 13709 60 -377070 80584 38913 8 -321738 80057 38913 69 -267135 93934 38435 133 -208890 94002 40677 12 -225555 80951 41356 11 -186708 80794 51702 71 -114781 105523 51702 43 -191964 105523 101929 36 -160155 10375 26539 66 -16993 31607 26539 67 -375918 49154 52374 129 -5983 70953 52374 56 -345745 82449 40054 13 -252084 2139 40054 12 -206188 80911 14970 9 -148409 25354 14970 10 -291714 9125 111881 34 -268937 102221 106305 36 -128672 96102 106305 32 -318583 57299 69419 11 -74776 19804 69419 10 -242321 63786 56923 18 -149506 31307 56923 18 -244363 78474 72840 24 -163639 30222 72840 23 -261176 58398 41788 21 -92326 37675 41788 57 -277807 37675 92001 69 -63429 40367 92001 32 -356762 37320 114020 53 -6678 105032 114020 53 -99793 101352 6895 6 -28587 115029 6895 8 -345609 81134 71477 12 -191310 101352 71477 10 -357575 59483 113459 12 -323618 89183 113459 11 -345670 81691 56599 11 -239359 40023 56599 15 -140348 63563 22570 106 -51830 23205 22570 104 -217658 25793 40895 31 -133894 24479 40895 69 -359586 96556 16822 9 -22432 14002 16822 9 -348033 2406 94338 50 -288230 103531 94338 29 -75357 22628 69255 90 -18490 48843 69255 89 -379133 104623 54147 9 -48278 62990 54147 8 -190646 98511 19351 7 -105368 27179 19351 8 -344898 61934 7911 9 -287021 97738 7911 8 -65429 51138 45668 134 -11087 46237 45668 132 -108524 46434 69689 133 -19884 64114 69689 131 -333858 94684 22067 11 -38386 29347 22067 11 -364547 81130 18123 11 -1727 23453 18123 11 -333340 89971 23970 10 -47037 48113 23970 9 -347442 102868 11536 12 -14625 7181 11536 41 -297689 44364 23070 149 -118212 18176 23070 7 -226827 87812 111886 17 -378603 98043 7956 10 -29261 10979 7956 11 -235332 16660 64285 68 -84900 96999 64285 69 -297412 42048 48049 160 -126770 69150 48049 173 -142207 79966 51029 44 -22126 10359 51029 24 -364528 80838 32876 9 -241532 57334 32876 9 -11352 49070 54268 58 -209528 96758 20072 161 -165275 41242 20072 165 -105706 28915 19734 169 -36166 4219 19734 200 -359149 92047 70296 13 -8915 22337 70296 58 -344991 64187 57621 182 -1152 18122 57621 184 -139617 59080 92354 169 -197174 19082 12008 26 -127038 70777 12008 14 -262833 70777 43518 44 -63058 38421 43518 43 -338012 50171 107025 95 -242471 64939 107025 18 -178991 26527 43485 77 -81918 61323 43485 106 -116535 7483 89876 146 -359194 92543 23364 7 -182319 49392 23364 47 -220303 42333 96910 31 -73391 11810 96910 73 -180007 33323 70137 7 -345311 73430 53976 257 -238376 33861 53976 248 -320285 69940 44157 93 -149518 31363 44157 53 -379274 108808 33327 10 -257312 29803 33327 12 -377048 80393 11328 12 -253556 10510 11328 14 -26172 54963 114627 52 -333921 95300 9379 9 -297730 44719 9379 9 -314800 29728 39881 8 -118984 22368 39881 4 -95713 56517 24692 5 -39481 42702 24692 6 -298793 53453 101110 61 -119192 23480 101110 115 -193378 115301 111893 165 -123500 48608 111893 100 -78098 39669 10407 59 -19858 63850 10407 41 -206809 84312 5379 40 -145512 7645 5379 29 -138132 50245 5927 91 -32457 45116 5927 90 -358939 89876 42960 181 -209772 97891 42960 152 -95457 55012 36769 59 -38224 27807 36769 63 -93347 43548 43012 175 -45571 30623 43012 158 -313464 22374 99991 57 -122178 41276 99991 66 -372894 112230 70362 12 -179174 27529 70362 12 -359837 99152 24031 8 -9259 25432 24031 14 -377299 82806 24932 7 -1746 23710 24932 7 -364713 83001 20342 7 -10045 32696 20342 7 -2965 36702 65539 21 -165536 42698 19820 67 -11820 54299 19820 67 -373605 12087 92283 43 -328701 116922 95167 85 -223274 65391 63728 33 -157472 102258 63728 28 -184163 63539 102144 34 -112976 73606 102144 15 -250173 106572 64666 37 -169170 63193 64666 34 -354247 112739 67059 6 -232935 3902 67059 40 -99271 91464 10322 138 -51766 22599 10322 48 -63969 43552 41588 35 -27676 72624 41588 17 -340889 100808 43005 9 -51502 19861 43005 9 -343717 33903 21366 35 -286461 95268 21366 10 -374081 17748 67929 6 -255442 19361 67929 5 -135216 31524 25914 89 -31760 38003 25914 88 -351564 69713 18481 8 -255160 18000 18481 6 -65044 48661 12423 131 -45227 27430 12423 130 -330253 23536 36155 112 -313367 21778 36155 64 -361000 8830 28001 5 -281902 70634 28001 58 -263223 73826 53923 30 -68932 73557 53923 17 -300195 65053 34328 25 -91542 31623 34328 22 -23331 23159 41253 92 -110232 56697 42568 61 -34468 68453 42568 59 -111502 63934 6961 138 -39367 41399 6961 137 -253474 9945 74076 20 -141884 74134 74076 14 -370068 60489 37270 9 -215498 14682 37270 5 -92889 40918 100654 53 -340757 99650 23529 35 -209655 97452 23529 8 -321319 77470 1040 6 -288768 107416 111895 59 -80107 50704 35817 210 -55699 65061 35817 133 -183827 60964 2208 81 -334211 98097 23710 7 -180428 35609 23710 8 -367887 17887 31491 9 -197779 22097 31491 9 -375200 33391 50895 9 -182537 50877 50895 9 -347158 99393 50514 10 -249279 101084 50514 24 -92753 40192 18201 112 -19498 59942 18201 111 -337443 35817 100727 113 -224419 74135 100727 87 -254758 16159 56959 7 -121733 39110 62135 37 -45446 29437 62135 21 -297915 46594 24485 101 -61623 28900 24485 87 -174583 3556 61766 9 -131408 9570 61766 6 -318146 53713 38138 56 -109668 53386 38138 57 -213856 6340 51689 34 -157054 94153 51689 54 -260648 54245 73812 17 -93281 43141 73812 17 -258929 40251 41963 8 -75870 25254 41963 10 -135652 34987 47283 45 -39599 44127 47283 44 -238410 34106 64754 13 -298769 53267 58962 27 -167305 52429 58962 79 -298718 52839 73954 44 -110564 58741 73954 34 -318773 58741 73944 16 -153054 53892 73944 14 -262098 65322 10261 57 -111852 66365 10261 90 -114065 94085 9878 50 -5888 69797 9878 66 -290331 1170 93678 42 -335949 15375 18242 9 -306159 98202 18242 12 -331448 46294 50373 65 -32435 44945 50373 10 -298853 53982 53246 21 -171636 90763 53246 35 -353595 99513 22711 9 -36725 12636 22711 10 -224359 73725 37362 37 -84518 89873 37362 136 -276889 32392 61746 72 -143159 101051 61746 50 -154298 61978 11196 43 -32486 45364 11196 43 -359234 93033 8399 10 -56358 74217 8399 69 -274490 18285 25235 7 -75671 24102 25235 8 -352124 81855 48113 9 -293467 18232 48113 8 -136475 40691 67214 43 -19442 59368 67214 42 -259362 43969 65003 77 -156992 92936 65003 28 -266896 92936 32493 30 -65700 52838 32493 26 -182801 52838 64498 69 -99419 94427 64498 124 -370895 82231 96412 59 -296314 34877 96412 18 -160937 15698 95443 76 -252334 3695 46252 51 -137394 45658 46252 9 -185616 74215 63174 74 -98791 80713 60208 49 -13099 70186 60208 21 -318743 58404 105207 50 -183354 57199 73531 35 -107185 39034 73531 49 -243702 74188 69655 77 -320233 69609 100479 93 -309934 4129 77093 242 -221760 53821 2121 104 -16919 30880 2783 144 -280419 58619 62762 41 -185546 73580 58740 12 -128696 96589 58740 47 -247902 94982 37288 9 -131953 13170 37288 10 -335057 114639 84912 90 -265184 84963 84912 149 -222501 59263 91317 50 -156322 76893 91317 50 -339495 86583 104637 128 -284181 85211 104637 191 -353827 101643 114035 138 -265286 85452 114035 132 -347836 114638 1452 27 -230829 107480 1452 44 -183728 60171 82286 163 -171500 88053 82286 52 -216081 17260 52623 130 -143421 104179 52623 48 -75852 25170 117343 48 -37160 17260 117343 110 -232071 116343 8704 51 -87423 8693 8704 186 -263361 74850 117346 66 -116257 4748 117346 59 -192345 108140 107469 88 -124677 55498 107469 17 -360675 117346 107471 85 -270608 114187 107471 57 -188861 90746 16090 7 -73613 13097 16090 16 -193070 113151 111902 22 -269509 106034 1455 77 -171491 87747 1455 109 -230290 103743 112450 97 -58080 9041 112450 114 -270194 110909 111903 116 -65003 48487 111903 115 -106899 36958 113473 113 -19377 58700 113473 111 -323333 87747 116790 126 -85640 106965 116790 75 -304047 88698 114041 139 -86709 117376 114041 117 -270017 109477 109476 12 -143973 109475 109476 98 -271128 48 57578 31 -187144 82670 95836 19 -87266 7502 95836 51 -84230 83446 7830 20 -34445 68198 7830 21 -187284 83446 95081 34 -161343 17766 95081 151 -379264 108649 108139 165 -269949 108942 108139 82 -226430 85701 114639 87 -69494 82417 114639 83 -168687 60171 107702 175 -49562 108754 107702 110 -147063 17995 107699 62 -35209 101643 107699 65 -263372 74913 114638 23 -92302 37547 114638 41 -249933 104799 101318 43 -102234 9330 101318 77 -179600 30556 27830 113 -105873 29949 27830 48 -203857 65137 67732 57 -154042 60226 67732 32 -348815 15945 92131 10 -261304 59439 92131 18 -336747 25170 20868 50 -179471 29552 20868 28 -367646 14970 53725 9 -245296 82819 53725 10 -87418 8684 87440 61 -49238 84925 87440 62 -339517 86832 101572 94 -35401 108139 101572 97 -85534 105870 86832 134 -55346 60746 86832 76 -326514 101342 59735 45 -217723 26118 117344 97 -357448 56281 32557 60 -263611 76465 32557 66 -244012 76059 6327 68 -81938 61450 6327 40 -113597 84376 84653 100 -53211 38849 84653 85 -337857 47231 13559 9 -3018 37860 13559 7 -322692 84863 93794 128 -168503 59214 93794 9 -348006 1588 13332 11 -54051 47089 13332 8 -335984 15901 41999 9 -266618 91645 41999 9 -205921 79624 3981 157 -263879 78130 85922 235 -315645 35164 102511 69 -82790 67267 102511 142 -206812 84377 84160 27 -63230 39288 84160 17 -366483 104491 61001 12 -208298 91447 61001 10 -219283 35241 54127 15 -272089 5745 60745 73 -215903 16567 84589 90 -171464 87210 84589 67 -225059 78608 1728 113 -193977 1568 728 376 -157278 98948 58874 54 -20936 104806 58874 11 -241740 59253 102974 30 -76827 30363 102974 16 -356621 34547 55923 12 -50866 13142 55923 11 -353788 101159 74336 27 -205302 75764 74336 67 -268757 101173 69978 58 -128093 84015 69978 57 -303671 86902 5204 32 -241523 57286 729 215 -174014 622 3574 235 -301935 77847 3143 166 -186243 78214 36078 99 -252095 2194 77369 87 -309355 402 74313 98 -186474 79659 77370 208 -213119 1879 36024 143 -200180 36033 85189 65 -174158 1448 78685 89 -224946 77848 1833 209 -290284 897 79417 56 -213342 3265 77371 110 -290215 500 56397 93 -315949 36951 77536 363 -265950 88582 111310 10 -193915 1052 4114 9 -265254 85228 103875 5 -299653 60735 75759 5 -194066 2196 74939 102 -283062 79225 67086 319 -289662 114204 85190 41 -309931 4115 88342 141 -271268 901 36864 103 -234575 13059 87152 88 -225200 79428 110723 138 -194306 3631 98335 78 -269699 107390 49217 32 -42172 75184 68607 19 -205582 77700 69659 184 -262425 67779 3189 168 -35327 105021 10753 26 -232946 3966 37080 94 -264212 80014 77626 52 -223287 65505 66511 154 -141807 73588 66511 152 -204035 66428 65153 42 -283874 83338 35543 41 -290503 2161 88648 51 -232146 116941 14357 7 -219455 36187 57282 90 -251939 1269 74940 59 -277511 35626 36396 7 -171794 94185 30807 35 -26402 57388 30807 19 -306132 98067 66487 168 -222241 57446 57283 131 -172058 99539 7139 37 -10022 32396 7139 49 -333752 93789 13272 44 -277551 35914 13272 39 -156531 82456 76233 46 -53548 42048 76233 147 -180680 37170 79644 38 -193895 913 77461 169 -184377 65215 78875 151 -365529 93996 28276 13 -51837 23277 28276 10 -364140 69512 97781 52 -297919 46617 97781 70 -1720 23364 48261 96 -206872 84738 85193 69 -282761 77185 689 281 -233036 4592 544 36 -206038 80238 24158 91 -63975 43586 24158 108 -213512 4372 74610 82 -264553 81414 2728 8 -171367 84793 6762 7 -344479 50548 113476 15 -285116 89465 113476 15 -361787 19019 104639 54 -323113 86762 104639 9 -142783 93292 59507 130 -5597 65828 59507 156 -258901 40038 75981 18 -203464 61949 90800 69 -185886 76011 84722 27 -113627 84849 84722 46 -194770 6638 2258 27 -84254 84082 2258 24 -97268 65981 9678 50 -9154 24297 9678 43 -300031 63782 108935 76 -98351 73502 108935 54 -140380 63748 29128 92 -26814 61802 29128 82 -309128 116595 77538 80 -286898 97226 55701 44 -278238 40918 13428 95 -291474 7841 8555 26 -289947 116466 74734 47 -296158 34175 84510 109 -282965 78527 95242 49 -340874 100663 33011 43 -230015 102224 33011 61 -183114 55499 2088 127 -133566 22519 2088 69 -122623 43851 33798 93 -5390 62869 33798 59 -342659 18415 57367 11 -187019 82186 57367 9 -193478 115969 82641 43 -188502 89323 110726 13 -115518 112639 110726 8 -284599 86770 86522 53 -116042 117191 86522 30 -370951 83644 38066 35 -220409 43186 38066 12 -183946 61857 81786 49 -268458 99916 296 66 -121195 35381 78802 307 -33389 54912 78802 4 -313077 20233 60571 10 -360162 102643 5209 8 -17764 41709 5209 8 -231494 112214 83045 11 -369365 41127 26148 77 -220294 42281 26148 45 -317989 52415 81682 77 -107414 40296 81682 98 -328385 114668 114045 115 -173437 113655 114045 164 -309244 117493 77078 99 -130633 117271 77078 97 -303251 85055 10544 98 -200801 40296 49723 118 -238790 36542 67088 130 -196796 17368 2815 56 -308652 113276 114651 21 -157070 94524 114651 167 -229940 101681 116787 26 -74955 20622 116787 27 -281132 64839 4219 38 -87261 7426 4219 40 -361128 10887 45910 216 -14875 10363 45910 174 -188617 89825 54691 175 -82982 69039 54691 272 -83365 71464 43647 30 -53387 40553 43647 172 -146287 13150 55994 50 -53666 43647 55994 33 -122130 41051 40553 162 -54909 55994 40553 172 -355450 17593 75142 58 -324149 91465 75142 13 -359298 93603 9459 9 -236547 22807 9459 11 -6516 95752 98920 11 -367860 17389 14552 12 -267598 96122 14552 10 -370475 71916 29476 11 -317229 47165 29476 11 -144687 115390 97298 113 -39178 39626 97298 154 -37012 15891 55832 100 -282884 78001 113 146 -263571 76252 84591 58 -114308 99649 84591 60 -359730 98113 61909 13 -23038 20170 61909 14 -232969 4097 36181 37 -319586 64963 38064 48 -284808 87932 112974 28 -262391 67577 18031 10 -63907 43085 18031 9 -222185 57050 38298 18 -120965 33482 38298 36 -247702 94118 57941 8 -96958 63824 57941 9 -226618 86775 105217 16 -95993 58275 64749 50 -25496 47025 64749 39 -260460 52926 73949 18 -93282 43142 73949 39 -201130 43142 74147 30 -113020 73978 74147 29 -302493 80866 66986 23 -98404 73935 66986 26 -258581 37904 53370 30 -138599 52739 53370 24 -280508 59482 73797 7 -156067 74100 73797 8 -298779 53350 73943 10 -95179 53613 73943 12 -279826 54026 59987 12 -124404 53841 59987 20 -366127 99812 92866 16 -298834 53841 92866 22 -252995 7356 88651 41 -326991 104161 58618 32 -276543 29428 74140 24 -69010 74126 74140 27 -366624 108594 95752 10 -340621 98253 41982 8 -222897 62348 41982 11 -223421 66685 36183 314 -131869 12591 50688 10 -17862 42812 50688 9 -260647 54226 58136 18 -109631 53169 58136 9 -172921 109353 35133 579 -35101 82434 35133 286 -321021 75490 6084 9 -98963 84800 6084 54 -212536 115390 116794 12 -214606 10767 39493 21 -56941 111685 115217 9 -203485 62085 64538 78 -251808 484 84854 30 -334939 111638 42398 114 -31702 37032 42398 106 -255874 21790 46573 79 -242744 66926 106856 99 -84971 98252 106856 226 -316101 37929 38136 22 -170782 73953 38136 20 -183742 60341 38330 65 -113435 81030 38330 86 -226309 85130 34544 15 -85620 106722 34544 19 -374561 23617 100037 38 -282763 77217 114 7 -321299 77378 78312 13 -240531 49292 48460 35 -258631 38284 43525 50 -66811 59685 43525 68 -240287 47867 66851 58 -154804 65248 66851 28 -300220 65248 106530 34 -169037 62311 106530 41 -277660 36612 65556 45 -169820 67661 65556 29 -182721 52203 62849 27 -143688 106527 62849 27 -21186 112261 21425 9 -211468 107192 1627 63 -206713 83654 5764 112 -113010 73893 40935 36 -42125 74203 40935 35 -48710 69479 1412 118 -244468 79098 68618 89 -309187 117108 112977 5 -333810 94293 46182 14 -6 307 46182 12 -256286 24202 91883 129 -102434 10397 91883 65 -340834 100315 58754 9 -9237 25205 58754 9 -346834 96227 16720 30 -257443 31009 16720 42 -81473 58808 16980 135 -20197 69306 16980 133 -335951 15397 8451 10 -213913 6643 8451 11 -33430 55423 128 5 -205519 77379 74320 8 -219485 36311 3156 32 -174200 1625 71403 59 -131219 8112 71403 46 -200580 38573 73902 37 -167408 53138 73902 15 -379018 102580 51142 9 -263250 74118 51142 14 -299325 57738 89258 97 -235944 19499 69833 24 -113949 91999 69833 73 -208416 91999 61189 105 -128167 85716 61189 58 -287426 99675 65037 5 -78830 43608 65037 11 -187406 84165 84855 49 -57645 5377 84855 51 -6498 90873 96649 13 -106443 32914 36502 87 -5483 64116 36502 86 -238631 35497 54963 45 -157857 106034 54963 50 -132038 13749 37144 45 -47441 52992 37144 39 -214995 12641 9393 10 -59758 18943 9393 13 -351975 80534 92931 53 -203282 60588 92931 65 -359015 90678 28080 31 -286340 94718 28080 8 -354277 113473 89260 110 -28778 117474 89260 111 -222867 62231 40308 67 -75152 21736 40308 91 -114800 105684 8221 109 -21971 8454 8221 38 -320828 74074 37799 17 -197131 18848 22337 56 -61125 26269 22337 57 -251139 113673 33894 9 -375972 50332 11886 9 -286336 94705 11886 10 -80907 55381 27099 131 -47173 49929 27099 131 -24643 37916 75239 21 -228079 93589 19166 66 -124973 57251 19166 64 -377219 82021 29859 10 -237606 28111 29859 87 -259224 42563 59466 36 -83767 74034 59466 19 -211898 110935 78785 51 -270254 111397 72769 73 -150680 40067 72769 48 -370885 82188 69423 8 -235542 17545 69423 9 -332659 80295 49118 10 -197115 18771 49118 11 -179905 32924 37297 6 -90666 27107 37297 35 -242538 65482 33800 42 -151697 45560 33800 44 -378313 95448 34557 9 -185965 76493 34557 34 -205361 76186 95736 23 -90935 28503 95736 12 -103224 15413 49924 76 -47159 49749 49924 73 -177465 18594 35571 25 -58978 14593 35571 17 -142614 89713 52941 83 -12047 56458 52941 51 -224455 74377 25551 9 -80140 50912 25551 9 -296915 38512 101975 76 -133520 22277 101975 52 -341010 102445 5676 10 -50554 9322 5676 12 -345081 67939 62107 8 -19285 57807 62107 11 -377081 80730 61043 6 -545 11640 61043 5 -305237 94059 48985 11 -124759 55958 48985 7 -166966 50711 57499 22 -3509 42931 57499 21 -334525 101020 14002 9 -236656 23427 14002 10 -271224 568 112459 229 -359428 94958 8414 59 -281460 67440 8414 109 -193884 861 79341 12 -56022 69935 4871 11 -284629 86913 114051 97 -242767 67087 68128 7 -282595 76004 62534 199 -70354 99867 62534 215 -66780 59540 21198 67 -46698 44845 21198 67 -317717 50661 31106 90 -338430 60407 1201 92 -303226 84927 1201 84 -264762 82287 5079 78 -116941 10155 5079 58 -205683 78305 115215 28 -28230 108597 77463 32 -352778 91743 70125 10 -273883 15322 70125 11 -242986 68669 69103 60 -232441 1144 78994 53 -238536 34726 56767 33 -129699 109619 114054 57 -43063 116436 114054 71 -231908 115370 101885 5 -158221 109556 101885 12 -379222 107426 114656 16 -246503 89047 114656 10 -269951 108955 86841 29 -101151 114696 86841 54 -174560 3452 1 10 -185719 74924 77758 7 -204049 66535 93522 16 -232358 620 99532 19 -263551 76122 62227 43 -336006 16090 34873 27 -42586 107485 34873 27 -336645 23968 53297 10 -244948 81360 53297 7 -43868 13448 13878 15 -232683 2468 76328 67 -51299 17955 111907 25 -226436 85740 51737 24 -187180 82851 88652 39 -99163 89293 62341 7 -227028 88834 50422 17 -302268 79829 52101 35 -303012 83391 85925 7 -184656 67057 52761 52 -140726 66161 52761 44 -207834 89575 39486 60 -339203 81168 95339 171 -243800 74648 106730 8 -248459 97671 114659 30 -129401 106366 114659 7 -281259 65755 114660 27 -143680 106461 114660 8 -289824 115389 12687 44 -218443 30022 105714 65 -170754 73586 105714 45 -281084 64474 52764 106 -169797 67553 52764 102 -301505 75071 58513 54 -143246 102199 58513 96 -327496 108087 67767 43 -205668 78199 37971 61 -306994 102288 49065 69 -188499 89319 4533 89 -141895 74276 4533 562 -27229 67418 82198 64 -142729 92062 67418 55 -323148 86936 115222 24 -72566 5319 115222 25 -12420 60564 4046 91 -363879 61128 53385 9 -205846 79256 53385 8 -351437 66118 51249 8 -217710 25975 51249 7 -361725 18249 20971 7 -214448 9520 20971 5 -76591 29264 31479 45 -53675 43784 31479 45 -379043 102839 29627 6 -295082 27066 29627 6 -189265 92486 47535 9 -170601 72483 47535 10 -221919 55152 74056 32 -84589 91378 74056 44 -228989 97301 55443 11 -309428 1053 79524 46 -221836 54451 43290 8 -367147 7263 36421 7 -321740 80070 36421 8 -370284 66852 36140 52 -43589 9990 36140 53 -369152 36584 24482 53 -45310 28166 24482 54 -315702 35613 30970 11 -107902 43365 30970 29 -199357 31361 52630 46 -165582 42882 52630 48 -71428 110450 39284 44 -18202 46156 39284 18 -308217 110450 64977 62 -63822 42527 64977 43 -289370 112047 54240 29 -98409 73972 54240 29 -104762 23898 27136 6 -36121 2186 27136 7 -372799 108910 86842 37 -221910 55058 86842 71 -260764 55175 43353 35 -142303 82219 43353 34 -136078 38200 73199 60 -22095 10079 73199 54 -258625 38200 64187 91 -344747 57651 17745 6 -289670 114256 17745 30 -378385 96173 57807 11 -216065 17212 57807 8 -220517 44195 72123 97 -87066 5769 72123 35 -285978 93156 48032 8 -153698 58270 48032 10 -356807 38635 76116 51 -39665 44622 76116 47 -373729 13587 27539 198 -36472 9717 27539 139 -173825 117164 9110 121 -19313 58129 9110 122 -344012 39056 14292 11 -288080 102661 14292 13 -40987 59115 3572 55 -15426 16898 71257 9 -30147 20660 3197 112 -252441 4229 36746 11 -225222 79577 89668 24 -247761 94416 1334 31 -189218 92223 115219 5 -263023 72292 78314 9 -320421 70884 51287 42 -138857 54453 51287 41 -6219 74104 78315 247 -167776 55109 111323 41 -624 12318 111323 30 -6677 105031 66512 14 -320781 73645 42192 27 -122380 42479 42192 17 -204169 67280 73473 31 -77844 37749 73473 18 -14369 117734 62404 28 -324144 91456 12878 39 -223623 68066 110740 51 -96309 60012 8206 134 -38219 27735 8206 132 -331452 46394 51194 11 -325055 95231 51194 10 -375021 29925 73017 11 -249228 100879 73017 10 -162888 26511 9654 43 -52631 30473 9654 44 -349107 19351 24732 7 -288011 102360 24732 8 -336813 26021 40709 7 -244608 79724 40709 8 -373768 13998 92284 69 -301740 76753 92284 34 -301681 76251 25754 96 -159411 5163 25754 77 -310094 5163 84723 83 -172603 106057 84723 53 -378988 102240 70596 82 -51544 20223 70596 26 -171158 80522 34959 44 -30674 25592 34959 47 -198436 25599 36149 58 -119354 24239 36149 151 -221886 54831 44487 188 -321500 78616 96582 55 -232849 3478 97698 68 -258315 36085 79939 32 -302120 78983 2642 98 -276184 27339 27306 43 -91085 29219 53705 37 -44943 24485 53705 114 -337900 48188 48471 11 -261328 59710 48471 9 -261359 59998 54155 58 -63918 43185 54155 20 -204703 71447 80981 58 -288654 106484 106483 20 -85555 106045 106483 21 -232601 2012 67259 16 -188548 89508 110745 10 -192308 107946 1721 41 -35163 90555 4438 103 -17202 34967 36822 30 -357141 48049 28287 146 -213140 1996 28287 112 -347580 106160 105226 72 -308119 109629 105226 91 -264056 79231 86528 25 -153860 59264 29388 60 -23318 23060 29388 38 -182827 53068 60777 51 -65801 53378 60777 8 -234058 10329 74070 8 -68975 73867 74070 29 -357563 59036 27119 9 -243794 74621 27119 9 -362443 27267 80079 52 -185574 73810 54173 28 -84170 82007 54173 39 -335284 4551 11242 11 -180777 37796 11242 11 -373055 117238 104664 56 -191758 104020 104664 83 -341414 113963 114059 109 -28812 1455 114059 108 -358792 88124 106048 42 -308375 111470 106048 56 -226822 87782 58700 101 -86514 115870 58700 110 -231543 112585 106050 29 -84370 86552 106050 39 -157210 97555 102029 81 -289772 114949 116811 25 -206893 84933 82288 47 -80806 54847 82288 52 -50659 10486 76469 35 -226551 86304 111910 147 -262906 71325 37381 83 -278850 46337 28128 58 -91549 31642 28128 8 -308362 111404 105905 48 -99048 86873 105905 51 -136909 43193 22169 68 -13016 69180 22169 45 -372348 100089 25018 12 -31076 29346 25018 14 -58476 11532 5834 24 -9504 27933 5834 24 -239749 43189 52949 35 -142788 93490 52949 44 -195739 11948 24173 57 -78741 43150 24173 78 -278561 43522 43315 38 -151282 43251 43315 25 -181512 43251 37396 12 -136088 38279 37396 13 -184501 66030 62172 20 -261940 64169 46822 48 -180615 36766 83644 28 -198376 25341 24423 10 -149290 30053 24423 12 -178453 23983 31766 53 -118791 21385 31766 170 -370729 80706 18751 77 -243919 75441 18751 134 -346729 95444 47614 31 -298676 52543 47614 59 -231447 111972 446 258 -321153 76353 88661 15 -129922 111683 88661 16 -376155 54443 29145 56 -229597 100121 29145 54 -56568 88661 86230 16 -28932 6060 56788 10 -284701 87343 115818 9 -250355 107984 77284 29 -345431 78037 54932 82 -223508 67288 54932 67 -335800 13374 7300 28 -209484 96482 7300 11 -331561 48899 25348 99 -174156 1439 25348 100 -372793 108861 33142 7 -321938 80973 33142 10 -178036 21677 50544 13 -7672 9456 49310 89 -239689 42651 249 7 -182501 50612 50835 47 -287727 100938 70702 4 -109767 53947 70702 21 -241103 53947 41950 30 -126577 67728 41950 26 -263730 77120 77205 170 -318197 54175 79942 94 -378669 98621 46179 6 -324284 92089 46179 42 -200323 36895 695 618 -241591 57843 78996 382 -352864 92426 30623 15 -46544 43012 30623 158 -213164 2187 56320 65 -168147 57125 56320 54 -368132 20624 50081 23 -55181 58974 50081 10 -187260 83330 83766 73 -72536 5097 83766 33 -209238 95459 13403 10 -137694 47441 13403 10 -237977 31406 37961 76 -77843 37736 37961 31 -263569 76249 92895 6 -321240 77007 2816 187 -163439 29262 2816 53 -114127 95440 40692 62 -10916 44734 40692 32 -335469 8440 28113 10 -288315 104090 28113 10 -183166 55865 39036 45 -129319 105579 39036 22 -321370 77846 4621 191 -225137 79015 77102 181 -251825 567 88041 6 -161935 21141 19149 71 -52574 30004 19149 85 -242435 64627 7859 10 -84003 76770 7859 30 -282867 77858 78692 30 -194341 3830 79130 24 -186092 77216 77691 31 -214476 9801 30114 81 -98757 80026 30114 93 -339367 82793 40807 136 -181112 39962 40807 159 -171205 81572 75985 37 -7053 113833 75985 24 -58496 11632 2198 7 -17982 44280 2198 7 -221250 49753 3183 36 -111298 62774 3183 55 -274606 18942 60489 8 -149749 32825 60489 9 -61123 26229 13384 36 -11744 53275 13384 37 -187340 83843 100456 32 -76505 28794 100456 86 -252958 7158 97845 31 -108480 46225 97845 29 -229936 101656 105232 16 -241666 58560 12678 45 -271083 117524 102888 47 -175778 10275 50951 63 -113531 82874 76177 93 -10750 42960 76177 199 -258113 34756 54912 4 -118013 17092 54912 32 -377690 89926 79726 11 -176377 13230 79726 11 -344113 41347 14853 8 -314439 27212 14853 9 -268794 101354 48188 8 -83018 69285 48188 11 -255117 17788 11269 65 -152569 50788 11269 40 -372578 102745 33799 83 -293944 20630 33799 69 -353190 95685 8284 9 -12468 61189 8284 56 -334483 100662 18051 8 -50965 14605 18051 12 -55117 58343 115822 128 -174304 2176 105231 107 -226038 83254 77285 63 -202916 57762 35309 46 -21552 116491 9602 149 -328574 115888 114661 113 -194355 3907 69104 479 -283152 79856 75549 348 -328583 115964 116810 54 -326410 100961 56049 9 -216766 20669 43176 32 -151295 43308 43176 32 -213517 4441 8956 7 -301639 75939 84235 111 -201756 48855 23287 50 -160806 14884 23287 31 -333708 93336 8072 9 -294237 22478 8072 11 -257743 33104 24251 6 -286709 96420 21977 11 -152684 51514 21977 9 -305640 95985 15397 11 -73303 11332 15397 11 -203975 66057 67451 12 -70499 102052 67451 41 -223446 66901 66323 39 -143239 102143 66323 27 -14624 7158 51454 68 -366416 102888 17144 101 -297673 44178 17144 82 -301699 76406 84656 38 -169062 62507 84656 36 -322382 82824 8408 7 -69600 84439 8408 26 -203348 61115 73819 82 -68966 73806 73819 95 -205028 73806 59610 69 -154171 61180 59610 47 -170131 69836 20838 15 -44027 15077 20838 8 -301675 76183 83954 70 -83961 76316 83954 65 -228927 97076 75592 61 -171321 83837 75592 73 -321170 76488 82468 48 -69535 83124 82468 147 -215539 14901 81329 59 -147534 20633 81329 47 -225580 81036 12900 11 -90891 28236 12900 11 -309812 3398 88659 8 -21041 108748 9499 128 -56348 73596 4241 47 -335448 8114 82793 113 -299606 60292 82793 75 -245273 82693 40236 26 -150319 38000 40236 48 -365756 96150 9399 9 -283559 81867 9399 30 -373847 14979 7821 8 -268840 101629 7821 8 -135898 36701 22083 27 -14309 117161 22083 27 -367362 11269 23609 26 -324499 93011 23609 7 -38265 28128 75986 39 -175830 10637 54418 13 -184597 66681 10563 46 -195491 10522 26065 9 -137466 46053 26065 6 -268858 101733 37223 24 -169740 67028 37223 14 -203525 62499 63169 30 -100292 106997 63169 32 -242404 64366 64893 42 -157959 106995 64893 37 -188706 90167 57989 9 -151036 42025 57989 6 -203957 65941 42870 19 -114454 102026 42870 30 -306895 101734 64300 36 -122296 41975 64300 39 -239730 43019 65216 19 -172390 103967 65216 20 -281296 66141 67400 31 -128630 95291 67400 33 -200852 40663 28624 12 -128990 101941 28624 25 -268927 102131 102043 17 -156006 73585 102043 17 -301320 73585 65446 6 -129006 102145 65446 11 -307606 106215 52632 30 -111321 62894 52632 21 -267223 94361 5735 7 -141736 72992 5735 8 -306691 100664 11505 10 -168955 61753 11505 7 -201711 48576 96035 7 -172218 102102 96035 8 -287966 102102 102118 8 -97366 66673 102118 8 -306974 102177 66519 8 -114463 102115 66519 8 -266809 92462 53825 5 -74134 16298 53825 4 -196567 16298 52003 5 -91327 30471 52003 9 -218484 30471 12763 18 -111495 63914 12763 13 -204831 72274 20051 22 -64140 44294 20051 13 -220522 44294 52179 15 -128588 94487 52179 14 -288046 102498 82947 134 -171707 92526 82947 81 -262415 67724 43384 39 -62925 37591 43384 54 -166818 49974 25959 122 -31544 35048 25959 68 -187223 83055 6279 56 -69571 83710 6279 33 -322514 83710 83829 14 -128077 83640 83829 13 -226105 83711 3727 26 -83954 76180 3727 29 -329423 12875 96386 20 -187392 84102 96386 17 -226094 83658 6770 5 -187956 86920 112466 59 -210774 102516 9562 115 -161933 21120 9562 120 -278087 39441 111916 36 -264180 79863 78997 217 -226264 84806 93148 130 -333392 90377 25205 9 -203946 65879 25205 8 -351955 80296 29300 8 -218437 29965 29300 9 -296821 37943 101159 34 -112718 72060 101159 144 -354574 5362 33413 53 -266521 91119 33413 9 -304629 91383 45952 6 -60632 23481 45952 8 -192897 112050 79527 25 -186307 78596 77286 19 -291803 9560 77920 56 -193215 114134 58371 8 -98767 80254 58371 7 -106140 31086 70859 118 -16968 31386 70859 119 -332719 80887 28170 9 -31003 28630 28170 9 -197121 18805 21987 72 -63404 40262 21987 40 -82214 63087 59380 42 -41682 68399 59380 100 -118879 21841 46650 38 -25084 43437 46650 39 -232415 959 77287 59 -304184 89293 10712 63 -58280 10245 6282 89 -47067 48512 6282 73 -183776 60609 2250 9 -281571 68270 10737 48 -226108 83716 62873 43 -187206 82972 83316 13 -274196 16726 51087 13 -283988 84036 83381 49 -282985 78706 79338 26 -340224 94398 71507 9 -216152 17670 71507 10 -101828 5833 1588 11 -3309 40640 1588 10 -372436 100989 14180 8 -30747 26214 14180 10 -131554 10336 24163 47 -55755 65851 24163 48 -344745 57626 56522 8 -279883 54415 56522 5 -193384 115335 8572 10 -17397 37763 82469 7 -281158 65023 74010 6 -171536 88895 74010 7 -177581 19187 45014 7 -73429 12041 45014 6 -365244 91083 20071 12 -48174 61904 20071 11 -308555 112588 8573 135 -68593 71581 38881 57 -45526 30137 38881 57 -333647 92724 25401 8 -29871 17826 25401 8 -269667 107151 117360 44 -24008 29529 13542 9 -339923 91450 48242 11 -22961 19376 48242 9 -363711 55842 12232 50 -325917 98663 12232 11 -65272 50158 56772 132 -46268 40148 56772 130 -249160 100580 70864 35 -185335 71902 13656 8 -219103 34216 57626 8 -189653 94287 11255 8 -117186 11757 11255 7 -182792 52741 52875 64 -99483 95611 52875 45 -92720 40018 32724 59 -39578 43943 32724 59 -339861 90905 28630 8 -256803 26701 28630 8 -345099 68359 62276 8 -175736 10039 62276 10 -298802 53545 92892 112 -151449 44269 92892 15 -234301 11739 3614 11 -265074 84256 3699 36 -226019 83125 45947 52 -85058 100183 45947 24 -249054 100183 75476 10 -127769 76110 75476 19 -309106 116441 7143 28 -156579 83588 7143 33 -303047 83588 103985 30 -113623 84794 103985 35 -265160 84794 101327 31 -154068 60379 101327 34 -322448 83334 98279 55 -283950 83775 3728 124 -328102 112624 87458 12 -327380 107357 32638 214 -230652 106421 42028 62 -142785 93403 42028 71 -243866 75076 5094 19 -306279 98768 53195 58 -157252 98369 45164 86 -41121 60549 45164 45 -329682 16110 50962 127 -22892 18751 50962 160 -369438 42534 20651 9 -17464 38720 20651 11 -207974 90144 37320 10 -125586 60982 37320 10 -213602 5021 112990 9 -7451 5454 79528 45 -63893 43003 26673 9 -3804 45620 26673 10 -342731 19322 51598 7 -304458 90514 51598 7 -106617 34882 65732 57 -2888 35710 65732 57 -377655 89535 72002 12 -2995 37297 72002 10 -372415 100758 41626 12 -29550 14066 41626 11 -128910 100820 70078 82 -13235 71756 70078 48 -334034 96316 22117 7 -291643 8773 22117 7 -200930 41242 46487 69 -82314 63765 46487 136 -332622 79818 15738 10 -29490 13140 15738 11 -228571 95671 48650 9 -72783 7508 48650 9 -345625 81275 9715 12 -11356 49118 9715 10 -345588 80929 42854 8 -44760 22646 42854 9 -264057 79235 4192 4 -214695 11239 76246 11 -77646 35813 5253 32 -43820 12830 5253 21 -287507 100000 61989 34 -159653 7126 61989 40 -331635 50575 6359 19 -46921 47073 6359 14 -124412 53884 22830 50 -47977 59561 22830 49 -322505 83645 64217 47 -32541 45874 8562 18 -263591 76333 560 210 -271111 117662 85931 12 -195494 10537 91851 51 -44514 20330 110746 51 -280462 59041 65132 104 -80510 53028 65132 42 -282616 76101 83645 54 -327522 108290 41023 170 -125591 61002 41023 138 -355441 17496 49399 6 -41967 71754 49399 6 -73899 14928 15343 6 -53513 41609 15343 6 -166222 46379 69735 39 -4674 54796 69735 39 -282801 77447 85670 145 -262612 69103 85935 158 -212964 783 129 206 -174077 1075 78693 92 -183634 59121 92488 134 -170120 69775 92488 128 -168792 60792 43733 11 -54102 47585 43733 7 -318345 55564 696 21 -6336 76406 32050 71 -153210 54834 66481 40 -18977 54500 66481 39 -99387 93961 45676 149 -18334 47387 45676 99 -286269 94489 59080 145 -171850 95488 59080 132 -211716 109291 102120 33 -157559 103495 102120 143 -298300 49495 67470 128 -85750 108264 67470 30 -29252 10774 24239 150 -281115 64723 80992 52 -148853 27866 80992 55 -27503 70814 71813 18 -341628 2857 46897 83 -245038 81682 46897 100 -244492 79179 29370 9 -68070 68141 29370 81 -256765 26500 70468 12 -170164 70049 70468 10 -59561 17830 41343 68 -11073 46159 41343 28 -2308 28878 40703 107 -267040 93544 52084 10 -108860 48321 52084 25 -232970 4106 91977 101 -207682 88838 11810 90 -93570 44678 11810 102 -377382 85671 88354 52 -328439 115168 88354 53 -377360 85437 114668 94 -20749 85938 114668 115 -346594 94249 92735 65 -322741 85051 112997 145 -88813 17341 112997 169 -320359 70407 2498 49 -35059 76881 117367 18 -303169 84504 8409 80 -105609 28440 41560 100 -31176 30286 41560 82 -379484 115542 112999 112 -50971 14671 112999 113 -368085 20155 110759 107 -57313 116362 110759 113 -330061 20660 91162 83 -240642 50128 91162 58 -208114 90706 35088 7 -147553 20725 35088 10 -202658 56055 11973 153 -139676 59380 11973 188 -98869 82536 39001 237 -12883 66676 39001 87 -318004 52475 52913 42 -110591 58870 52913 39 -365391 92507 50125 7 -19594 61019 50125 8 -340188 94105 44546 8 -47671 55838 44546 6 -254035 12731 23248 6 -60671 23761 23248 7 -340692 99026 19711 10 -43814 12788 19711 9 -365944 97949 14936 28 -293965 20788 14936 7 -110785 59847 46804 131 -48222 62535 46804 130 -377722 90179 17731 9 -38480 30270 17731 32 -77962 38689 48114 64 -39681 44789 48114 63 -91823 33474 42753 59 -5455 63769 42753 48 -378291 95290 70263 49 -227709 92029 70263 9 -338671 67306 16366 71 -277548 35900 16366 9 -344278 46589 61887 7 -230352 104083 61887 7 -105725 28998 18233 49 -6143 72643 18233 48 -339490 86449 36449 11 -315098 32151 36449 13 -190131 96297 16935 9 -148718 27089 16935 12 -307405 104617 12395 9 -152973 53300 12395 8 -108888 48496 25756 33 -18277 46869 25756 34 -346479 93005 81954 25 -280906 62923 81954 52 -249499 102265 65962 36 -91351 30621 65962 51 -276688 30621 40802 64 -158337 110346 40802 50 -359371 94427 94372 123 -192672 110346 94372 69 -276160 27188 11151 21 -342081 11810 28878 90 -190064 96033 28878 34 -209308 95794 54786 26 -113394 80057 54786 73 -137933 48779 5512 53 -53766 44553 5512 54 -182884 53519 93659 49 -163422 29178 93659 43 -137650 47202 27494 83 -54781 54843 27494 84 -205098 74404 38029 13 -111134 61909 38029 14 -82619 65926 40617 25 -25377 46116 40617 44 -333614 92376 72483 10 -51786 22784 72483 9 -368997 34108 46982 10 -282073 71976 46982 9 -336797 25787 39716 11 -214450 9525 39716 10 -354811 9462 4778 11 -283647 82213 4778 10 -227953 93003 16190 100 -110609 58955 16190 40 -62024 30941 64357 85 -34610 70293 64357 87 -97321 66338 72888 201 -15351 16190 72888 149 -237754 29169 81323 101 -126057 63754 81323 18 -286646 96092 64623 12 -379343 111466 115239 114 -250572 109619 115239 85 -251089 113372 103714 58 -72264 116975 103714 90 -128060 83111 6283 23 -34927 74106 6283 25 -142619 89856 76396 41 -47519 54080 76396 13 -315750 35894 12698 110 -165628 43233 12698 110 -205336 75984 100413 108 -109614 53077 100413 85 -285262 90055 48352 9 -60027 20414 48352 73 -190470 97811 55959 47 -168370 58542 55959 47 -214205 8376 84725 68 -248709 98767 26112 10 -170635 72768 26112 9 -155929 73002 47524 39 -11645 52071 47524 39 -338753 69797 74620 69 -88467 15456 8471 47 -6355 76728 8471 48 -186803 81185 50173 77 -64489 45961 50173 78 -79021 44660 28346 132 -10794 43592 28346 134 -326930 103756 98972 64 -160096 10009 98972 61 -277428 34835 96578 86 -140806 66624 96578 28 -365225 90921 67822 9 -296552 36421 67822 8 -347055 98434 16855 10 -2035 26373 16855 9 -7697 9723 45550 54 -147758 21801 47895 134 -16676 28634 47895 133 -334140 97303 208 11 -47565 54692 208 10 -359898 99637 53320 8 -326340 100640 53320 15 -97112 65054 60339 37 -203845 65054 73930 39 -113934 91563 73930 44 -367044 5231 18746 10 -230081 102604 18746 10 -156032 73817 11139 51 -17739 41371 11139 41 -348570 12871 18212 8 -286675 96242 18212 10 -107601 41225 68478 106 -30222 21246 68478 104 -105759 29212 62812 105 -34154 63587 62812 104 -332519 75033 28860 10 -175628 9411 28860 8 -182767 52494 100529 70 -127775 76189 100529 30 -372453 101178 48171 7 -176350 13097 48171 16 -345603 81047 8142 5 -256531 25442 8142 42 -218593 31417 48697 261 -77682 36149 48697 151 -346081 89016 88044 38 -268878 101833 88044 20 -339692 89439 101827 49 -308044 109109 101827 34 -327834 110740 115842 29 -85312 103800 115842 34 -210652 101831 109108 17 -99136 88691 109108 102 -225776 81911 51046 9 -62222 31831 51046 9 -185488 73216 43539 78 -157135 95953 43539 49 -214082 7706 12522 98 -139563 58706 12522 66 -237574 27976 46116 75 -150482 38967 46116 84 -277586 36116 28396 27 -288005 102341 11616 11 -75847 25140 11616 30 -237504 27476 32847 59 -148933 28209 32847 36 -340520 97373 47387 11 -229176 98141 47387 76 -228270 94381 44476 7 -166277 46594 44476 20 -167652 54482 72804 132 -38847 35064 72804 132 -376592 66108 24484 16 -177665 19625 24484 8 -212685 116695 85671 74 -173430 113577 85671 72 -301759 76900 117375 7 -212094 112334 83244 36 -124460 54140 73827 38 -359020 90699 62853 8 -10459 40084 62853 57 -199066 29119 65135 43 -128338 89624 65135 14 -137483 46162 72272 5 -34464 68388 72272 11 -194136 2611 79002 14 -244423 78866 2923 9 -95290 54117 11480 134 -39995 48029 11480 132 -345732 82283 79727 8 -56256 72329 79727 6 -297403 41984 64546 19 -70352 99803 64546 43 -359246 93158 28273 60 -39577 43941 28273 62 -371163 87664 51085 11 -264229 80144 51085 55 -32281 43374 86235 12 -245505 84222 96237 62 -43188 1545 69996 9 -263589 76326 84514 84 -358235 79495 58443 10 -225362 80221 58443 16 -333655 92833 51514 9 -44814 23218 51514 8 -359122 91847 9588 9 -47261 50926 9588 9 -136889 43062 15150 82 -17344 36709 15150 119 -336504 22016 36709 108 -228153 93937 36709 78 -345883 86102 117376 66 -13776 105999 117376 259 -350497 42173 42726 16 -211650 108776 42726 10 -189100 91671 20130 8 -75205 21987 20130 40 -169528 65461 20607 138 -40983 59073 20607 139 -238404 34069 13595 9 -109211 50627 13595 8 -205030 73816 59608 29 -141865 73992 59608 32 -205037 73904 74121 96 -110631 59042 74121 49 -273160 11912 65450 41 -112999 73800 65450 34 -127514 73753 67826 20 -269706 107401 43339 59 -67531 63939 43339 62 -281217 65457 110459 33 -69899 90520 110459 67 -185806 75451 29526 17 -170559 72278 29526 18 -181770 45585 65124 20 -165484 42405 65124 8 -279658 52777 67397 33 -172868 108912 67397 35 -240264 47704 42926 32 -70863 105358 42926 17 -288488 105358 102060 31 -157005 93138 102060 25 -362278 25411 42640 10 -267488 95557 42640 8 -124471 54191 18344 83 -33781 59280 18344 83 -12495 61464 47675 62 -335093 115571 67416 10 -314728 29145 67416 53 -351210 60065 44770 10 -322278 82369 44770 11 -350830 50015 14593 9 -2046 26506 14593 24 -228250 94307 33760 29 -134374 26980 33760 118 -202196 52222 59550 21 -69526 82957 59550 27 -203655 63389 102261 25 -140494 64437 102261 32 -223166 64437 108263 44 -156436 80600 108263 37 -240896 52162 73652 27 -114075 94307 73652 42 -249540 102455 41874 14 -152745 51897 41874 24 -360015 100599 26028 11 -257567 32114 26028 51 -191496 102371 2721 12 -120437 30282 2721 25 -306263 98697 15692 13 -72734 7111 15692 13 -335943 15343 21598 7 -38723 32347 21598 6 -374342 20607 22499 139 -302439 80662 22499 8 -288261 103746 115254 38 -129525 107735 115254 57 -226511 86106 114689 114 -115326 110909 114689 115 -365053 89351 114690 59 -246600 89436 114690 68 -358153 75324 17102 8 -275497 24120 17102 7 -286892 97191 23866 8 -94610 50328 23866 10 -304627 91372 6700 8 -167122 51481 6700 138 -359054 91045 26373 9 -175583 9226 26373 8 -332026 61302 45472 10 -287193 98510 45472 10 -345729 82271 28756 11 -221946 55443 28756 11 -339303 81970 29649 11 -271847 4496 29649 11 -352151 82121 59952 9 -216717 20415 59952 8 -245109 81994 25113 10 -60805 24439 25113 10 -268196 98823 70873 9 -59065 15096 70873 9 -64274 44890 11298 44 -5331 62195 11298 44 -352721 91158 9113 8 -175915 11125 9113 8 -141353 70749 26419 46 -39009 37147 26419 44 -64049 43939 23767 45 -41860 70581 23767 45 -370753 80926 9984 11 -280464 59057 9984 10 -339615 88142 88968 16 -298150 48589 88968 27 -366644 108907 9262 12 -270901 116243 9262 36 -204947 73140 37399 40 -103143 15027 37399 43 -298381 50081 53276 9 -165675 43532 53276 26 -319004 60749 102045 242 -99611 97925 102045 19 -377146 81343 72258 43 -25187 44409 72258 43 -365507 93737 43359 7 -11552 51146 43359 7 -49053 73837 87741 12 -242268 63402 49163 5 -37685 22620 58820 52 -334593 101857 113508 101 -308666 113422 113508 114 -377044 80358 97320 140 -35174 93097 97320 179 -231427 111777 85938 115 -86592 116464 85938 115 -209586 97150 9723 56 -138069 49835 9723 77 -179752 31975 2586 22 -96591 61665 2586 47 -258842 39669 56979 69 -171660 91507 56979 126 -248980 99823 51949 133 -93192 42613 51949 186 -369463 43362 27066 7 -179147 27322 27066 5 -297841 45957 30999 6 -117692 15151 30999 7 -93622 44881 51857 131 -46949 47270 51857 130 -359296 93582 25573 10 -8077 14241 25573 9 -78116 39722 19050 132 -38831 34847 19050 131 -347388 102107 67930 10 -23724 26945 67930 9 -373577 11740 30162 8 -189859 95183 30162 7 -349688 26614 17869 7 -248074 95857 17869 6 -153306 55364 18774 63 -54145 48082 18774 62 -97956 71027 46984 5 -189914 95421 38039 7 -116669 8427 38039 8 -314137 25754 20331 69 -117681 15054 20331 60 -360684 117508 98100 157 -121975 40286 93597 21 -190750 98970 12706 12 -107696 41809 12706 12 -343228 26440 25755 6 -174514 3158 25755 7 -224153 72159 70634 93 -136178 39003 70634 107 -356250 28352 58398 17 -304464 90545 58398 7 -210343 100282 62323 8 -103009 14201 62323 8 -127540 73936 50822 81 -5722 67897 50822 65 -282303 73936 54184 40 -70124 94589 54184 27 -362644 31197 69066 10 -187064 82353 69066 10 -358498 82162 90477 91 -224292 73189 90477 67 -185560 73643 66669 40 -99482 95605 66669 27 -128404 90975 30499 86 -19670 61823 30499 74 -231593 112882 56379 21 -350729 48068 114696 77 -20694 77547 114696 85 -378687 98860 72329 6 -312947 19642 72329 7 -283446 81273 15483 7 -73574 12852 15483 8 -163816 31167 24393 42 -19244 57280 24393 43 -298839 53892 43551 22 -165666 43469 43551 25 -239118 38362 101284 16 -67660 64819 101284 15 -222797 61802 73402 72 -168961 61781 73402 27 -217841 26622 20616 4 -96767 62791 20616 18 -241775 59690 89443 60 -126539 67434 89443 60 -185547 73590 52243 108 -82692 66392 52243 116 -345629 81313 39503 12 -23183 21899 39503 24 -358398 81267 8366 90 -32386 44482 8366 89 -282146 72578 80072 85 -76777 30158 80072 29 -373282 6700 19243 137 -10210 35999 19243 136 -344956 62979 24968 11 -282694 76687 24968 10 -359414 94839 22772 180 -235933 19457 22772 150 -371595 92652 23981 87 -317677 50300 23981 140 -341980 10103 16973 7 -202308 53297 16973 6 -182965 54207 80411 15 -59114 15367 80411 13 -260515 53249 73815 18 -113001 73821 73815 29 -243655 73821 52830 26 -125490 60365 52830 16 -378014 92685 27011 4 -201363 45874 27011 5 -250480 108950 73600 30 -96941 63696 73600 25 -280991 63696 65365 26 -128709 96832 65365 30 -222866 62204 48384 52 -105142 25910 48384 130 -332203 66214 27529 11 -283614 82083 27529 12 -345572 80814 11757 6 -31846 39102 11757 7 -155098 67167 65084 35 -223484 67167 64743 40 -172210 102005 64743 116 -282323 74085 43352 26 -109777 54020 43352 23 -249796 103868 96568 58 -66723 59103 96568 76 -221606 52604 53004 60 -121475 37350 53004 10 -346816 96104 97076 69 -238930 37350 97076 52 -128392 90649 60814 72 -3925 46567 60814 71 -197332 19750 70190 64 -152929 53017 70190 64 -379498 115871 87747 110 -57119 113966 87747 158 -339441 85737 105531 68 -212760 117264 105531 183 -262067 65044 75828 42 -132973 19201 75828 17 -365104 89873 32392 163 -312869 19201 32392 45 -346131 89695 61796 7 -37178 17491 61796 8 -336619 23607 22097 8 -306764 101015 22097 9 -345717 82163 72580 8 -10074 33179 72580 8 -374954 28587 34718 7 -286432 95123 34718 7 -221930 55241 73986 26 -121038 34368 73986 78 -354929 11569 93672 80 -312527 17712 41719 157 -330997 34420 57766 159 -263073 72630 57766 189 -251032 112947 87745 83 -319310 62962 82425 36 -66846 59905 82425 30 -377572 88259 9081 12 -11866 54786 9081 17 -344054 39848 33352 27 -5169 60616 33352 108 -352042 81221 22399 9 -43996 14774 22399 8 -148012 23162 24828 63 -26570 59271 24828 62 -342682 18770 9520 7 -299732 61358 9520 6 -235044 15255 17898 6 -133015 19519 17898 7 -81097 56407 19044 130 -40931 58471 19044 130 -202764 56767 67978 69 -134667 28491 67978 104 -333382 90296 47441 9 -38212 27671 47441 11 -354498 2721 56445 13 -180172 33981 56445 10 -307700 106800 114704 43 -339676 89163 86848 13 -6429 83608 86848 13 -315239 33122 70697 65 -169813 67635 70697 119 -24289 32129 22268 17 -213627 5132 18049 95 -76891 30670 18049 46 -334402 99874 54612 7 -26297 56291 54612 9 -351718 73257 22807 12 -209153 95090 22807 12 -334822 107524 28275 36 -137587 46872 19913 59 -19213 56819 19913 60 -212390 114249 88670 12 -328215 113453 83768 121 -356359 31137 93203 51 -255775 21284 52431 31 -110694 59379 52431 38 -315970 37078 87748 6 -185576 73832 99675 38 -140584 65037 99675 5 -89510 20860 32865 133 -19577 60785 32865 132 -318048 52917 73836 9 -70626 103460 73836 7 -203831 64937 58278 73 -126503 67071 58278 28 -340483 96867 11880 92 -220912 47614 11880 106 -371912 95605 42608 41 -314600 28196 42608 30 -302326 80194 70958 99 -83725 73662 70958 67 -25283 45267 112497 74 -248951 99760 40940 12 -72827 7833 40940 9 -374165 18577 18430 8 -15820 20631 18430 8 -59584 17961 44653 52 -53518 41719 44653 125 -366915 294 23180 59 -33509 56284 23180 8 -358230 79395 60541 90 -55187 59035 60541 90 -316827 43380 94476 119 -123581 49253 94476 94 -115378 111291 114700 91 -31562 35244 114700 130 -327897 111291 109713 69 -172306 103228 109713 33 -265292 85484 111946 253 -113658 85697 111946 71 -371308 89605 37214 10 -176786 15360 37214 9 -345850 85597 26463 12 -285149 89608 26463 52 -118752 21211 82162 47 -16793 29620 32489 34 -307632 106365 102174 26 -68924 73486 102174 31 -185531 73486 91029 56 -165017 40025 91029 69 -200241 36363 23975 6 -147156 18552 23975 44 -323528 88748 117390 25 -95312 54250 15238 9 -5191 60810 15238 12 -324331 92284 47234 47 -165620 43170 28503 31 -14419 2185 28503 26 -326246 100118 35839 21 -107911 43443 35839 13 -279622 52533 53006 17 -77867 37942 53006 28 -316104 37942 53392 24 -80773 54646 53392 30 -372403 100639 63305 5 -260529 53349 63305 2 -262011 64619 75830 38 -165843 44403 75830 58 -12616 62859 28794 102 -257074 28070 102256 17 -77831 37582 102256 48 -301364 73941 74125 106 -168490 59142 74125 37 -206677 83380 76127 88 -70576 102931 76127 32 -288153 102931 102288 36 -146370 13709 102288 60 -78640 42518 55704 39 -52483 29236 55704 40 -49230 83610 78107 11 -219825 38435 2482 112 -297211 40677 74183 52 -240839 51702 105523 43 -70479 101929 105523 36 -123540 48892 32272 69 -9858 31101 32272 69 -317981 52374 9680 68 -127764 76004 9680 21 -82365 64096 6687 67 -18657 50852 6687 66 -220606 45073 67452 37 -172638 106486 67452 36 -204442 69419 11302 40 -110267 56923 11302 48 -299206 56923 22549 36 -112831 72840 22549 42 -320683 72840 28352 33 -122259 41788 28352 30 -220243 41788 37675 57 -142727 92001 37675 69 -352701 90915 39267 46 -41140 60802 39267 46 -331712 52404 101352 10 -213962 6895 101352 6 -173765 116660 78610 34 -21616 117197 78610 33 -208690 93171 43765 8 -102439 10412 43765 9 -286541 95620 39742 8 -57512 2591 39742 10 -95732 56561 24479 45 -37860 24401 24479 44 -345451 79125 23482 9 -26424 57664 23482 52 -370192 64023 41839 8 -206068 80360 41839 7 -66157 55373 40630 91 -50609 9907 40630 90 -330384 25113 57885 10 -208777 93495 57885 10 -338701 68180 117790 10 -15009 12031 117790 10 -343690 33608 29585 9 -51539 20123 29585 9 -361756 18719 12635 50 -235106 15543 12635 10 -166480 47652 31490 133 -3079 38575 31490 133 -153941 59708 27423 66 -39395 41758 27423 65 -341588 1911 33337 53 -258076 34585 33337 10 -367567 13942 32765 16 -257365 30292 32765 14 -131726 11764 44588 56 -17871 42943 44588 56 -112925 73189 106276 148 -56347 73538 106276 219 -304724 91851 59792 12 -136067 38133 59792 50 -28632 115659 114092 19 -365938 97901 46938 13 -22372 13247 46938 13 -273823 15054 25922 80 -139090 55832 25922 55 -196739 17137 44217 26 -102923 13725 44217 65 -203746 64285 96999 69 -150278 37696 96999 155 -162346 23553 18577 8 -39768 45678 18577 7 -241854 60297 36470 8 -99522 96315 45004 40 -39527 43295 45004 18 -151541 44799 28158 208 -47481 53479 28158 172 -267046 93559 70348 124 -90506 26148 70348 139 -203689 63765 96758 129 -76374 28117 96758 128 -284661 87142 105979 143 -85863 109560 105979 214 -54157 48218 1213 55 -239140 38557 19082 27 -73422 12008 19082 26 -253859 12008 70777 14 -122570 43518 70777 44 -181547 43518 38421 43 -107028 37955 38421 28 -152501 50357 100668 105 -98328 73333 34928 90 -12378 60078 34928 142 -342284 14125 44195 94 -283340 80768 44195 183 -107971 43767 14843 40 -45666 31617 14843 43 -353613 99679 31636 10 -218185 28334 31636 9 -344537 51949 40159 131 -326328 100594 40159 6 -335322 5752 79859 55 -95240 53941 19777 67 -52580 30052 19777 68 -339907 91301 22368 4 -258871 39881 22368 4 -217425 24692 56517 5 -135800 35800 56517 4 -157389 101110 53453 61 -20834 98141 53453 88 -278158 40084 100427 75 -83913 75722 100427 43 -251135 113655 114710 163 -71631 111893 114710 115 -269361 104825 110804 95 -144681 115348 110804 199 -352640 90276 64125 10 -56088 70697 64125 36 -33571 56979 14769 94 -79179 45387 13681 94 -20416 72058 13681 93 -155268 68745 93097 180 -35190 97320 93097 179 -267516 95690 40023 11 -105585 28331 40023 13 -153707 58323 93062 18 -42374 92621 93062 26 -126604 67916 14067 160 -46256 40068 14067 121 -108594 46744 89944 38 -20725 82815 89944 110 -77108 31653 22619 35 -52577 30039 22619 34 -285988 93184 23940 9 -67738 65539 23940 19 -340635 98395 72612 9 -4180 49120 72612 10 -15025 12185 28174 82 -370939 82801 6865 9 -55304 60240 6865 34 -336741 25130 22715 9 -34104 62972 22715 11 -327538 108376 88365 8 -273111 11641 50336 26 -140623 65391 50336 20 -300024 63728 102258 28 -111425 63539 102258 39 -263193 73606 66081 20 -155076 66974 66081 19 -289214 110693 115279 95 -126694 68632 8621 146 -26954 63217 8621 148 -377967 92353 40843 11 -43162 118 40843 12 -285595 91471 44719 9 -154811 65284 44719 10 -260757 55087 33615 5 -165602 43005 33615 9 -171224 81859 51930 68 -9027 23203 51930 11 -366673 110804 106003 96 -14268 116695 106003 112 -220168 41195 89567 133 -126047 63681 89567 93 -359704 97859 12067 8 -51084 15932 12067 6 -273802 14990 17971 5 -118016 17108 17971 6 -370758 80960 15291 10 -328 9113 15291 8 -281789 69756 73826 32 -124423 53923 73826 30 -182931 53923 73557 17 -143302 102994 73557 13 -229085 97706 37360 7 -169281 63792 37360 17 -319638 65252 94069 221 -59232 15940 94069 78 -109801 54082 22537 33 -5585 65628 22537 33 -331281 41119 15606 10 -244761 80476 15606 8 -285695 91953 9945 16 -127557 74076 9945 20 -254883 16884 14682 4 -92264 37270 14682 5 -334278 98750 32825 9 -44661 21705 32825 9 -271281 1040 79339 5 -196457 15807 49159 99 -228942 97121 23607 9 -81209 56953 23607 9 -268125 98477 52664 9 -57446 142 52664 10 -179853 32651 72759 137 -133437 21855 72759 7 -259386 44151 99948 93 -131969 13272 99948 114 -346908 96890 24713 10 -247402 92826 24713 24 -227820 92485 7465 10 -130952 5751 7465 10 -180770 37769 37674 21 -69925 90999 37674 27 -117847 16159 80188 6 -326795 102907 49978 16 -99703 99661 49978 34 -164716 38138 53713 56 -11329 48702 53713 18 -268446 99884 13590 10 -87741 11015 13590 54 -298575 51689 94153 54 -82334 63912 94153 50 -224375 73812 43141 17 -333300 89636 19417 9 -254462 14795 19417 10 -362772 33246 25254 11 -196451 15763 25254 10 -286751 96616 26724 9 -74780 19812 26724 49 -271371 1598 50969 20 -238110 32306 53402 57 -65785 53267 53402 28 -260387 52429 59027 91 -65701 52839 59027 40 -243672 73954 58741 34 -170780 73944 58741 16 -345760 82608 26229 7 -4471 52278 26229 9 -195468 10407 72332 39 -58195 9878 94525 52 -223997 70850 94986 65 -90126 24284 94986 89 -114126 95417 43586 67 -651 12609 43586 50 -369202 37515 55925 8 -267467 95436 55925 11 -346692 95109 72173 6 -240523 49254 72173 61 -318089 53246 90763 35 -75041 21039 90763 32 -99598 97727 30854 51 -22135 10402 30854 38 -200399 37362 89873 136 -133136 20148 89873 235 -142829 94463 23160 149 -21604 117027 23160 67 -375903 48954 20586 11 -326682 102382 20586 10 -137794 48006 25010 41 -34678 70942 25010 41 -108713 47389 29299 42 -41079 60117 29299 42 -170531 72118 15727 43 -25576 47885 15727 42 -277881 38189 18197 9 -57489 2088 18197 69 -216845 21141 65767 73 -126252 65003 43969 77 -39300 40802 43969 102 -300185 65003 92936 28 -121094 34877 92936 27 -179813 32493 52838 26 -67613 64498 52838 69 -223172 64498 94427 124 -119871 27188 94427 81 -376481 63072 24260 9 -299863 62416 24260 9 -309837 3489 57009 94 -262018 64722 68931 67 -337964 49343 40296 131 -23765 27339 40296 76 -330982 34226 51146 8 -195660 11489 51146 6 -218076 27807 54704 81 -68931 73531 57199 35 -4689 54933 57199 33 -186310 78620 86540 129 -264368 80659 10611 28 -204477 69655 698 28 -282387 74498 58579 36 -168396 58619 58579 35 -174830 5204 116343 32 -87424 8704 116343 51 -261218 58740 96589 47 -103938 19278 96589 44 -195525 10719 85211 115 -143485 104637 85211 191 -211110 104637 67107 140 -84297 85004 67107 45 -251186 114035 86247 216 -144611 114791 86247 170 -213058 1452 37547 42 -156726 87440 37547 86 -322291 82417 60171 183 -71231 108753 60171 226 -322251 82286 88053 52 -131322 8951 88053 33 -279634 52623 113032 70 -84316 85452 113032 67 -214267 8704 8693 186 -241280 55498 1198 18 -69299 76832 1198 23 -329139 8701 107908 49 -327034 104555 107908 31 -263669 76852 108140 93 -71088 107469 108140 88 -266268 89856 49825 37 -114579 103710 49825 20 -346972 97520 11239 39 -252525 4748 11239 12 -305111 93533 309 11 -115964 116493 309 129 -270033 109593 8672 73 -71078 107413 8672 68 -378537 97507 31307 6 -44747 22549 31307 25 -6830 111097 113029 23 -171939 97228 59972 94 -3536 43237 59972 64 -113818 89260 115870 109 -13985 112396 115870 115 -176409 13413 114117 116 -126144 64290 114117 115 -212354 114059 115871 109 -173349 112948 115871 88 -356605 34407 106965 40 -212334 113966 106965 107 -49223 83165 67124 97 -213260 2695 77766 42 -171267 82670 84515 23 -56550 86784 84515 23 -214043 7502 96959 46 -116587 7830 96959 24 -195016 7830 83446 20 -70146 95081 83446 34 -318937 60216 65051 418 -156928 91612 65051 396 -327504 108139 108135 63 -128191 86275 108135 28 -347519 104180 85677 94 -211527 107694 85677 68 -329837 17995 30556 101 -249339 101318 30556 106 -237562 27830 29949 48 -106857 36557 29949 55 -300565 67732 60226 32 -139627 59122 60226 26 -59931 19840 17995 170 -49538 107694 17995 43 -275099 21425 23009 61 -107444 40440 23009 60 -130172 113615 88373 50 -42529 105142 88373 46 -44759 22629 10767 6 -252574 5079 26118 66 -101495 117344 26118 97 -318398 56049 76059 36 -101892 6327 76059 68 -245588 84653 84376 100 -113999 92828 84376 115 -341668 4679 17670 10 -282118 72293 17670 9 -120849 32557 76465 66 -37144 17102 76465 15 -378519 97340 68296 73 -257641 32557 68296 124 -122912 45308 5833 10 -22382 13340 5833 10 -301925 77755 3200 294 -308787 114237 72757 38 -243969 75784 84377 32 -84258 84160 84377 27 -284013 84152 99732 64 -79509 47163 99732 39 -43322 5906 111383 33 -329018 6245 13230 9 -324200 91692 13230 11 -42459 104238 86857 114 -91513 31470 92818 139 -193861 728 77846 350 -205773 78780 2313 345 -377067 80524 16000 12 -215312 14005 16000 13 -349244 21112 59335 11 -285620 91563 59335 42 -52924 34850 49718 24 -83786 74336 75764 67 -31038 29004 75764 57 -125079 57955 12591 10 -37007 15861 12591 10 -226151 84015 36460 16 -106405 32572 36460 71 -322545 83944 83516 75 -302054 78583 77847 99 -184958 69069 3907 378 -264067 79267 34230 32 -303277 85193 113030 52 -17686 40905 10547 12 -252056 1987 3621 121 -321295 77369 1049 100 -282353 74313 1050 52 -302070 78685 1879 103 -238702 36024 66661 165 -242579 65740 79224 103 -242868 67871 77922 106 -186328 78764 36152 101 -262602 69071 3265 58 -281647 68872 2231 84 -204399 69070 3677 83 -223721 68873 77290 73 -280101 56285 33992 142 -99040 86778 62265 47 -39096 38702 62265 49 -289295 111310 1052 9 -290844 4114 1783 10 -31449 33113 115290 6 -193857 695 79225 114 -27861 76197 65892 70 -213515 4424 1888 40 -269312 104573 3266 139 -200321 36864 561 158 -280255 57570 78886 175 -248388 97430 2944 25 -232979 4181 37579 114 -207579 88423 111388 34 -248815 99199 55055 47 -212935 603 2234 316 -263191 73588 66428 29 -82526 65153 66428 42 -290378 1428 86859 53 -24404 34615 117404 11 -241727 59068 86246 38 -244239 77612 36187 169 -200773 39997 37775 102 -77636 35750 37775 60 -258844 39679 45595 78 -98774 80442 45595 44 -352855 92352 47373 10 -189009 91378 47373 26 -310440 7139 99539 37 -92126 35914 99539 17 -346211 90555 1996 103 -2643 31798 1996 11 -353352 97451 98264 61 -224680 76047 98264 93 -351813 75770 5769 63 -224148 72123 5769 35 -223792 69433 77769 62 -244584 79644 981 26 -224893 77461 88371 227 -183358 57229 913 172 -157224 97781 46617 70 -40092 49297 46617 28 -98805 80990 55585 72 -37424 20068 55585 48 -322551 83980 49392 59 -221716 53476 57682 82 -301460 74610 98958 55 -310384 6762 84793 7 -371668 93211 19052 9 -36685 12249 19052 10 -88825 17393 115292 21 -226121 83821 102444 185 -303213 84849 94301 64 -83214 70392 94301 48 -214460 9678 65981 50 -96954 63782 65981 82 -231046 108935 73502 54 -127504 73629 73502 61 -258078 34589 76859 27 -265061 84183 87181 13 -175602 9331 7841 22 -61206 26673 10039 11 -10482 40261 10039 9 -269889 108657 110815 8 -265099 84367 84091 7 -185695 74734 88678 48 -300962 70573 76402 24 -128068 83334 76402 37 -193742 15 3908 314 -251906 1074 982 94 -250109 106096 102224 76 -91784 33011 102224 61 -342119 12237 9801 111 -11827 54401 9801 66 -212873 246 4221 54 -333961 95649 47227 10 -174852 5288 47227 10 -111219 62293 43851 73 -34359 66404 43851 101 -378271 95142 7963 11 -17332 36527 7963 12 -254356 14298 2467 10 -265132 84619 5776 15 -209081 94858 77937 72 -184491 65955 101781 43 -84377 86770 101781 46 -282514 75319 43186 5 -92386 38066 43186 12 -49237 84661 78888 7 -179848 32626 58462 11 -356406 32284 34756 15 -9071 23575 34756 3 -251988 1582 1360 7 -279121 48652 53277 54 -231799 114605 62538 67 -251745 57 2012 14 -248079 95876 60866 10 -132968 19146 60866 4 -347617 107227 5777 11 -295771 32119 5777 10 -95879 57634 6777 21 -136756 42281 27339 46 -25485 46897 27339 78 -198798 27306 10661 34 -182732 52264 85437 50 -173479 114045 85437 94 -218360 29368 8685 115 -156385 78849 8685 111 -263726 77078 114125 58 -173166 111467 114125 74 -290409 1566 49237 105 -191274 101169 52415 34 -319731 65900 2687 75 -212136 112623 85438 24 -101427 116787 85438 27 -368290 23255 20622 9 -9872 31226 20622 12 -350128 34148 15859 24 -176358 13150 15859 51 -60656 23660 7546 8 -41195 61549 7546 59 -39899 47082 33621 9 -191064 100358 66405 62 -91314 30393 66405 50 -164010 32292 63057 55 -27629 71998 63057 55 -165453 42201 63185 151 -34823 72436 63185 150 -149082 29133 12045 131 -11733 53097 12045 132 -224436 74276 89283 900 -129608 108660 89283 427 -123162 46662 64092 39 -2710 32357 64092 40 -304428 90360 10490 22 -187746 85914 116859 291 -360005 100529 99649 33 -245582 84591 99649 60 -342402 15612 99763 205 -259286 43183 99763 48 -316123 38064 88682 52 -204036 66468 77375 88 -371557 92242 22494 22 -286843 97012 57050 10 -92416 38298 57050 18 -258634 38298 33482 36 -108898 48538 33482 29 -13552 84007 85435 12 -280265 57629 92248 31 -155077 66986 92248 39 -228127 93799 52926 17 -127542 73949 52926 18 -224390 73949 43142 39 -83777 74147 43142 30 -371558 92248 80866 39 -205047 73978 80866 36 -223461 66986 73935 26 -136084 38263 73935 29 -279734 53370 52739 24 -141872 74045 52739 14 -301348 73797 74100 8 -139920 60778 74100 9 -260566 53613 54026 9 -139778 59987 54026 12 -261356 59987 53841 20 -156987 92866 53841 22 -180525 36183 655 152 -325251 96070 43119 33 -290210 478 78891 143 -263252 74126 52859 19 -65767 53174 52859 10 -122725 44325 44068 30 -39937 47450 44068 29 -135589 34350 53193 54 -357785 64623 56169 63 -54143 48080 56169 62 -175452 8548 85442 43 -203167 59735 62770 11 -333443 90801 76893 55 -43634 10719 76893 48 -303061 83659 88056 45 -251136 113669 88684 9 -356547 33796 48487 115 -141 6098 48487 106 -301366 73953 43238 19 -70084 93798 43238 19 -91930 34544 67501 23 -186048 76997 48488 83 -72317 117482 48488 17 -361731 18352 31929 11 -54296 50039 31929 7 -205494 77202 77377 36 -184416 65488 3018 65 -302918 82778 90965 11 -271143 114 77378 7 -32095 41231 2522 31 -182865 53371 37930 21 -107067 38284 37930 36 -313102 20336 47867 59 -111891 66851 47867 58 -300444 66851 65248 28 -157900 106530 65248 34 -327269 106530 62311 41 -124147 52299 62311 26 -268910 102030 61735 10 -65598 52203 61735 17 -261590 61707 62013 38 -40124 49640 111389 18 -244679 80105 49291 55 -37719 23009 53857 61 -306087 97887 49108 36 -252436 4185 91186 15 -279182 49075 8681 6 -36644 11747 884 78 -128455 91883 24202 129 -2428 29849 24202 75 -335530 9405 65879 9 -247290 92371 65879 8 -117957 16720 31009 42 -10304 37856 31009 21 -345322 73946 18132 10 -39044 37670 18132 11 -341581 1636 48234 11 -195318 9508 48234 11 -372243 98873 93601 11 -224861 77287 93601 24 -106726 35626 21550 8 -300160 64765 77379 9 -315469 34202 2830 26 -281995 71403 38573 69 -83752 73902 38573 37 -282281 73796 74118 21 -123946 51142 74118 14 -10644 41894 31773 75 -295477 29571 32923 72 -107201 39115 32923 33 -214151 8096 83771 32 -243696 74167 116864 21 -243140 69833 91999 73 -72883 8284 91999 59 -203843 65037 43608 11 -70134 94839 43608 40 -303202 84800 84165 63 -69615 84855 84165 49 -187510 84855 5377 51 -113835 89560 5377 21 -346751 95619 44316 86 -53995 46653 44316 86 -212349 114041 105999 267 -144380 112957 105999 258 -115743 114627 35497 47 -49623 110823 35497 36 -360681 117474 106034 79 -298963 54963 106034 50 -90210 24689 13749 15 -228179 94030 60588 20 -84668 92931 60588 65 -148483 25924 46651 59 -26243 55731 46651 7 -375944 49570 31868 105 -250565 109557 31868 97 -335207 1353 17368 43 -294897 26148 17368 35 -360996 8750 36958 113 -28501 113963 36958 112 -200805 40308 12351 135 -69770 88081 12351 125 -250054 105684 103115 128 -115689 114156 103115 69 -37197 17641 1411 60 -240867 51897 53217 86 -128752 97566 53217 89 -263415 75142 35981 56 -140529 64642 35981 58 -207618 88583 114729 37 -364888 86759 22389 5 -183169 55885 22389 9 -371583 92560 64576 10 -54415 51110 64576 10 -263852 77972 74025 11 -77461 34465 74025 23 -286221 94224 42173 53 -259220 42509 11334 63 -125344 59466 42563 36 -53643 43325 42563 34 -203135 59466 74034 19 -171400 85766 74034 43 -335067 114729 29546 39 -303836 87659 29546 9 -42881 113914 111397 42 -223295 65524 1053 14 -127168 71537 47482 35 -46000 36681 47482 34 -106144 31090 12929 83 -2515 30587 12929 83 -219647 37297 27107 35 -79389 46477 27107 37 -148100 23729 1287 69 -56213 71946 1287 6 -228594 95736 2185 28 -128774 97890 2185 35 -371381 90303 54611 11 -312441 17214 54611 10 -250458 108810 25534 9 -62690 35571 25534 17 -180416 35571 26506 29 -104914 24639 26506 108 -336119 17397 21537 11 -12734 64413 21537 30 -279675 52941 89713 83 -95469 55101 89713 41 -210726 102314 32155 9 -87586 9792 32155 11 -359318 93833 39780 12 -308561 112604 39780 33 -374566 23689 28600 9 -285251 90023 28600 10 -374191 18868 21189 10 -302353 80310 21189 10 -326649 102160 44007 6 -67054 61043 44007 5 -351702 72774 46463 7 -186503 79771 46463 7 -339920 91434 34764 10 -182917 53796 34764 9 -323750 89897 23427 9 -103492 16822 23427 9 -170685 73009 14383 40 -5730 68024 14383 41 -199887 34195 111398 160 -216217 17936 65414 112 -144653 115188 65414 123 -86578 116406 25130 9 -34062 62526 25130 11 -335066 114710 115301 164 -14726 8685 115301 164 -231212 110161 484 11 -282668 76469 79654 28 -212335 113970 67087 7 -60426 22432 107524 89 -372217 98636 48232 10 -298820 53725 48232 10 -269231 104108 71442 10 -163804 31106 71442 26 -271852 4530 82287 96 -116279 5079 82287 78 -104370 21770 85683 31 -212105 112380 111972 146 -271700 3575 85948 69 -245693 85259 111973 89 -249396 101669 18371 26 -209303 95768 13166 14 -58746 13059 13166 42 -323262 87422 111394 27 -227964 93036 49086 128 -35896 115444 111974 33 -151200 42762 10399 68 -26628 59801 10399 68 -211944 111255 64923 23 -373032 116362 109629 89 -322810 85406 109629 56 -288466 105174 48068 76 -232194 117319 77547 110 -113129 75103 77547 57 -40456 52980 3452 23 -271119 1 3089 13 -246129 87424 103978 5 -200402 37382 620 26 -21665 117735 3500 16 -184261 64332 104742 10 -191603 102933 61525 106 -135635 34873 61525 42 -111323 62896 10502 49 -18546 49642 10502 114 -201342 45670 48224 10 -258792 39205 76122 20 -303206 84808 68948 40 -206607 82850 85689 54 -369523 45512 89293 23 -222890 62341 89293 7 -28415 112755 65063 17 -280149 56732 67057 56 -65689 52761 67057 52 -278933 47162 1637 49 -271549 2540 77109 216 -175843 10712 74648 64 -114890 106730 74648 8 -215002 12669 29056 115 -356600 34322 84861 28 -307642 106458 84861 7 -199614 33011 30022 63 -100166 105714 30022 65 -320774 73586 66602 74 -107807 42591 66602 123 -246549 89258 56384 42 -242339 63837 67049 97 -63899 43034 67049 75 -353137 95121 30232 16 -202944 57953 30232 17 -24632 37638 66876 8 -65979 54412 43381 49 -18963 54387 43381 49 -306469 99625 17056 8 -86845 2175 17056 9 -126074 63849 28129 45 -26942 63122 28129 44 -62006 30794 25627 45 -36626 11597 25627 44 -208743 93369 43362 7 -150385 38528 43362 8 -67041 60961 12449 45 -51174 16834 12449 43 -300142 64635 31137 8 -116550 7566 31137 52 -95616 55979 62056 9 -20807 93601 62056 12 -188073 87345 52032 56 -238997 37657 79737 8 -251847 687 98067 132 -363693 55508 37963 8 -114178 96774 53612 45 -26842 62057 53612 27 -371492 91650 39852 8 -48603 67822 39852 9 -169299 63901 17598 54 -45596 30885 17598 55 -168897 61337 24980 8 -44914 24208 24980 9 -278484 42882 99409 49 -92881 40900 99409 16 -181004 39284 110450 44 -154754 64977 110450 62 -260725 54860 95392 57 -83493 72147 95392 20 -340803 100006 5214 30 -322118 81697 5214 9 -84406 87500 117423 62 -50129 117207 117423 46 -333056 86413 86868 47 -224378 73830 86868 55 -378136 93830 82219 61 -278540 43353 82219 34 -282215 73199 38200 60 -126133 64187 38200 91 -222266 57621 33722 182 -372172 98196 15069 7 -306530 99995 15069 29 -296838 38066 84661 13 -167777 55110 84661 7 -263594 76352 94682 59 -60930 25098 94682 41 -257726 33030 14125 6 -93600 44819 14125 129 -356781 38039 56688 8 -192424 108628 56688 8 -330900 33392 58270 9 -301559 75512 58270 12 -187228 83070 101954 51 -134483 27539 101954 161 -357514 57648 10510 12 -228847 96699 10510 13 -336878 26724 90902 100 -49315 94224 90902 136 -367321 10490 13468 36 -15672 19329 13468 27 -301363 73938 1675 9 -353868 102325 11975 53 -55347 60754 11975 53 -185200 70901 49013 8 -249046 100159 2622 57 -225025 78304 9560 15 -185176 70712 4229 36 -277678 36746 92223 6 -25765 50073 72292 5 -279491 51287 54453 41 -153861 59267 54453 22 -252373 3918 43386 127 -65667 52611 43386 75 -221607 52611 89285 288 -264017 78938 117418 15 -231348 111230 112539 17 -187393 84108 85685 39 -340163 93817 11632 7 -31 2368 11632 8 -278511 43124 73645 26 -165450 42192 73645 27 -243623 73447 67280 25 -83703 73473 67280 31 -42116 73645 80691 36 -54126 47867 1942 73 -211927 111079 69504 33 -354413 117519 103227 33 -231732 113980 103227 47 -366393 102701 28670 9 -277621 36398 28670 8 -167839 55370 25285 133 -33354 54535 25285 132 -296032 33589 18642 11 -147428 20071 18642 12 -343292 27116 66932 160 -48642 68549 66932 137 -284510 86471 113558 114 -377786 90737 7276 9 -39889 46982 7276 10 -356357 30999 6563 6 -326776 102836 6563 7 -340679 98866 27179 8 -22481 14618 27179 9 -217484 24962 14308 38 -113322 76753 14308 61 -171361 84723 5163 83 -51553 20331 5163 61 -322666 84723 106057 53 -113404 80289 106057 61 -54060 47234 70626 61 -281555 68151 46210 117 -121115 34959 46210 49 -337932 48697 25599 154 -302401 80522 25599 63 -258332 36149 10774 54 -93525 44487 10774 101 -243561 73019 3478 81 -248467 97698 2987 35 -290202 440 66509 53 -290594 2642 66513 156 -174024 682 36998 69 -271285 1067 79541 72 -186535 79942 102686 86 -213284 2815 10790 75 -375737 44476 23480 74 -266603 91567 23480 99 -276510 29219 37145 40 -125348 59503 37145 38 -60598 23281 24815 57 -44935 24415 24815 49 -181551 43548 101262 35 -149405 30721 101262 10 -182955 54155 43185 20 -128664 95945 43185 41 -323398 88136 115886 75 -100750 111637 115886 113 -211302 106021 106484 16 -143684 106483 106484 20 -222378 58418 2679 13 -5081 59679 34466 43 -351462 66983 69150 153 -30124 20484 69150 175 -327112 105171 116362 113 -158662 113097 116362 113 -320261 69840 79231 25 -332390 71158 39077 107 -48397 64669 39077 146 -353862 102301 20436 10 -9737 30123 20436 10 -299511 59264 53233 38 -81597 59438 53233 33 -221708 53378 65108 49 -65688 52742 65108 51 -185597 74070 73867 29 -149865 34034 73867 41 -65933 54173 73810 28 -202409 54173 82007 39 -61852 29922 82007 23 -60036 20440 104020 121 -24260 31868 104020 128 -334869 109136 86552 39 -211305 106050 86552 39 -270504 113438 106047 56 -102160 8750 106047 84 -366898 117475 77752 112 -14213 115871 77752 113 -304501 90800 1126 67 -306949 102029 97555 81 -145563 8092 97555 86 -165823 44267 13986 9 -8345 16973 13986 8 -226479 85922 113052 112 -56507 83206 46590 131 -157844 105905 111404 48 -230581 105905 86873 51 -154661 64350 86873 12 -340710 99184 11332 11 -9057 23420 11332 12 -239750 43193 100086 111 -133741 23506 100086 85 -98682 76751 15612 195 -48699 69298 15612 193 -146290 13151 13942 15 -3178 39401 13942 13 -174938 5834 6378 39 -64781 47424 6378 24 -279678 52949 93490 44 -82392 64324 93490 75 -198141 24173 43150 78 -107879 43184 43150 41 -297581 43315 43251 25 -62903 37396 43251 12 -320344 70339 341 3 -305892 97062 23983 19 -61856 29975 23983 177 -257513 31766 75441 100 -109254 50962 75441 148 -226809 87732 115307 109 -240928 52519 37750 49 -114598 103870 37750 68 -310001 4621 4467 143 -263742 77200 3966 128 -128883 100168 40981 33 -12936 67978 40981 63 -22695 16782 104744 52 -206274 81255 77303 34 -74982 20728 22159 147 -45474 29644 22159 51 -190086 96103 59403 57 -202182 52100 55760 9 -44236 17490 67288 53 -197504 20728 42651 102 -11991 55868 54175 44 -251289 114661 57033 299 -315105 32245 12237 102 -91261 30114 12237 69 -291138 5882 6778 102 -377033 80192 74640 21 -182475 50491 74640 42 -206735 83766 5097 33 -84890 96755 5097 10 -244040 76264 93434 66 -83527 72391 93434 41 -107029 37961 31406 76 -47265 50994 31406 57 -200489 37961 37736 31 -168851 61115 37736 37 -313584 22983 76249 6 -128510 92895 76249 6 -71678 112263 13475 49 -10822 43863 13475 47 -239450 40692 95440 62 -139980 61193 95440 39 -63178 39036 55865 45 -27675 72620 55865 38 -225092 78813 79015 188 -282696 76715 567 8 -112166 69252 68312 27 -41017 59486 68312 54 -225076 78692 3830 38 -205827 79130 77216 30 -321343 77691 78419 43 -319169 61852 78199 56 -268362 99563 2143 9 -168518 59283 2143 9 -346735 95488 49753 23 -31225 30697 49753 23 -238279 33376 62774 43 -164392 35557 62774 44 -339836 90740 21705 9 -296707 37270 21705 9 -176402 13384 52278 37 -156587 83843 52278 11 -209656 97463 62859 47 -94833 51454 62859 104 -346160 89981 14434 47 -247909 95019 14434 8 -274275 17144 76065 71 -83953 76177 97891 90 -49233 84156 97891 88 -209764 97875 32284 48 -127885 78802 32284 15 -350893 51427 33009 23 -297723 44669 33009 59 -352720 91157 26535 8 -201698 48471 26535 11 -182527 50788 47764 66 -136450 40514 46889 66 -25378 46122 46889 67 -220473 43883 86260 18 -204337 68570 77293 165 -54325 50331 2249 38 -186245 78220 57738 182 -225090 78810 2323 108 -187959 86926 115888 72 -213756 5846 78206 47 -232481 1404 48936 7 -239773 43308 54076 34 -98843 81901 54076 22 -233819 8956 49005 5 -257899 33798 66404 118 -247949 95242 75939 94 -321063 75689 76179 35 -205379 76388 82480 6 -325923 98682 6662 12 -166898 50409 6662 29 -119355 24251 33104 6 -9418 26876 33104 8 -140445 64133 44764 49 -25103 43693 44764 50 -66772 59507 17045 156 -54953 56415 17045 54 -307079 102564 11206 10 -170997 76252 11206 32 -82809 67451 66057 12 -229991 102052 66901 57 -97320 66323 66901 39 -210694 102143 99412 35 -101187 115005 99412 33 -112456 70876 60075 112 -23977 29326 60075 112 -136471 40679 94551 43 -49326 95247 94551 44 -329098 7915 51684 50 -240507 49149 51684 46 -156624 84656 76406 38 -5206 60949 76406 25 -310437 7125 84450 78 -113527 82824 84450 47 -185575 73819 73806 95 -81644 59610 73806 69 -299715 61180 74005 42 -114270 98891 74005 29 -352573 89696 61464 10 -197483 20561 61464 7 -156592 83954 76183 70 -42193 75615 76183 36 -282645 76316 96104 42 -98598 75592 96104 31 -321041 75592 83837 73 -113895 90842 83837 148 -187094 82468 83124 147 -113962 92233 83124 157 -306559 100114 48954 10 -159837 8399 48954 10 -202959 58060 197 8 -29482 13064 44518 9 -290864 4241 2000 105 -336363 20084 26653 7 -310582 7821 26653 10 -169700 66729 23702 41 -35455 110045 23702 41 -271792 4205 79234 8 -259991 49217 66681 53 -234097 10563 990 61 -108661 47043 19189 170 -1813 24315 19189 172 -190808 99226 12168 100 -120661 31540 12168 78 -183873 61246 67262 26 -143197 101733 67262 34 -285217 89904 18870 32 -90965 28617 18870 5 -214400 9315 29255 35 -111254 62499 29255 45 -230749 106997 64366 26 -111655 64893 64366 42 -230748 106995 36212 22 -129457 106998 36212 24 -114462 102103 47044 33 -54985 56732 47044 32 -239722 42870 102026 30 -70459 101734 102026 26 -261964 64300 41975 39 -65694 52782 41975 20 -249377 101538 66141 20 -140903 67400 66141 31 -262359 67400 95291 33 -76482 28624 95291 25 -257165 28624 101941 25 -173024 110238 101941 21 -306956 102043 73585 17 -154844 65446 73585 6 -287969 102145 100938 11 -141342 70702 100938 4 -243265 70702 53947 21 -107718 41950 53947 30 -259161 41950 67728 26 -172615 106215 67728 29 -204129 67030 37710 11 -142827 94361 37710 8 -249487 102147 100664 15 -145998 11505 100664 10 -311237 11505 61753 7 -70078 93645 61753 14 -325241 96035 102102 8 -143237 102118 102102 8 -210659 101903 102177 7 -155015 66519 102177 8 -306968 102142 92462 7 -124403 53825 92462 5 -202379 53825 16298 4 -80341 52003 16298 5 -221536 52003 30471 9 -88052 12763 30471 18 -234517 12763 63914 13 -83514 72274 63914 21 -177766 20051 44294 13 -94952 52179 44294 15 -333978 95805 47993 19 -224580 75278 47993 10 -268504 100084 67724 40 -122548 43384 67724 39 -175036 6279 83710 33 -171319 83829 83710 14 -303036 83511 83711 15 -86912 3727 83711 26 -194323 3727 76180 29 -84256 84102 76180 19 -105202 26234 72296 16 -224416 74098 52876 27 -171172 80865 52876 22 -204241 67787 86877 11 -232393 805 4369 93 -67218 61942 29665 50 -4756 55739 29665 51 -260228 51165 37943 40 -157390 101159 37943 34 -290400 1514 79016 19 -263588 76320 96692 42 -112950 73425 96692 27 -321657 79527 78596 14 -243936 75526 66525 8 -66602 58371 114134 8 -345574 80836 45560 10 -44764 22673 45560 99 -354984 12011 26701 9 -209742 97818 26701 8 -329955 19359 59517 8 -248516 97876 59517 8 -333550 91707 12725 18 -180232 34295 12725 13 -352789 91785 28286 8 -292751 14552 28286 10 -155520 70453 15149 45 -41222 61877 15149 45 -220240 41712 68270 3 -299920 62873 83178 20 -245623 84900 83449 62 -282611 76075 93487 43 -161855 20640 93487 34 -128609 94890 76250 44 -11525 50915 76250 23 -208859 93876 70373 47 -96880 63365 70373 49 -326302 100454 2573 8 -117566 14180 2573 10 -374475 22507 28316 47 -46915 47011 28316 47 -219480 36294 58431 16 -164868 39076 13134 48 -33857 60178 13134 47 -12086 56712 83650 48 -328396 114828 65023 10 -141868 74010 65023 6 -328054 112215 33317 50 -66010 54589 33317 50 -370416 70452 12041 11 -201277 45014 12041 6 -367958 18642 19873 11 -268049 98154 19873 10 -355939 24100 22187 48 -40341 51786 22187 47 -302286 79925 917 211 -271676 3363 68641 143 -372294 99382 11949 10 -15345 16110 11949 46 -356733 36509 33813 9 -190461 97745 33813 8 -329937 19122 48504 36 -247678 93984 48504 11 -310466 7282 5601 11 -245222 82463 84521 102 -282651 76359 4995 82 -55696 65023 89292 11 -297778 45164 98369 86 -66021 54647 98369 48 -79434 46665 15552 131 -11180 47223 15552 129 -371775 94104 60085 9 -37810 23817 60085 47 -267795 96965 9171 160 -81773 60386 9171 137 -222108 56522 13273 8 -281935 70864 82660 60 -304587 91236 25930 86 -345083 67993 68468 13 -175050 6359 68468 13 -365497 93662 16760 9 -201721 48650 16760 9 -228511 95432 12011 9 -120055 28170 12011 9 -156990 92892 53545 112 -19956 65399 53545 102 -373169 3469 51535 9 -302542 81050 51535 7 -302962 82987 70641 53 -282556 75690 83125 75 -93857 45947 83125 52 -351722 73333 100183 92 -201370 45947 100183 24 -299947 63158 86878 81 -72195 116441 86878 26 -291348 7143 83588 33 -157617 103985 83588 30 -249803 103985 84794 35 -128943 101327 84794 31 -215615 15258 83775 153 -21108 111099 107357 95 -176765 15256 84241 7 -278378 42028 93403 71 -117641 14796 93403 24 -198369 25246 62244 8 -320703 72983 90475 31 -154809 65276 98768 92 -28020 91618 98768 93 -113929 91513 40075 53 -3566 43728 40075 47 -13712 104398 116365 17 -244560 79528 991 41 -186845 81355 56816 49 -150539 39282 56816 50 -331190 38955 26258 7 -14937 11341 26258 7 -239784 43426 52404 10 -68579 71477 52404 14 -76821 30346 71290 31 -11770 53621 71290 32 -358268 80092 20608 9 -295520 29905 20608 9 -340936 101395 32129 9 -248186 96481 32129 95 -206075 80387 8773 7 -151931 46890 8773 6 -336990 28117 41242 132 -317864 51561 41242 84 -89971 23465 70773 157 -4844 56753 70773 158 -372631 104104 7508 9 -8327 16760 7508 8 -126688 68611 9402 49 -19539 60400 9402 47 -333191 88082 58364 11 -199900 34255 58364 11 -299276 57392 79235 4 -194519 5253 35813 32 -168919 61446 35813 19 -369426 42254 59721 16 -5779 68468 59721 13 -137318 45179 4807 6 -371940 95931 97700 26 -264981 83641 97700 29 -189364 92962 69381 6 -68134 68503 69381 6 -256194 23692 3469 7 -162590 24754 3469 8 -322423 83115 83958 5 -84465 88778 111983 13 -6788 110075 111983 11 -300082 64217 100370 60 -272561 8562 90933 27 -230227 103238 115891 28 -232901 3699 87189 22 -302413 80553 10537 46 -48005 59792 51476 24 -176507 13878 110831 15 -314833 29909 59041 123 -140592 65132 59041 104 -197674 21598 19218 7 -67530 63921 19218 6 -179548 30021 47457 42 -110254 56835 47457 42 -235976 19647 46589 7 -89549 21066 46589 7 -367328 10622 9125 89 -325372 96498 9125 9 -186550 80019 4115 43 -321530 78790 70918 16 -184797 67908 568 237 -309781 3249 920 73 -6776 109702 67779 135 -225133 78981 77928 405 -207640 88682 5391 221 -232636 2234 2126 328 -251900 1035 84996 58 -322884 85670 116366 137 -375759 45057 57299 42 -325911 98618 57299 8 -316864 43733 60792 11 -153834 59121 60792 16 -251849 696 38206 31 -12569 62395 35385 80 -265540 86730 68059 15 -304994 93040 44176 7 -104560 22763 44176 8 -337385 34473 35082 10 -238062 31922 35082 11 -163455 29356 94635 71 -322923 85857 34786 12 -146727 15802 34786 30 -318812 59080 95488 132 -86895 3183 95488 20 -335327 5913 27550 119 -347281 100745 16924 15 -34436 67946 16924 12 -82453 64723 46667 66 -16213 24358 46667 66 -366856 115754 32063 32 -306964 102129 32063 16 -238747 36378 22567 52 -162655 25188 22567 51 -324565 93317 53899 30 -142910 95946 53899 106 -259031 41023 22839 114 -353990 104132 113577 87 -56734 105176 113577 100 -28277 110866 111987 195 -297862 46116 64508 44 -85191 102219 64508 23 -351729 73790 47955 82 -15475 17392 47955 114 -249854 104201 62648 42 -20495 72778 60736 205 -89393 20348 28440 34 -22818 17929 28440 28 -339350 82504 20348 14 -362320 25882 27326 10 -260311 51834 27326 11 -228819 96609 30880 74 -168355 58455 30880 78 -314923 30880 58455 78 -138520 52351 58455 132 -334764 105967 116376 108 -56405 75366 116376 85 -143120 100387 45458 57 -3824 45783 45458 93 -359460 95274 22622 12 -293107 16279 22622 10 -165196 40868 41525 139 -30141 20638 41525 138 -273908 15469 68399 116 -60099 20801 68399 68 -240973 52913 58870 39 -297142 40206 76811 86 -126341 65692 76811 66 -151852 46358 18951 89 -38609 31411 18951 88 -377677 89784 19752 8 -180982 39144 19752 7 -106038 30708 8059 131 -51700 21866 8059 130 -377264 82364 21265 8 -41587 66678 21265 48 -139648 59245 37291 133 -53841 45269 37291 131 -76750 30023 32442 131 -54072 47354 32442 131 -362943 35622 57977 50 -7757 10275 57977 87 -370380 69560 38353 7 -13534 80062 38353 55 -165860 44489 55468 160 -45261 27720 55468 164 -350573 44176 31922 8 -321900 80799 31922 10 -355756 21583 70422 10 -248421 97573 70422 8 -243374 71454 10079 63 -66506 57621 10079 186 -175741 10079 18122 87 -164407 35817 18122 97 -312634 18122 65061 121 -74278 17161 65061 119 -353311 97008 17161 75 -9804 30684 17161 63 -340364 95702 40129 8 -181284 41343 40129 26 -156204 75700 61362 33 -17934 43795 61362 8 -218287 28878 44678 74 -172228 102265 44678 53 -234187 11151 42444 40 -111592 64494 42444 47 -239667 42444 64494 47 -97012 64128 64494 24 -223171 64494 64128 24 -70940 106100 64128 36 -360232 104044 110409 37 -130302 114579 104044 33 -28694 116385 104044 61 -241216 54786 80057 73 -161713 19813 80057 161 -348415 10657 19813 102 -53217 38913 19813 101 -347433 102756 15133 7 -22462 14306 15133 21 -367415 11848 25355 103 -17207 35000 25355 104 -322845 85564 113575 51 -21137 111548 117434 37 -304622 91343 113576 8 -286992 97550 65490 7 -117084 11269 65490 25 -70205 96376 71212 103 -48462 65536 71212 84 -351152 58428 36520 9 -315482 34265 36520 10 -371689 93371 8410 20 -277888 38220 8410 11 -345934 87083 115901 8 -288451 104992 115901 9 -70835 105171 105967 108 -21245 112835 105967 54 -371932 95870 66037 12 -31431 32824 66037 12 -85206 102462 76067 85 -47750 56843 76067 35 -205345 76067 102462 85 -111255 62516 102462 59 -344893 61728 13620 10 -248869 99402 13620 7 -112768 72429 1425 90 -3286 40457 1425 90 -352582 89751 13519 12 -10209 35988 13519 10 -65563 51900 61738 133 -27639 72145 61738 133 -373721 13538 74213 49 -187010 82150 74213 9 -248011 95533 27436 7 -112224 69538 27436 110 -189782 94851 58428 9 -101935 6763 58428 10 -340726 99360 45016 11 -238782 36520 45016 10 -350121 34058 28111 125 -11964 55604 28111 89 -376177 55156 68745 129 -44726 22374 68745 137 -252151 2622 20660 108 -64393 45458 20660 91 -193143 113654 114145 113 -171107 78921 114145 112 -316718 42494 116380 114 -98736 78920 116380 113 -354533 4003 115320 107 -223814 69611 115320 108 -324397 92510 6201 9 -58920 14148 6201 8 -334707 104096 10898 8 -176510 13880 10898 9 -81845 60878 89613 109 -363587 52427 59217 10 -207850 89613 59217 110 -196360 15284 6329 9 -123276 47301 6329 9 -366403 102801 22709 5 -248957 99768 22709 31 -195475 10454 110841 13 -187777 86117 110840 70 -371075 86441 25432 13 -198307 24934 25432 17 -110845 60162 71849 83 -46835 46113 71849 84 -358099 74266 69063 8 -310258 6159 69063 9 -307652 106507 25453 7 -76392 28216 25453 169 -198399 25453 42643 47 -77920 38353 42643 48 -338217 55482 80062 113 -201067 42643 80062 93 -171911 96748 64976 56 -219622 37043 63105 7 -142061 76116 63105 49 -335958 15483 18752 7 -208198 90993 18752 8 -143376 103756 32467 34 -41310 62940 32467 75 -374076 17694 28461 8 -325786 98104 28461 7 -112729 72119 52059 133 -39644 44471 52059 133 -163354 28885 21672 134 -18518 49316 21672 133 -338357 58621 26939 11 -324361 92374 26939 9 -127556 74066 29355 16 -32181 42245 29355 12 -352997 93746 26214 8 -252142 2573 26214 8 -165100 40454 13508 133 -24123 30704 13508 131 -373192 4680 58209 11 -302564 81144 58209 9 -353226 96164 50827 12 -50315 6189 50827 11 -97697 69398 6072 133 -25116 43826 6072 132 -248846 99318 28587 7 -163546 29851 28587 22 -70560 102745 69183 71 -12413 60487 69183 69 -59107 15307 25110 98 -20165 68780 25110 99 -187163 82749 39848 8 -95685 56430 39848 7 -114616 104044 101819 35 -226880 88044 114754 26 -128978 101832 114754 38 -212600 115842 103800 34 -144016 109904 103800 32 -288266 103800 109904 32 -71355 109903 109904 9 -192613 109904 109903 9 -99824 101831 109903 16 -231075 109108 88691 102 -101077 114277 88691 102 -353003 93804 10102 10 -174261 1931 10102 9 -297611 43539 95953 49 -64771 47361 95953 7 -189717 94525 69797 71 -72814 7728 69797 82 -187084 82425 26996 50 -76351 27976 26996 82 -352877 92581 38967 63 -48384 64508 38967 49 -328963 5202 94556 6 -352171 82297 19902 11 -319449 63792 19902 19 -348409 10485 12813 125 -27084 64713 12813 122 -334490 100694 19861 9 -315344 33615 19861 8 -362781 33322 39226 12 -206208 80990 39226 39 -302330 80202 24801 9 -163564 29915 24801 7 -352699 90908 26277 9 -319444 63733 26277 11 -375507 38518 9060 8 -323955 90734 9060 7 -262077 65135 89624 14 -80391 52289 89624 11 -277778 37498 43220 7 -30246 21558 32780 66 -257681 32780 1471 64 -264031 79002 2644 18 -309688 2644 921 14 -338960 75308 18183 11 -43267 4825 18183 11 -154975 66288 54072 132 -10251 36679 54072 134 -126491 66923 56497 92 -20101 67918 56497 55 -184294 64546 99803 43 -74131 16289 99803 33 -13857 110076 104761 19 -152514 50410 18304 110 -34537 69395 18304 110 -97149 65274 17914 128 -6126 72492 17914 127 -33855 60169 43431 48 -75748 24597 43062 55 -37623 22016 43062 71 -169770 67300 24597 52 -8289 16323 24597 86 -373951 16323 67289 95 -200290 36709 67289 101 -273842 15150 22016 94 -82793 67289 22016 76 -201116 43062 16323 90 -162600 24823 16323 90 -36326 7706 49835 96 -345746 82486 22646 9 -299478 58999 22646 9 -313481 22499 50645 137 -127067 70941 50645 135 -342357 14995 50971 8 -267728 96670 50971 9 -236241 21167 15826 8 -67349 62664 15826 7 -190513 98010 49785 91 -137613 47004 49785 89 -288108 102766 271 9 -155769 71920 271 10 -290476 2034 13175 9 -150688 40089 13175 7 -302582 81225 14184 90 -107653 41548 14184 90 -243897 75315 65656 11 -75499 23276 65656 11 -221137 49042 33431 11 -136692 41897 33431 9 -284469 86310 4540 15 -66436 57253 4540 11 -174732 4540 57253 11 -58856 13731 57253 18 -183361 57253 13731 18 -92808 40564 13731 22 -331652 51046 1931 9 -229642 100299 1931 9 -365089 89680 31831 9 -410 10102 31831 10 -136367 40088 32787 35 -36580 11083 32787 34 -374774 26112 6159 10 -286389 94910 6159 9 -333600 92176 72768 8 -55950 69063 72768 8 -153771 58664 13648 35 -3528 43105 13648 34 -331224 39742 23040 8 -306080 97858 23040 8 -353482 98587 2591 10 -1215 18679 2591 10 -170090 69553 60019 34 -27524 70982 60019 34 -331718 52664 50877 9 -326785 102856 50877 8 -153973 59853 61036 20 -46938 47205 61036 25 -299703 61036 59853 20 -167402 53090 59853 19 -280531 59608 73992 32 -156056 73983 73992 40 -243687 74121 59042 49 -69469 82037 59042 70 -353948 103115 82037 109 -183623 59042 82037 70 -245122 82037 114156 83 -129726 109842 114156 75 -270605 114156 109842 75 -322083 81609 72155 129 -81604 59477 72155 116 -197407 20073 19851 9 -155897 72832 19851 9 -371962 96116 21177 8 -290151 206 21177 9 -242529 65450 73800 34 -181521 43339 63939 62 -111713 65457 63939 41 -340241 94561 90520 86 -192689 110459 90520 67 -374997 29526 93138 19 -306959 102060 93138 25 -324530 93138 72278 10 -78643 42546 72278 19 -204832 72278 42546 19 -114466 102168 42546 34 -239679 42546 102168 34 -154794 65217 102168 25 -306973 102168 65217 25 -171799 94276 65217 11 -319618 65124 42405 8 -124244 52777 42405 10 -330427 25534 18594 20 -23376 23656 18594 44 -183679 59550 82957 27 -136762 42333 82957 31 -283802 82957 40458 18 -114094 94671 40458 21 -307919 108263 80600 37 -94708 50758 80600 33 -167970 56016 40060 47 -45864 34954 40060 33 -316453 40060 56016 47 -70543 102455 56016 47 -171023 76484 14928 6 -8586 19218 14928 6 -315500 34323 58298 86 -160080 9902 58298 87 -352991 93702 65461 9 -54366 50645 65461 135 -82433 64564 8523 44 -16924 30981 8523 44 -340738 99515 24062 8 -176129 12122 24062 8 -125174 58514 30878 45 -10412 39599 30878 45 -266346 90283 25787 11 -73687 13519 25787 12 -110192 56532 67920 45 -25968 52387 67920 44 -281179 65176 27527 10 -108842 48242 27527 10 -58157 9695 21887 117 -46394 41448 21887 42 -178079 21887 23202 51 -239002 37696 15027 152 -109695 53529 15027 46 -234988 15027 66983 42 -106915 37174 66983 39 -318095 53276 43532 26 -65773 53218 43532 74 -372258 98987 15055 7 -247879 94905 15055 16 -79032 44695 22692 43 -39647 44488 22692 42 -362030 22262 23052 11 -209969 98716 23052 9 -180452 35804 3556 8 -212728 116975 115330 114 -134811 29368 115330 114 -283011 78921 112001 114 -159197 117493 112001 115 -291937 10440 104062 87 -142519 87486 104062 58 -288307 104062 87486 58 -111318 62877 87486 85 -84912 97150 53529 46 -27213 66983 53529 46 -213116 1865 88988 35 -372362 100190 94463 136 -275363 23160 94463 149 -68395 70211 47056 82 -3542 43485 47056 83 -220054 40159 42613 60 -102086 7959 42613 63 -239687 42613 51440 105 -69511 82637 51440 50 -346671 94940 82637 8 -182620 51440 82637 50 -362707 32534 54133 8 -48966 72546 54133 47 -332375 70873 12122 9 -230345 104054 12122 8 -371642 93027 15096 9 -1784 24062 15096 9 -163446 29318 23489 131 -33897 60597 23489 131 -368120 20477 68486 49 -324631 93554 68486 8 -362841 33842 53996 9 -52312 27690 53996 8 -365864 97170 68326 19 -299462 58882 68326 8 -333795 94167 10274 10 -41207 61702 10274 32 -348635 13725 16660 67 -235876 19189 16660 173 -79393 46487 28117 135 -8675 20072 28117 231 -356075 25910 63197 287 -255592 20331 63197 200 -321066 75693 83959 9 -111641 64776 83959 5 -344827 59402 64776 7 -245469 83959 64776 5 -113621 84719 38107 44 -20849 101579 38107 25 -268871 101798 25411 9 -135462 32821 25411 9 -144357 112794 13964 41 -370258 66078 10899 10 -240537 49322 10899 10 -352833 92191 29691 9 -286399 94954 29691 17 -128426 91377 51902 106 -24263 31879 51902 20 -359770 98447 20091 8 -233251 6032 20091 9 -266385 90477 21211 55 -68946 73643 21211 32 -223416 66669 95605 27 -149886 34420 95605 52 -325191 95780 38518 8 -161872 20756 38518 7 -316844 43551 43469 25 -156064 74051 43469 14 -191293 101284 64819 15 -108195 44854 64819 21 -328933 3500 44854 33 -242458 64819 44854 21 -300425 66713 1961 7 -124012 51556 1961 5 -267073 93671 13893 115 -109522 52451 13893 113 -320757 73402 61781 27 -90583 26622 61781 4 -216755 20616 62791 18 -152877 52647 62791 62 -299907 62791 52647 62 -66813 59690 52647 52 -202197 52243 66392 116 -128902 100663 66392 87 -213015 1150 53894 27 -114057 93850 53894 40 -346585 94177 93850 26 -241098 53894 93850 40 -142970 97289 31156 86 -17190 34879 31156 45 -276736 31156 97289 86 -138351 51469 97289 48 -18304 47078 2874 14 -290636 2874 45985 58 -235560 17641 69646 47 -95308 54207 69646 32 -186641 80411 15367 13 -154060 60325 15367 10 -292920 15367 60325 10 -113031 74092 60325 16 -241860 60325 74092 16 -109798 54075 74092 17 -243682 74092 54075 17 -152964 53249 54075 19 -260449 52830 60365 16 -127536 73908 60365 28 -373095 1379 53833 175 -16731 29084 53833 121 -67889 66710 65181 38 -235188 15891 25910 204 -118327 18933 25910 131 -332860 82218 16853 34 -16961 31299 16853 34 -319571 64743 102005 116 -67026 60895 102005 99 -191438 102005 60895 99 -156867 90697 60895 43 -208169 90842 40101 127 -98428 74085 40101 51 -239778 43352 54020 23 -138694 53459 54020 42 -279824 54020 53459 42 -85321 103868 53459 65 -356615 34501 90649 9 -261442 60814 90649 72 -350017 32753 67134 18 -266423 90649 67134 20 -140593 65150 53497 43 -27637 72094 53497 57 -279750 53497 65150 43 -135326 32105 65150 17 -281172 65150 32105 17 -62267 31995 32105 4 -179762 32105 31995 4 -104161 20538 31995 3 -238074 31995 20538 3 -148462 25786 20538 18 -149295 30105 95616 44 -314866 30287 60513 50 -125089 58067 60513 31 -156916 91456 20148 131 -41212 61746 20148 143 -293835 20148 91456 131 -161252 17352 91456 33 -200743 39715 52185 12 -70707 104237 52185 9 -82078 62342 8638 33 -17864 42841 8638 34 -350558 43765 39143 8 -199187 29842 39143 8 -372629 104081 10412 9 -26615 59665 10412 9 -365580 94564 56953 9 -9906 31491 56953 9 -53212 38850 29851 22 -364015 65414 67440 111 -32608 46573 67440 78 -253573 10628 30099 10 -64485 45951 30099 7 -349760 27436 34368 62 -263239 73986 34368 78 -137470 46066 69538 111 -22308 12462 69538 111 -357096 46983 25811 7 -288660 106509 25811 7 -338658 66931 29825 129 -29914 18247 29825 93 -366195 100417 23183 16 -273592 14070 23183 26 -107562 41012 32165 23 -40377 52092 32165 23 -238089 32165 70166 87 -263015 72210 89299 9 -198715 26996 64089 51 -127525 73851 64089 17 -261912 64089 73851 17 -82622 65939 59905 58 -2106 26996 59905 73 -203192 59905 65939 58 -142753 92581 65939 50 -281285 65939 92581 50 -106830 36378 92581 56 -239205 38967 36378 83 -111341 63039 36378 60 -123486 48553 115920 51 -57426 117722 115920 51 -375460 37360 10503 7 -266019 88866 10503 8 -311034 10503 63792 17 -170943 75600 63792 23 -99704 99668 75600 39 -51508 19902 75600 15 -224626 75600 99668 39 -78324 40854 99668 33 -346820 96141 16072 9 -44465 19892 16072 47 -124625 55227 19440 131 -18769 51938 19440 131 -357105 47230 27030 9 -268650 100680 27030 8 -346120 89555 20557 9 -29836 17548 20557 8 -378544 97562 36512 26 -302496 80888 36512 9 -357311 52214 15872 9 -50196 1911 15872 54 -353546 99115 72290 8 -15859 20971 72290 7 -331899 57935 20733 49 -198066 23777 20733 8 -362193 24639 11733 120 -281534 67978 11733 87 -358223 79085 36061 9 -43453 8072 36061 10 -121055 34582 55317 103 -34633 70503 55317 46 -260777 55317 34582 103 -122237 41601 34582 66 -63945 43373 30366 68 -4154 48713 30366 37 -14310 117162 107402 134 -378580 97839 54071 9 -31451 33122 54071 38 -342007 10774 54831 140 -53935 46094 54831 118 -259606 46210 25592 71 -124445 54071 25592 39 -142115 76762 15752 136 -6049 71686 15752 136 -362964 35981 25175 56 -286030 93354 25175 12 -181375 42067 22432 141 -144831 116636 22432 71 -277393 34651 17132 10 -105381 27240 17132 33 -322520 83768 85448 102 -42106 73269 115335 9 -370789 81282 40536 10 -301005 70943 40536 44 -98389 73832 59774 145 -47303 51358 59774 113 -353035 94057 32696 6 -196756 17186 32696 9 -83469 72004 25541 105 -25629 48480 25541 107 -230379 104283 37417 5 -68010 67684 37417 5 -180716 37417 67684 5 -63262 39452 67684 8 -338381 59142 103460 5 -185577 73836 103460 7 -261166 58278 67071 28 -85184 102123 67071 24 -204135 67071 102123 24 -100379 107901 102123 26 -230005 102123 107901 26 -114885 106693 107901 26 -297501 42608 34420 65 -64691 46867 34420 73 -183417 57766 46867 155 -84084 80194 46867 80 -371525 91963 22251 9 -43934 14273 22251 10 -365252 91181 52694 11 -41654 68068 52694 12 -343028 23866 32516 8 -266435 90683 32516 6 -359295 93580 50328 10 -19962 65512 50328 8 -84675 93024 67160 136 -31510 34870 67160 136 -367078 5790 93024 53 -204149 67160 93024 136 -347791 112631 85697 44 -250893 111946 85697 71 -337214 32663 56300 7 -224246 72888 56300 116 -93871 46048 67055 36 -9861 31139 67055 37 -228122 93782 46983 7 -120357 29825 46983 93 -353333 97230 18247 9 -256604 25811 18247 7 -125501 60419 60784 63 -48531 66396 60784 34 -330679 29370 91915 16 -299327 57758 91915 31 -18710 51297 31165 36 -114895 106800 111438 46 -49887 114041 111438 83 -50756 11835 40025 139 -227576 91426 70877 25 -62543 34390 70877 113 -361254 12522 34390 137 -185198 70877 34390 113 -277334 34390 58706 116 -157175 96793 58706 55 -314658 28503 43170 31 -238687 35839 43443 13 -151261 43131 43443 10 -67691 65069 44403 47 -51114 16221 44403 30 -210714 102256 37582 48 -136279 39584 37582 53 -341076 103460 59142 5 -320835 74125 59142 37 -332144 64608 21677 14 -210819 102656 21677 6 -39120 39014 93934 71 -252128 2482 490 71 -290213 490 94002 37 -315703 35627 100581 94 -61551 28463 100581 64 -190099 96195 24147 8 -88642 16383 24147 39 -194119 2522 92681 77 -153954 59757 92681 53 -305299 94314 37515 8 -147837 22190 37515 9 -347399 102352 22190 10 -299058 55925 22190 11 -266988 93370 40689 9 -161398 18051 40689 9 -333903 95170 14605 12 -314295 26532 14605 11 -319919 67452 106486 36 -157470 102221 106486 24 -307645 106486 102221 24 -129396 106305 102221 36 -256011 22772 45057 187 -170079 69419 45057 45 -333285 89442 85963 10 -308486 112089 85963 10 -378369 96039 59665 9 -239231 39143 59665 9 -340923 101199 18679 9 -178288 23040 18679 8 -12967 68429 22410 52 -316316 39273 53149 31 -92600 39343 53149 8 -142825 94338 103531 29 -340746 99580 24439 10 -1341 19969 24439 10 -139796 60095 29130 133 -12313 59471 29130 133 -329833 17950 29371 10 -320079 68466 29371 10 -368530 26272 18232 9 -299229 57012 18232 8 -368038 19591 11640 5 -181606 44007 11640 6 -166556 48118 18857 68 -48892 71598 18857 68 -316040 37523 20724 5 -106539 33861 20724 56 -371919 95697 9717 10 -287947 101954 9717 37 -368955 33621 44364 149 -47451 53115 44364 149 -278649 44588 47376 118 -81351 57977 47376 111 -334642 102735 10275 126 -201539 47376 10275 108 -280556 59792 38133 50 -39428 42074 27023 124 -350746 48384 15891 109 -275910 25922 15891 137 -239876 44217 13725 65 -103334 15946 13725 68 -353438 98142 11558 8 -220599 45004 96315 40 -45856 34892 44799 145 -335900 14859 17929 7 -239561 41560 17929 81 -239124 38421 37955 28 -156852 90336 37955 49 -296827 37955 90336 49 -124476 54228 90336 54 -97107 64939 50758 33 -18790 52162 50758 24 -221397 50758 64939 33 -114922 107025 64939 18 -201588 47728 26527 67 -64716 47056 26527 64 -297159 40339 72140 122 -219252 34928 73333 90 -113188 75476 73333 89 -99552 96910 42333 31 -39266 40458 42333 22 -54039 47021 2861 106 -55480 62231 53889 89 -256675 26114 54316 115 -349212 20724 44819 130 -20421 72123 44819 132 -348028 2321 33861 57 -239934 44819 33861 180 -350403 39930 24860 9 -47642 55482 24860 69 -169905 68194 69940 49 -24976 41648 69940 51 -63521 40887 17933 40 -27126 65523 17933 40 -191137 100658 26317 9 -116278 5019 26317 9 -248519 97884 57648 11 -125001 57443 57648 10 -225990 82931 59458 7 -160876 15310 59458 7 -364992 88540 19875 67 -10400 39425 19875 67 -288571 106003 114177 97 -85456 105185 114177 179 -212375 114177 104132 74 -115442 111987 104132 159 -365013 88745 110866 91 -251121 113577 110866 123 -87695 10407 36850 55 -24984 41754 36850 31 -244025 76137 84312 36 -72573 5379 84312 40 -342546 17056 25975 8 -209669 97502 25975 7 -359112 91752 2175 9 -18705 51249 2175 8 -334049 96480 25056 12 -5936 70362 25056 12 -135910 36769 53206 86 -3995 47256 53206 61 -305013 93097 22374 70 -172079 99991 22374 57 -295994 33316 66214 11 -60921 25056 66214 12 -254308 14067 76251 168 -148452 25754 76251 96 -248701 98739 24934 11 -75656 24031 24934 11 -340439 96401 28331 8 -26327 56599 28331 11 -93733 45341 70584 36 -10011 32314 70584 36 -229413 99171 35609 8 -60899 24932 35609 8 -208711 93264 17186 9 -74889 20342 17186 8 -376784 71442 50661 72 -45555 30478 50661 73 -162451 24141 116406 8 -7850 11603 116406 12 -325043 95163 114180 59 -158539 112057 114180 62 -322915 85846 116922 66 -279385 50336 65391 20 -96943 63728 65391 33 -249498 102258 63539 39 -70512 102144 63539 34 -300338 66081 66974 19 -70520 102192 66974 23 -184640 66974 102192 23 -126486 66880 102192 16 -268933 102192 66880 16 -84620 91910 66880 21 -204111 66880 91910 21 -114871 106572 91910 33 -247163 91910 106572 33 -111625 64666 106572 37 -349352 22549 78474 26 -268189 98790 78474 7 -352933 93055 65284 9 -43535 9379 65284 9 -317922 51930 81859 68 -135946 37124 81859 63 -42905 114177 115348 200 -137834 48189 67916 63 -35019 76251 67916 99 -281524 67916 21778 78 -167877 55550 21778 109 -282260 73557 102994 13 -126263 65053 102994 14 -269077 102994 65053 14 -149883 34328 65053 25 -353567 99316 58677 8 -14599 6796 58677 40 -358221 79072 36456 11 -218693 32155 36456 10 -238345 33637 7072 9 -105019 25186 7072 87 -166864 50276 19747 118 -51040 15469 19747 168 -342254 13676 16243 10 -327040 104610 16243 11 -362864 34044 30104 12 -20407 71959 30104 19 -353610 99656 39087 10 -1643 22644 39087 10 -26763 61327 57797 137 -3475 42469 48475 56 -365889 97408 16221 8 -321091 75830 16221 35 -78350 41040 11660 73 -39798 46017 11660 72 -308386 111530 86563 12 -367816 16935 33759 140 -292331 12395 33759 140 -343042 24147 90999 13 -180755 37674 90999 27 -368339 23975 16383 40 -227469 90999 16383 45 -348931 17132 18552 43 -293131 16383 18552 76 -235732 18552 27240 70 -105831 29599 27240 74 -373603 12065 23729 103 -49128 76186 23729 83 -326432 101017 72522 25 -156073 74135 72522 45 -301182 72522 74135 45 -99763 100727 74135 87 -264243 80188 16159 6 -124921 56959 16159 7 -333994 95953 99661 26 -221289 49978 99661 34 -190909 99661 47361 27 -128658 95880 47361 23 -259734 47361 95880 23 -165665 43468 95880 27 -325212 95880 43468 27 -99648 98652 43468 91 -364274 72759 98652 85 -220434 43468 98652 91 -330045 20261 21855 7 -287225 98652 21855 88 -125082 57966 19041 30 -2182 27692 19041 32 -332252 67684 15082 8 -265546 86738 15082 9 -367151 7292 39452 8 -176733 15082 39452 10 -207979 90146 32753 8 -109691 53497 32753 31 -242773 67134 72094 43 -65946 54245 72094 31 -185375 72094 54245 31 -127521 73812 54245 17 -126086 63922 31648 39 -3195 39611 31648 40 -182871 53402 53267 28 -153813 58962 53267 27 -183619 59027 52839 40 -156052 73954 52839 44 -19672 61871 69031 58 -31661 36445 42511 137 -292542 13567 2705 11 -25366 46022 1170 22 -151120 42330 24284 86 -16048 22814 24284 90 -360146 102468 95417 35 -239810 43586 95417 67 -152962 53246 53982 21 -17621 40359 53982 19 -362149 24089 15532 10 -208276 91309 15532 10 -218534 30854 97727 51 -153189 54746 97727 23 -359781 98536 15298 31 -305978 97380 15298 11 -92275 37362 73725 37 -363296 44925 32869 10 -58166 9755 26571 45 -41393 63855 26571 44 -185369 72082 69086 9 -358312 80511 60472 9 -280995 63703 60472 75 -247589 93675 26272 9 -148155 23970 26272 10 -326257 100194 26614 7 -104883 24428 26614 8 -346447 92711 24142 7 -235598 17869 24142 6 -286282 94549 11848 7 -155082 66998 11848 73 -157153 96412 34877 18 -31407 32493 34877 29 -122385 42511 82016 177 -19928 64937 82016 183 -264704 82016 36445 219 -299225 57009 74215 64 -357372 53889 26114 126 -297380 41874 26114 73 -339117 80372 68198 10 -267789 96959 68198 15 -121443 37146 57579 62 -4734 55425 57579 60 -262852 70970 35622 8 -138417 51845 35622 48 -301856 77406 77471 116 -224189 72545 85001 115 -322723 85001 107479 243 -304283 89761 74188 57 -323456 88371 116416 334 -263969 78691 112571 112 -318752 58579 58619 35 -140210 62762 58619 41 -98420 74049 116419 55 -232087 116419 74049 55 -80702 54204 74049 55 -303663 86873 73580 14 -66667 58740 73580 12 -360246 104179 85452 44 -204138 67107 85452 54 -284444 86247 107480 146 -98522 74913 107480 40 -296770 37547 84925 33 -171446 86832 84925 41 -322703 84925 60746 43 -158250 109867 60746 90 -299655 60746 84963 129 -129629 108942 84963 132 -212199 113032 85004 58 -142488 86583 85004 32 -174097 1198 76832 23 -130642 117346 76832 69 -240594 49825 103710 20 -121047 34487 103710 30 -269175 103710 114187 38 -129500 107471 114187 57 -175473 8672 107413 68 -142473 86277 107413 122 -288767 107413 86277 122 -121162 35133 86277 364 -63384 40122 22590 144 -56094 70769 22590 144 -360839 5421 97228 36 -318904 59972 97228 94 -354489 2508 24663 7 -42764 112232 24663 7 -36883 14579 49082 35 -236119 20440 117474 123 -130227 114059 117474 110 -303413 85734 113091 28 -113747 87782 113091 54 -347771 112054 87782 102 -251059 113091 87782 54 -269643 106965 114188 32 -84463 88698 114188 101 -212382 114188 88698 101 -158474 111438 88698 96 -354049 106047 116420 84 -188507 89353 116420 89 -144215 111470 8750 81 -28369 112054 8750 112 -277703 36958 117475 112 -144334 112585 117475 69 -210923 103320 109560 111 -85691 107528 109560 109 -200104 35584 109477 23 -129679 109476 109477 12 -328255 113659 82670 22 -70180 95836 82670 19 -128951 101572 109867 108 -49239 84963 109867 140 -269819 108135 86275 28 -100673 110930 86275 17 -226698 87210 112032 16 -171398 85701 112032 61 -347668 108754 85701 123 -328024 112032 85701 61 -158041 107702 108753 139 -6418 82286 108753 127 -307986 108753 108754 162 -101134 114639 108754 98 -360448 109867 108942 92 -35116 84912 108942 100 -284150 85004 17260 118 -96597 61765 17260 119 -129519 107699 61765 51 -18820 52623 61765 61 -231820 114791 110881 132 -130319 114638 110881 91 -318642 57682 104799 83 -114394 101318 104799 43 -237832 29949 72645 17 -67700 65137 72645 54 -185431 72645 65137 54 -82836 67732 65137 57 -280601 60226 59122 26 -95151 53419 59122 30 -222478 59122 53419 30 -110714 59439 53419 33 -241054 53419 59439 33 -128474 92131 59439 18 -76657 29552 19840 144 -2200 27830 19840 181 -329216 9911 29552 28 -197308 19673 29552 32 -263364 74855 113615 74 -70704 104180 113615 78 -458 10449 30543 32 -345854 85677 114791 115 -42585 107480 114791 85 -301652 76015 97520 53 -336338 19840 19673 157 -46653 44395 19673 37 -101316 115931 108734 13 -358175 76832 74850 34 -219174 34487 74850 30 -347667 108734 34487 20 -35790 114187 34487 37 -20604 74850 115931 23 -232330 410 4196 288 -375520 38645 5532 8 -258535 37401 5532 9 -333348 90033 92828 100 -245531 84376 92828 115 -375541 39067 83387 9 -260567 53614 83387 9 -171774 93794 84863 128 -53210 38829 84863 128 -266238 89705 8421 91 -113568 83777 8421 110 -233698 8421 83777 110 -172119 100768 83777 40 -322522 83777 100768 40 -124492 54364 100768 23 -232895 3677 79624 93 -284031 84285 83521 58 -228369 94815 7915 12 -60384 22262 7915 11 -322462 83388 89305 44 -289812 115307 83388 99 -96103 58874 19439 15 -51733 22240 19439 12 -66740 59253 44445 46 -24040 30029 44445 34 -181660 44445 59253 46 -114509 102974 59253 30 -238765 36460 32572 71 -164858 39025 32572 62 -354433 280 56459 6 -316783 43025 56459 6 -271214 504 57286 63 -213313 3001 622 179 -52990 35535 114787 21 -194166 2736 104794 26 -28231 108651 3657 10 -321435 78213 500 170 -271624 2999 3770 85 -271729 3770 79749 126 -212982 917 2194 126 -321423 78125 78424 85 -225036 78424 402 128 -315983 37171 79659 156 -232884 3621 2999 94 -186401 79224 57748 83 -212999 1050 79020 163 -194070 2231 3000 90 -213312 3000 78214 87 -282782 77290 57749 146 -219928 39158 8067 9 -232555 1783 85228 9 -270766 115290 36836 6 -219586 36836 36084 8 -258314 36084 57430 10 -309393 764 2196 303 -252038 1897 4641 130 -290226 561 2092 144 -290377 1417 57762 55 -301864 77471 1417 114 -205831 79154 96672 23 -22184 11378 49328 16 -258563 37579 57843 320 -242685 66508 80014 367 -280042 55868 65074 25 -140644 65505 65074 31 -281169 65074 65505 31 -97344 66511 65505 154 -277863 38057 66883 35 -184903 68670 3001 198 -265573 86859 104795 40 -289374 112080 78216 278 -336084 17044 25341 9 -25393 46221 25341 9 -72737 7139 25116 71 -44714 22251 25116 54 -366144 99948 35914 78 -229510 99539 35914 17 -376630 67842 13585 94 -16631 28287 13585 146 -244391 78693 4123 286 -309932 4123 65215 264 -246208 87811 52757 27 -85793 108886 52757 55 -202258 52757 108886 55 -163250 28276 108886 47 -335667 11616 80990 37 -221967 55585 80990 72 -359063 91186 25140 33 -10390 39226 25140 32 -56714 104799 72464 63 -311488 12783 4372 51 -292261 12041 5626 10 -28385 112279 111461 26 -270260 111461 83779 79 -245449 83779 86278 84 -245774 85614 75693 9 -187310 83667 87495 43 -140452 64207 87495 35 -173456 113854 22933 131 -47389 52270 22933 131 -329758 17045 91966 139 -231834 114843 91966 108 -231902 115292 17393 21 -127741 75776 17393 28 -207973 90143 70392 46 -98895 83181 70392 43 -223940 70392 83181 43 -87144 6638 83181 34 -226025 83181 6638 34 -72405 2258 6638 27 -340899 100928 17304 10 -47882 58513 17304 45 -223340 65981 63782 82 -158140 108935 63782 76 -263181 73502 73629 61 -70476 101915 73629 32 -185555 73629 101915 32 -105749 29128 101915 55 -213162 2172 2646 179 -248483 97780 1469 46 -321226 76859 91074 54 -7333 117685 111463 51 -269498 105951 34175 45 -174061 934 79349 459 -309435 1126 3079 54 -333326 89850 2706 11 -8502 18505 2706 10 -329859 18197 55499 70 -3708 44711 55499 69 -224710 76257 83389 135 -278201 40610 47731 34 -16510 27116 76341 37 -63176 39022 62293 41 -27621 71945 62293 90 -331096 36658 39962 182 -54683 53985 39962 68 -29257 10848 2370 115 -290547 2370 97951 128 -254817 16459 57508 12 -252697 5776 91478 13 -48687 69160 61197 30 -182250 48886 7313 68 -229951 101749 75694 67 -205290 75694 83962 43 -210644 101781 86770 46 -142485 86522 86770 53 -9768 30383 36539 12 -258406 36539 26390 61 -108711 47367 26390 55 -30092 20089 314 9 -248177 96422 37516 9 -86995 5209 37516 8 -280660 60866 19146 4 -90623 26839 19146 3 -216470 19146 26839 3 -131212 8076 26839 3 -160614 13479 95290 86 -17175 34562 95290 49 -193120 113508 111466 114 -173297 112410 111466 114 -328461 115239 28613 114 -130132 113193 28613 79 -345177 70348 42281 131 -272920 10790 42281 46 -211316 106098 101857 52 -71715 112425 101857 100 -319295 62877 111467 115 -130381 115168 111467 77 -270262 111467 35169 61 -98974 85076 35169 20 -312747 18603 1353 109 -13780 106098 10817 13 -158564 112292 76702 12 -35320 104890 76702 12 -133062 19734 64839 167 -48191 62118 64839 8 -235180 15859 10703 20 -73194 10426 10703 18 -347422 102639 46170 7 -21727 3962 46170 11 -356111 26317 29803 10 -227824 92498 29803 11 -358473 81949 5019 8 -31460 33327 5019 11 -165076 40350 26357 148 -33932 61050 26357 149 -320721 73215 73257 11 -102259 9459 73257 11 -219908 39001 82536 237 -127792 76459 82536 158 -348174 6677 66853 8 -296148 34122 66853 8 -332151 64856 19450 13 -269788 107942 19450 11 -281670 69036 75059 27 -243856 75059 4198 49 -241207 54764 78001 49 -251813 522 57875 51 -280306 57875 79856 102 -356555 33830 5775 12 -215371 14263 5775 11 -373534 11206 69814 114 -34257 64827 69814 113 -320260 69814 76252 134 -128127 84591 76252 58 -268385 99649 76189 52 -142672 90668 76189 70 -282626 76189 90668 70 -140124 62126 90668 52 -350306 38029 6193 13 -283701 82485 6193 13 -194093 2313 79021 252 -290888 4467 4129 71 -117792 15757 12049 9 -48161 61791 12049 9 -358702 86761 107485 7 -280736 61525 107485 23 -35707 113309 113621 46 -353053 94237 104806 7 -216534 19439 104806 13 -282302 73935 38263 29 -279652 52739 74045 14 -141846 73805 74045 12 -282316 74045 73805 12 -125345 59482 73805 11 -263222 73805 59482 11 -141845 73797 59482 7 -282325 74100 60778 9 -109660 53350 60778 9 -241910 60778 53350 9 -156051 73943 53350 10 -174089 1159 41 50 -251744 41 96970 116 -228910 96970 2371 100 -141885 74140 29428 24 -48608 67899 29428 28 -182803 52859 53174 10 -113030 74074 53174 9 -241023 53174 74074 9 -164661 37799 74074 17 -227889 92735 17392 116 -103704 17936 17392 112 -266714 92020 62348 12 -95225 53865 62348 12 -292517 13468 1578 109 -279701 53193 34350 54 -346424 92544 97992 30 -259229 42589 97992 38 -16708 28857 35919 12 -185748 75078 93849 17 -334519 100910 13115 11 -14936 11333 13115 11 -159512 6084 75490 9 -4518 53013 75490 12 -268844 101632 110886 17 -94226 47955 94249 63 -192899 112057 74201 24 -247027 91366 40705 29 -169724 66926 40705 80 -316502 40705 66926 80 -114903 106856 66926 99 -304883 92613 47205 18 -92362 37929 47205 25 -220855 47205 37929 25 -164715 38136 37929 22 -7329 117559 117482 52 -174033 753 57555 66 -252225 3018 48621 64 -258550 37485 110885 4 -250761 110885 77217 6 -239034 37930 38284 36 -122571 43525 38284 50 -261677 62311 52299 26 -150166 36612 52299 42 -298643 52299 36612 42 -140650 65556 36612 45 -183930 61735 52203 17 -67366 62849 52203 27 -245891 86151 64145 9 -365660 95198 47274 11 -298689 52606 47274 8 -227002 88735 66680 103 -21615 117194 49021 8 -221132 49021 3443 8 -174050 884 95492 139 -377749 90431 22718 13 -15111 13352 22718 12 -68373 70121 19953 133 -55197 59132 19953 133 -189971 95638 11170 12 -141655 72585 11170 42 -362153 24135 68622 12 -273439 13383 68622 62 -91449 31177 24000 110 -39160 39481 24000 111 -350376 39374 24668 79 -43658 11157 24668 38 -236306 21550 35626 8 -135863 36396 35626 7 -245087 81901 5240 19 -180565 36415 83897 40 -187345 83874 36415 44 -181559 43608 94839 40 -118135 17794 94839 34 -117617 14566 17496 36 -20454 72362 17496 6 -259998 49237 71158 68 -288567 105999 107495 244 -368480 25767 41709 8 -219681 37516 41709 9 -295729 31889 61869 67 -138373 51578 61869 69 -354349 115870 20440 121 -6646 104664 20440 98 -157859 106048 111470 56 -43134 117475 111470 80 -344999 64402 62231 91 -318161 53833 62231 153 -176163 12351 88081 125 -102103 8221 88081 52 -290376 1411 1379 97 -341389 113156 97566 64 -260509 53217 97566 89 -209683 97566 64402 83 -92768 40308 64402 90 -275734 25175 46456 34 -114425 101745 46456 49 -179470 29546 68055 79 -141309 70520 65383 156 -41886 70933 65383 156 -139607 59046 17770 141 -45334 28361 17770 141 -338339 58123 63755 12 -285614 91550 63755 13 -368992 34061 41124 11 -9690 29719 41124 12 -239697 42726 104802 26 -347266 100537 93589 16 -242636 66143 93589 26 -311215 11334 47021 73 -62520 34058 47021 58 -181985 47021 34058 58 -112170 69295 34058 81 -288422 104861 88702 8 -180373 35335 112037 12 -34861 72769 58404 58 -345595 81008 7833 7 -8431 17846 7833 9 -106237 31561 18629 74 -18163 45765 18629 73 -363231 42671 42258 22 -246826 90502 42258 11 -90782 27716 28310 141 -39973 47763 28310 142 -267290 94690 6819 10 -73051 9715 6819 12 -248972 99798 19359 9 -67287 62295 19359 8 -209886 98366 65482 9 -109810 54130 65482 190 -365223 90897 45602 10 -242738 66853 45602 11 -102466 10847 8640 31 -41196 61552 8640 31 -249031 100087 26957 10 -111066 61489 26957 8 -359687 97616 14273 10 -45026 25116 14273 55 -62558 34557 76493 34 -34335 65887 76493 33 -290353 1287 76186 19 -84812 95736 76186 23 -340246 94598 41092 9 -312708 18430 41092 9 -162098 22080 12065 59 -11202 47443 12065 39 -313735 23729 22080 89 -77184 31975 22080 26 -378597 97983 68881 40 -197773 22080 68881 59 -369559 46651 31889 7 -55508 62748 31889 8 -131207 8035 25924 60 -48170 61869 25924 119 -273128 11733 50059 64 -82851 67842 50059 88 -333389 90341 9792 10 -17325 36456 9792 11 -68679 71997 36371 121 -3675 44469 36371 123 -190990 99987 64856 11 -72200 116489 64856 17 -157445 101975 38512 76 -30304 21991 38512 33 -334479 100646 20033 10 -51412 19059 20033 10 -126841 69752 35505 84 -4263 49841 35505 87 -342259 13760 17212 6 -267556 95912 17212 9 -149326 30283 25032 41 -13071 69918 25032 42 -332903 82654 13934 7 -240113 46463 13934 7 -313981 25069 2321 9 -109771 53976 2321 199 -197875 22715 11603 12 -168725 60369 11603 11 -324323 92253 46575 55 -83758 73924 46575 92 -246960 91031 21790 100 -126540 67440 21790 112 -265060 84180 861 39 -264138 79654 89313 20 -31963 40054 42067 83 -128019 82416 116944 93 -271007 116944 82416 93 -156641 84927 82416 57 -302867 82416 84927 57 -154964 66233 84927 58 -245785 85683 21770 31 -142410 84924 21770 76 -275145 21770 84924 76 -142415 84933 84924 81 -177998 21437 13059 76 -110954 60822 13059 51 -227906 92790 48855 218 -250826 111394 80716 25 -301863 77468 1448 78 -21178 112101 104142 62 -113185 75475 98772 59 -235623 17986 20048 11 -137636 47144 20048 10 -306511 99900 60065 10 -103810 18594 60065 19 -349679 26506 23656 48 -239930 44770 23656 35 -236685 23656 24639 120 -138108 50059 24639 125 -203828 64923 92794 42 -366700 111477 113097 114 -49486 105226 113097 115 -311116 10838 115370 27 -99827 101885 115370 5 -328144 112999 75366 85 -158143 108955 75366 35 -301543 75366 108955 35 -128222 86841 108955 29 -213322 3089 79546 20 -225213 79546 67518 17 -242817 67518 74924 10 -21241 112806 107489 5 -269720 107489 66535 6 -174093 1189 82420 40 -22260 12084 32596 15 -323591 89046 114796 38 -246093 87254 111473 41 -245546 84463 85238 29 -43681 11377 113095 10 -20691 77184 114792 15 -229356 98959 46994 85 -187371 83976 85970 63 -270263 111472 83391 7 -307847 107747 112582 64 -289438 112582 84314 103 -248054 95745 108959 41 -143925 108962 108959 7 -289005 108959 108962 7 -172874 108956 75091 7 -353322 97116 108956 30 -320968 75091 108956 7 -242699 66602 42591 123 -97051 64474 42591 119 -220339 42591 64474 119 -138605 52764 64474 106 -15897 21309 112583 86 -373130 2464 18603 152 -184654 67049 43034 75 -99424 94561 43034 40 -220387 43034 94561 40 -78363 41111 94561 43 -265291 85471 9704 30 -143949 109158 9704 28 -127200 71728 50749 17 -27893 76743 50749 11 -260190 50749 71728 17 -78752 43215 71728 22 -204750 71728 43215 22 -136961 43486 43215 11 -246145 87541 110894 76 -308286 110894 83654 118 -223615 68015 86890 17 -45999 36644 107496 17 -303417 85746 116439 78 -144018 109965 116439 115 -183068 55186 37658 8 -264525 81318 18770 7 -98134 72290 18770 8 -179245 28040 64023 8 -153105 54147 64023 9 -378624 98188 62990 7 -297370 41839 62990 7 -33955 61329 91834 131 -96255 59691 73787 49 -39196 39785 73787 49 -241070 53612 96774 45 -163740 30753 96774 25 -325824 98263 14995 8 -88211 13930 14995 7 -370945 82924 60189 8 -221416 50971 60189 9 -301481 74819 42401 25 -105498 27892 42401 11 -238346 33654 31361 42 -80442 52630 31361 46 -229123 97850 11569 13 -117988 16924 11569 15 -347620 107343 67946 11 -267074 93672 67946 77 -359185 92461 40038 28 -209625 97352 40038 12 -203222 60099 55058 55 -99044 86842 55058 71 -212781 117423 87500 62 -92213 36611 87500 27 -226745 87500 112047 33 -138818 54240 112047 29 -322239 82219 71454 27 -112926 73199 71454 29 -275728 25151 72704 155 -72146 116014 88082 9 -43825 12908 9519 83 -367175 7861 102289 59 -318247 54572 102289 60 -134403 27136 6035 5 -48651 68734 6035 7 -188920 91018 13760 5 -96649 62107 13760 9 -365091 89708 8427 7 -260936 56688 8427 8 -138224 50671 69045 51 -42639 110053 69045 51 -363943 63105 15303 37 -4947 58048 15303 35 -346761 95677 57443 9 -29298 11328 57443 12 -208180 90902 19812 138 -137954 49078 19812 49 -26256 55834 92383 91 -243086 69476 54094 9 -205951 79859 1772 66 -290440 1772 57558 35 -202888 57558 2328 25 -25782 50320 19017 8 -212892 314 16898 9 -94846 51575 16898 9 -224561 75166 20155 54 -152466 50128 20155 80 -308251 110759 111477 114 -144538 114054 111477 86 -289504 113097 116436 99 -98985 85471 116436 57 -302203 79447 93828 19 -21806 5767 2468 13 -175532 8951 113094 50 -193051 113094 74104 279 -142552 88083 74104 247 -333178 87930 88083 11 -282326 74104 88083 247 -244612 79760 79548 109 -8376 17254 42026 58 -308773 114180 115934 69 -366245 100867 61904 11 -293789 19873 61904 10 -107386 40160 39078 133 -38984 36703 39078 132 -266946 93203 7566 91 -150265 37531 7566 58 -128608 94874 37531 44 -48659 68868 37531 18 -317080 45776 113627 7 -333749 93755 15151 7 -29721 16270 15151 7 -141729 72972 5499 44 -5562 65294 5499 45 -137114 44237 53317 44 -13389 73424 53317 45 -361701 17898 53293 6 -287559 100212 53293 7 -334619 102436 19519 7 -38705 32195 19519 8 -113177 75437 23349 44 -4653 54621 23349 45 -156964 92284 76753 34 -25893 51536 76753 107 -250095 106057 80289 61 -170239 70596 80289 77 -298864 54039 66679 30 -174563 3455 68656 70 -262544 68656 2374 75 -290653 2987 10641 64 -308502 112207 37131 109 -210824 102686 51169 71 -186136 77523 77122 87 -313689 23480 46594 88 -153027 53705 46594 48 -240613 49967 29599 52 -306812 101262 30721 10 -139782 59998 30721 48 -276697 30721 59998 48 -124463 54155 59998 58 -259287 43185 95945 41 -68731 72354 95945 64 -190049 95945 72354 64 -112563 71325 72354 54 -84118 80981 71447 58 -214341 9041 46423 114 -143428 104221 46423 114 -281065 64290 33796 115 -122363 42398 33796 114 -364397 77797 37032 106 -259867 48487 37032 107 -251775 231 2057 27 -88148 13585 90555 137 -199521 32489 49073 50 -258304 36019 2471 12 -113406 80368 115942 56 -6255 74829 115942 26 -333646 92723 80368 38 -251456 115942 80368 56 -362324 25924 51388 60 -2484 30381 51388 8 -365632 94991 8035 8 -279506 51388 8035 8 -69819 89009 43346 71 -41049 59789 43346 50 -202301 53233 59438 33 -109613 53068 59438 68 -241755 59438 53068 68 -67000 60777 53068 51 -184363 65108 52742 51 -65784 53266 52742 16 -182793 52742 53266 16 -157190 97201 53266 32 -359642 97099 97201 26 -298768 53266 97201 32 -113029 74070 10329 8 -35466 110087 10329 6 -301354 73867 34034 41 -102597 11790 34034 21 -251522 116420 112054 112 -100983 113473 112054 112 -282840 77752 112585 76 -100203 106050 112585 29 -181686 44653 201 51 -5380 62692 2204 8 -313627 23198 76190 19 -98896 83186 76190 36 -214000 7170 83186 37 -116272 4892 83186 27 -264916 83186 4892 27 -142368 83715 4892 9 -271918 4892 83715 9 -70154 95243 83715 13 -328777 117418 83253 29 -121479 37381 71325 83 -27135 65614 71325 28 -317167 46590 98155 116 -49043 73580 64350 12 -357242 50469 5123 14 -274131 16492 5123 15 -229544 99763 76751 29 -339383 83784 13151 12 -295868 32765 13151 17 -181249 41112 72774 7 -102956 13934 72774 6 -109601 52949 43189 35 -239747 43150 43184 41 -78803 43522 43184 31 -201137 43184 43522 31 -136935 43315 43522 38 -28496 113880 116954 7 -232147 116954 84316 12 -251790 341 49080 7 -259969 49080 67786 6 -213407 3609 234 3 -265058 84176 36766 38 -69564 83644 36766 28 -79671 47923 2966 11 -9163 24423 2966 11 -348137 5769 75770 63 -209397 96137 75770 39 -303590 86540 64963 124 -372097 97409 98396 22 -230308 103870 98396 48 -306198 98396 52543 47 -239006 37750 103870 68 -99638 98396 103870 48 -46986 47614 420 52 -173987 420 97409 31 -290715 3266 80019 46 -193896 915 78608 169 -259025 40981 100168 33 -83008 69183 100168 61 -210329 100168 60487 63 -172085 100121 60487 43 -347004 97810 100121 16 -318967 60487 100121 43 -27993 88149 83780 7 -302035 78438 79033 8 -201761 48880 9456 89 -80838 54973 9456 84 -209439 96341 45095 79 -140139 62241 45095 41 -276917 32526 14764 9 -59923 19775 14764 111 -373363 8394 8073 8 -299043 55760 8073 3 -331866 56934 50612 48 -52833 32679 50612 47 -299531 59403 80973 11 -52864 33142 1439 13 -1919 25348 64608 101 -43454 8073 48880 12 -19022 54932 56934 68 -291565 8342 83254 68 -205362 76197 84799 38 -125749 61863 84799 49 -265162 84799 61863 49 -142328 82823 61863 70 -280776 61863 82823 70 -142373 83965 82823 42 -283763 82823 83965 42 -128118 84386 83965 37 -265032 83965 84386 37 -72907 8586 84386 58 -206815 84386 8586 58 -171363 84733 8586 66 -310724 8586 84733 66 -128945 101369 84733 76 -265148 84733 101369 76 -96429 60736 101369 145 -229883 101369 72778 140 -142358 83330 72778 143 -282170 72778 83330 143 -69573 83766 83330 73 -224723 76341 4893 29 -226127 83847 96714 24 -186828 81259 32897 8 -159321 2816 32897 53 -88708 16753 55162 99 -221922 55162 16753 99 -131614 11069 16753 30 -91209 29850 9426 36 -350032 32923 19499 33 -224789 76836 19499 10 -340369 95754 39115 10 -27400 69833 39115 25 -109785 54039 92867 29 -367329 10641 54039 76 -234846 14338 104821 10 -35318 104883 107502 14 -289831 115410 77858 18 -244355 78419 77859 40 -321372 77859 77642 9 -220930 47731 27116 58 -92218 36658 27116 148 -223453 66932 36658 250 -63504 40807 36658 215 -329105 7966 70564 11 -49364 102498 70564 101 -351884 79278 2302 8 -314508 27461 2302 9 -347451 102898 13130 39 -24813 40147 13130 40 -318176 53967 14128 42 -136547 41070 14128 41 -298642 52278 83843 11 -70386 100456 83843 32 -222966 62859 7158 49 -128772 97845 7158 31 -328032 112094 74216 9 -100946 113253 74216 13 -284016 84173 83331 37 -282609 76065 102735 97 -162809 26091 27212 9 -24236 31566 27212 8 -220662 45676 93961 149 -122712 44245 93961 61 -357805 65490 17788 46 -25077 43136 17788 46 -259789 47764 20630 72 -150961 41620 20630 28 -375614 40689 26532 8 -281974 71190 26532 11 -301952 77938 68949 140 -244247 77647 3289 250 -282966 78536 86895 51 -308889 114940 56803 91 -271491 2173 79428 204 -308357 111388 117485 56 -248720 98797 62587 44 -171325 84035 7155 158 -12600 62704 7155 60 -256210 23785 20669 30 -93292 43176 20669 32 -353440 98155 81901 23 -221780 54076 81901 22 -244035 76179 75947 40 -102132 8502 16290 7 -235267 16290 8502 7 -159732 7670 8502 6 -310708 8502 7670 6 -352544 89342 5155 8 -317489 48989 5155 9 -137844 48206 39543 69 -23272 22758 39543 70 -287019 97733 22478 11 -150084 36061 22478 11 -189161 91966 65828 139 -154141 60902 65828 54 -333089 86878 77985 32 -228161 93954 77985 17 -378535 97496 12783 20 -233728 8589 12783 4 -309285 2 67314 502 -232563 1826 504 98 -286286 94551 35627 74 -172108 100581 35627 94 -182661 51684 22262 49 -140891 67306 22262 70 -275340 23052 67306 71 -78945 44178 67306 88 -196580 16366 44178 29 -158479 111539 44178 28 -245543 84450 82824 47 -159842 8408 82824 7 -316070 37736 61115 37 -83745 73819 61115 82 -243674 74005 98891 29 -161795 20238 98891 13 -359080 91408 64277 30 -324531 93145 64277 11 -151776 45972 25968 62 -24055 30120 25968 62 -300413 66666 36509 8 -119539 25401 36509 8 -377282 82535 17826 8 -257904 33813 17826 9 -370567 75107 53472 91 -52503 29426 53472 92 -352705 90933 22113 18 -228072 93575 22113 8 -245457 83837 90842 148 -83978 76488 90842 124 -171254 82468 76488 48 -10461 40101 76488 78 -313156 20586 74217 70 -98406 73947 74217 68 -49256 86949 85241 8 -377673 89737 17262 13 -283547 81837 17262 25 -166952 50656 24189 50 -55531 62987 24189 14 -311506 12869 50656 49 -96342 60292 50656 76 -221374 50656 60292 76 -156550 82793 60292 75 -221516 51882 15653 11 -109866 54548 15653 11 -330265 23670 65614 8 -243491 72354 65614 37 -116132 600 30573 26 -2832 34946 30573 28 -22156 11024 2187 58 -19161 56320 46337 86 -283063 79234 92628 9 -63000 38068 47043 124 -22688 16660 47043 42 -376465 62774 53967 44 -267538 95813 53967 8 -281442 67262 101733 34 -121447 37223 101733 24 -237757 29255 62499 45 -82230 63169 62499 30 -258338 36212 106998 24 -69879 90167 106998 17 -192178 106998 90167 17 -66555 57989 90167 9 -240182 47044 102103 33 -111822 66093 102103 39 -249482 102103 66093 39 -140701 65941 66093 41 -281294 66093 65941 41 -78688 42870 65941 19 -191442 102026 101734 26 -154652 64300 101734 36 -181357 41975 52782 20 -140815 66734 52782 17 -279660 52782 66734 17 -165603 43019 66734 9 -319831 66734 43019 9 -111686 65216 43019 19 -326611 101941 110238 21 -106764 36012 110238 14 -250667 110238 36012 14 -70510 102131 36012 11 -180499 36012 102131 11 -128995 102043 102131 17 -319953 67728 106215 29 -152874 52632 106215 30 -277810 37710 94361 8 -116353 5735 94361 7 -183936 61753 93645 14 -77096 31610 93645 11 -208810 93645 31610 11 -94346 48576 31610 6 -218618 31610 48576 6 -84835 96035 48576 7 -203705 63914 72274 21 -74841 20051 72274 22 -142333 82947 102498 134 -48803 70564 102498 101 -359473 95355 31448 12 -190595 98315 31448 28 -57734 6279 83055 56 -205360 76180 84102 19 -70206 96386 84102 17 -359440 95082 13209 22 -238612 35339 13209 9 -263135 73131 77983 10 -323318 87681 104820 28 -269356 104820 83900 40 -245381 83294 89981 66 -232677 2419 83658 5 -336369 20130 18805 41 -41990 71981 18805 41 -224948 77860 78609 155 -285637 91628 1568 128 -315611 34795 91218 46 -167885 55620 91218 34 -326052 99151 9405 8 -81466 58754 9405 9 -189978 95659 55975 9 -91595 31853 55975 8 -186359 79016 3090 36 -49284 88894 79143 4 -224785 76831 38417 43 -84974 98304 38417 135 -200553 38417 98304 135 -124579 54911 98304 114 -241892 60675 13658 8 -333900 95096 28966 10 -11258 47912 28966 9 -154194 61307 20685 132 -4504 52725 20685 131 -43856 13224 75455 13 -246228 87956 112050 17 -203879 65272 1265 18 -366222 100627 62295 8 -183671 59517 62295 7 -347996 1480 17846 10 -200889 40940 17846 13 -161695 19747 59348 201 -24358 33107 59348 92 -361215 11973 15469 204 -318839 59348 15469 142 -304370 90125 26878 8 -61025 25572 26878 9 -368594 27105 26292 6 -206834 84462 83716 60 -206651 83178 93284 73 -4577 53720 2020 12 -18614 50448 13324 14 -285744 92153 7849 75 -310590 7849 84865 76 -322693 84865 82972 10 -225011 78235 78706 129 -321759 80142 1896 11 -68380 70156 1896 11 -365696 95566 13940 11 -174492 3045 13940 10 -91312 30390 2278 47 -40681 55699 2278 49 -229417 99174 4679 9 -95859 57437 4679 11 -334042 96399 94890 29 -263570 76250 94890 44 -228533 95517 60964 13 -64524 46182 60964 14 -372557 102556 307 12 -189933 95492 307 72 -150616 39650 5790 72 -48532 66403 5790 54 -224867 77307 1764 9 -290437 1764 78523 7 -51365 18609 36952 36 -315766 36068 54415 5 -139204 56522 54415 5 -183010 54664 60658 8 -34906 73342 115372 48 -70366 100141 72121 44 -30123 20482 72121 32 -322548 83962 89319 39 -74 4533 112588 198 -46163 39216 100881 45 -39710 45037 60609 9 -322637 84521 84735 96 -271940 4995 85016 43 -33876 60366 111483 12 -251171 113807 114207 89 -190568 98218 22507 6 -162457 24163 22507 47 -365747 96069 65851 8 -314629 28316 65851 48 -65218 49845 20105 131 -37156 17211 20105 129 -349767 27527 18315 10 -188816 90585 18315 8 -373116 2124 37537 9 -207866 89710 37537 8 -353664 100143 18229 12 -50832 12662 18229 10 -167549 53950 77133 131 -26062 53593 77133 130 -350654 46461 17309 49 -206453 82029 17309 9 -264828 82660 83717 43 -358306 80451 44766 10 -217707 25969 44766 11 -62963 37858 17067 60 -30282 21840 17067 61 -328398 114842 52741 49 -65708 52875 52741 64 -127555 74058 66459 17 -14877 10381 66459 13 -270625 114375 76755 12 -5211 60976 48332 55 -186203 77985 116441 13 -145432 7143 116441 28 -143698 106630 44286 54 -22767 17469 44286 116 -278629 44286 106630 54 -100237 106421 106630 23 -230681 106630 106421 23 -93087 42028 106421 62 -267000 93403 14796 24 -312956 19684 7326 23 -143869 108290 65276 196 -47458 53195 65276 83 -364606 81789 68868 9 -291437 7566 68868 52 -239366 40075 91513 53 -75364 22672 91513 13 -270922 116365 3071 29 -194211 3071 34306 22 -277319 34306 117484 53 -290302 991 405 8 -330544 26878 14584 10 -211636 108670 14584 10 -364657 82224 25572 9 -176646 14584 25572 11 -149691 32384 58437 123 -43073 116634 58437 122 -355079 13047 33807 11 -304542 91011 33807 10 -108956 48926 77043 46 -35614 112257 77043 46 -349719 26957 17545 10 -247360 92675 17545 9 -370676 80276 61489 8 -27357 69423 61489 7 -364173 70140 25151 133 -46899 46864 25151 124 -92639 39600 54130 191 -24386 33800 54130 224 -355133 13675 14470 11 -228146 93892 14470 12 -104559 22762 38866 49 -47856 58219 38866 47 -335370 6819 18771 12 -242496 65210 18771 10 -257708 32939 58999 9 -151211 42854 58999 8 -376036 51535 14689 8 -326011 99031 14689 8 -371942 95952 58121 8 -183164 55839 58121 7 -307740 107060 87207 52 -322759 85151 5021 9 -236412 22113 7168 23 -188041 87189 113632 37 -240801 51476 86291 36 -213471 4086 36033 65 -84325 85677 9330 97 -24108 30556 9330 103 -290005 116859 77860 101 -345892 86275 87210 17 -322649 84589 87210 67 -350079 33556 100466 46 -220849 47166 100466 19 -249138 100466 52590 30 -170788 74012 52590 36 -318012 52590 74012 36 -95275 54078 74012 24 -299598 60229 53228 36 -65945 54243 53228 47 -182843 53228 54243 47 -141882 74111 54243 35 -279862 54243 74111 35 -171740 93237 74111 25 -333272 89285 8951 272 -36431 9174 8951 295 -9037 23287 21437 50 -264030 78994 507 40 -191285 101244 74167 154 -232001 115934 104161 34 -335071 114820 112057 69 -360565 114117 110909 116 -28544 114595 110909 115 -363349 46423 64290 115 -35580 111903 64290 115 -372887 112001 10440 115 -57317 116380 10440 114 -367212 8685 117493 114 -49405 104062 117493 86 -100064 104825 78849 108 -49185 77078 78849 97 -360494 111893 104825 112 -21073 110123 104825 95 -347802 112997 48608 172 -35484 110804 48608 83 -334958 112335 17341 83 -221064 48608 17341 81 -249713 103227 2832 36 -328756 117317 4003 113 -315859 36512 1911 54 -87832 11536 1911 55 -247748 94338 57664 52 -153097 54133 57664 53 -204945 73108 48968 21 -240460 48968 13769 19 -68805 72716 13769 7 -188409 88943 8079 20 -156496 81696 8079 29 -113706 86902 66233 39 -43174 1201 66233 97 -371007 85478 86902 48 -242647 66233 86902 39 -361892 20041 110914 110 -16454 26562 110914 112 -227059 89009 26562 79 -173358 112999 26562 112 -290021 116990 13730 7 -107012 37837 13730 10 -277383 34632 2464 98 -378310 95443 51549 81 -54755 54611 51549 53 -376573 65668 52980 58 -282285 73850 52980 25 -244316 78139 744 11 -311043 10527 68473 61 -375162 32897 77007 143 -38166 27195 77007 143 -69984 91943 36557 129 -27679 72645 36557 69 -180578 36557 91943 129 -147361 19673 91943 98 -261598 61765 101643 63 -113677 86247 101643 155 -130224 114035 104179 112 -42816 113032 104179 46 -82780 67107 86583 30 -43125 117343 86583 25 -212774 117343 9911 35 -60113 20868 9911 38 -100662 110881 104180 111 -2509 30543 104180 41 -360474 110881 74913 88 -14394 1452 74913 23 -41370 63571 49162 55 -338049 50835 20728 104 -10954 45095 20728 137 -339378 82988 75607 67 -245534 84398 75607 35 -254391 14417 21400 70 -313304 21400 55836 71 -280039 55836 66665 68 -242706 66665 64076 68 -184221 64076 39469 72 -300872 69981 85713 49 -270264 111495 79431 41 -49227 83411 86582 62 -204900 72757 89323 19 -216881 21366 1380 25 -22522 15055 3695 49 -192298 107908 76852 35 -128020 82418 76852 95 -347705 109991 74276 534 -42314 85907 74276 631 -288209 103348 84933 76 -84186 82288 84933 47 -339420 85442 115390 11 -37429 20114 115390 12 -319866 67044 97126 87 -280300 57845 14579 33 -298973 55071 71261 84 -92531 38999 17936 89 -23176 21790 17936 112 -333177 87911 19709 87 -19958 65414 19709 124 -366699 111463 40918 64 -16681 28664 40918 74 -242659 66338 66931 129 -79109 45058 66931 44 -232753 2870 753 60 -260518 53256 10444 48 -99931 103227 10444 32 -244194 77205 78906 138 -239115 38330 81030 86 -110445 57963 81030 71 -367863 17490 19775 154 -177024 16491 19775 147 -322950 85977 24258 67 -227427 90867 53821 97 -200162 35928 13188 40 -237868 30326 57335 60 -241533 57335 72364 61 -185398 72364 4779 70 -213564 4779 19164 67 -216474 19164 13085 68 -292434 13085 57399 72 -318591 57399 2083 72 -209214 95339 10670 193 -305495 95362 6372 44 -271652 3200 77774 253 -271784 4177 78810 131 -224865 77293 85020 163 -283078 79349 2173 457 -282841 77754 78220 656 -186063 77093 78710 222 -290670 3079 78527 51 -296656 36976 934 221 -232086 116416 49608 151 -213097 1660 36054 8 -173991 446 585 184 -309792 3289 2557 298 -308552 112571 67893 237 -296049 33670 77554 56 -308283 110882 37170 68 -244254 77685 67908 94 -302121 78991 79665 78 -271417 1833 65740 89 -270853 115891 37171 107 -285760 92233 76257 71 -244003 76003 83659 67 -261858 63676 5635 11 -69930 91088 5635 35 -196594 16406 21166 110 -148322 24860 21166 110 -294024 21166 55482 166 -77563 35243 55482 67 -292680 14265 75700 33 -70068 93371 75700 43 -185851 75700 93371 43 -145903 10897 93371 82 -347974 998 59068 59 -183056 55109 59068 42 -321467 78444 1067 20 -307400 104551 78530 279 -328449 115188 114820 125 -71849 113683 114820 135 -212388 114246 3367 14 -213355 3367 87506 35 -278365 41864 63336 66 -126119 64134 63336 31 -261806 63336 64134 31 -111913 67033 64134 38 -242381 64134 67033 38 -83707 73529 67033 77 -204132 67033 73529 77 -129518 107692 73529 55 -263185 73529 107692 55 -128753 97568 107692 27 -377316 83908 83334 50 -263605 76402 83334 37 -38092 26463 70573 28 -329493 13709 13657 58 -234822 14223 13657 30 -317376 48332 13876 51 -55104 58215 68113 48 -262224 66392 100663 87 -76747 30022 100663 54 -41856 70573 11690 41 -264807 82527 82231 64 -156249 76198 82231 75 -305742 96412 76198 26 -69533 83078 76198 45 -180843 38239 7347 194 -309892 3814 79829 44 -309537 1765 64097 83 -140587 65074 55868 25 -10006 32284 55868 34 -225124 78930 57980 31 -232980 4196 97875 168 -213094 1637 98959 60 -326675 102323 10713 39 -204810 72140 65755 124 -28235 108959 12669 84 -245462 83885 89575 171 -322667 84725 82980 33 -320125 68870 99112 55 -182069 47749 35164 246 -172245 102511 35164 69 -265318 85644 117508 77 -24882 40705 3439 33 -213279 2783 91366 108 -289237 110866 48642 127 -334692 103714 113654 90 -50084 116439 113654 114 -339452 85938 116975 115 -7081 114145 116975 113 -379434 114045 116464 115 -14178 115330 116464 114 -116026 117042 113655 136 -56643 103317 113655 163 -244411 78785 86908 70 -266704 91980 41276 45 -153001 53438 41276 24 -213801 6084 84800 54 -156604 84165 84800 63 -240111 46456 101745 49 -156880 90902 101745 115 -362967 36054 94224 44 -308745 113979 94224 49 -251429 115736 102356 46 -227478 91055 61226 69 -148317 24841 61226 52 -270508 113459 86593 13 -129266 105079 86593 12 -210096 99244 25076 66 -150823 40843 25076 64 -328687 116810 3918 114 -249855 104205 115391 28 -345090 68135 52611 225 -181530 43386 52611 75 -32282 43386 79760 97 -70306 99002 110930 28 -21172 112032 110930 16 -140181 62534 76004 199 -226063 83389 83257 110 -234807 14161 76197 38 -84283 84799 76197 38 -113344 76924 58560 61 -251630 116979 13740 35 -73770 14161 13740 34 -204234 67767 14161 40 -159611 6777 83460 49 -43314 5777 83460 38 -271919 4893 83847 36 -365807 96714 92233 28 -245360 83124 92233 157 -355431 17393 71275 31 -264923 83253 86304 49 -366731 112539 85716 22 -261518 61189 85716 58 -327913 111398 112604 55 -301852 77377 77704 60 -185409 72464 84738 85 -205583 77704 93432 61 -282574 75852 80238 71 -262893 71275 17845 48 -340421 96238 25478 47 -196889 17766 25478 138 -182545 50951 91086 47 -213272 2744 39427 14 -354241 112459 15802 63 -301275 73238 15802 43 -174573 3493 80659 54 -330367 24815 98846 65 -182675 51777 98846 71 -342096 12002 89009 74 -181523 43346 89009 71 -356267 28613 85471 73 -232090 116436 85471 57 -194000 1721 98888 51 -25804 50514 4280 27 -309951 4280 69840 31 -10768 43212 79669 16 -212730 116987 106098 13 -85166 101857 106098 52 -310122 5319 89332 54 -158726 113654 89332 89 -174543 3317 79863 171 -194019 1898 2001 330 -320137 68906 77938 258 -174677 4180 79864 99 -290604 2723 77647 93 -183332 57033 57981 252 -19817 63394 20336 44 -211740 109560 107528 109 -235503 17352 41104 28 -166645 48658 41104 17 -213185 2328 80358 22 -185672 74601 43883 99 -321415 78081 89329 23 -264875 82932 83059 27 -84255 84084 83059 20 -213252 2646 78912 122 -266517 91074 4769 32 -182282 49189 60216 46 -169468 65051 60216 418 -310442 7155 84035 158 -171297 83380 84035 205 -283926 83639 84173 37 -115400 111501 76924 53 -22409 13740 76924 57 -242593 65892 111501 62 -57452 268 111501 18 -328693 116864 108087 16 -114143 95768 75776 29 -29874 17845 75776 45 -205328 75928 84036 46 -366995 2777 66072 45 -206808 84299 66072 20 -293510 18475 3608 61 -283947 83758 1189 28 -7289 117037 2739 54 -6844 111229 67530 84 -262380 67530 78225 33 -321439 78225 77130 36 -244175 77130 37826 41 -180782 37826 69681 25 -226429 85697 116978 35 -328710 116978 78532 33 -263950 78532 85469 44 -352262 85397 101669 20 -157467 102214 68388 14 -34796 72272 68388 11 -300652 68388 102214 14 -69969 91688 102214 67 -337999 50059 91688 97 -191478 102214 91688 67 -208347 91688 67842 116 -170992 76233 67842 82 -372048 96999 42048 142 -311674 13585 42048 159 -350281 37399 37696 153 -47033 48049 37696 172 -142393 84505 76503 21 -15332 16000 76503 20 -239751 43220 34726 26 -251846 686 74233 32 -18915 53894 65322 31 -369602 48032 75512 12 -37205 17745 75512 10 -181988 47043 38068 124 -59805 19189 38068 255 -374589 24035 24315 80 -180814 38068 24315 127 -329723 16508 15360 9 -305093 93440 15360 8 -336590 23157 27227 8 -324921 94728 27227 10 -374651 24801 63733 9 -286656 96147 63733 11 -230725 106836 86599 13 -65004 48488 86599 18 -248081 95884 37220 9 -205977 79980 101017 26 -251935 1226 97008 42 -180346 35103 74261 517 -114817 105874 74261 345 -290125 77 116466 32 -285247 90020 24089 9 -133585 22711 24089 9 -138052 49702 25425 9 -18872 53343 25425 8 -348627 13595 21167 9 -14869 10330 21167 9 -73145 10140 9250 55 -43564 9688 9250 54 -228110 93741 17694 8 -161406 18119 17694 9 -367023 4078 73938 9 -316223 38625 73938 9 -337791 45109 62085 81 -40601 54823 62085 62 -257395 30574 47166 7 -99748 100466 47166 19 -241117 54078 60229 17 -152958 53228 60229 36 -56721 105035 115961 11 -160427 12237 15186 55 -30446 23437 15186 7 -286917 97288 37587 9 -145749 9588 37587 9 -220189 41405 72199 67 -323362 87896 115964 53 -122458 42895 26500 10 -54891 55860 26500 11 -354316 114689 104850 114 -7125 114906 104850 85 -160165 10440 42494 115 -6877 111638 42494 116 -199843 34047 10838 32 -193077 113183 117519 65 -289455 112686 78125 57 -302884 82554 33670 63 -335436 7859 32633 42 -175904 11069 32633 54 -352299 85907 82360 197 -180412 35520 82360 49 -263772 77409 111507 34 -171430 86506 111507 490 -358834 88678 105951 25 -192448 108796 105951 1183 -90245 24849 81212 142 -327751 109995 111508 17 -191201 100856 15375 9 -76321 27804 15375 72 -267639 96331 27350 9 -65353 50713 27350 22 -187515 84915 8701 53 -69302 76852 8701 30 -258838 39626 59263 49 -99261 91317 59263 50 -35811 114450 113659 20 -14159 115033 12869 10 -49861 113815 8241 18 -101163 114754 89016 33 -27975 86927 85477 28 -287205 98572 20620 9 -86825 1949 20620 11 -205426 76779 85478 53 -328038 112141 86910 62 -13772 105830 97974 9 -225278 79851 13219 6 -94580 50125 13219 8 -336830 26235 70460 10 -175527 8939 70460 9 -369378 41356 25498 12 -304507 90811 25498 9 -234168 11024 97562 45 -160957 15872 97562 26 -43369 6661 69638 14 -209893 98410 3440 9 -88161 13681 3440 95 -296746 37429 13084 7 -101950 6845 13084 8 -104703 23482 2406 50 -38912 35695 2406 49 -264758 82258 61728 8 -94724 50855 61728 11 -99175 89567 41195 133 -8310 16597 41195 46 -316318 39287 79256 7 -280051 55980 78127 7 -259032 41027 78534 11 -171821 94658 6242 7 -45594 30867 6242 9 -211142 104902 69878 41 -257768 33239 5375 7 -261079 57606 79432 5 -72493 4530 60407 104 -364731 84924 103348 100 -250992 112681 103348 55 -290758 3532 1625 21 -366864 116152 116990 14 -238496 34465 116990 22 -229780 100955 116987 26 -361893 20048 15322 11 -283726 82668 15322 11 -378804 99966 17214 46 -179929 33015 17214 8 -72438 2966 17044 10 -39960 47649 17044 8 -278556 43501 37382 29 -84636 92292 37382 48 -207543 88210 65668 53 -222251 57473 1795 59 -27134 65610 61949 19 -358812 88373 74855 35 -294291 22814 74855 37 -340212 94301 90143 55 -191469 102153 90143 32 -249681 103015 68066 35 -345134 69504 14301 48 -222544 59680 14301 47 -375094 31868 49570 105 -222112 56555 49570 37 -321425 78143 86913 65 -333824 94395 38673 23 -23695 26667 38673 9 -6785 110025 49327 6 -376333 59458 29728 7 -304426 90347 29728 8 -338419 60074 19798 9 -285144 89593 19798 10 -183990 62185 34501 66 -126514 67134 34501 18 -258273 35836 1074 59 -304218 89461 111512 50 -293565 18737 83849 9 -142154 77007 19019 188 -12912 67360 19019 53 -338976 75607 82988 67 -20829 95675 82988 45 -341405 113576 73108 9 -192412 108547 73108 9 -331620 50175 94336 21 -211346 106273 94336 33 -366955 1589 55451 54 -183002 54610 55451 7 -331350 43644 39009 8 -201246 44599 39009 9 -291645 8788 87811 17 -194447 4673 90801 109 -356925 41291 87233 8 -291941 10449 87233 28 -336521 22159 96341 89 -205031 73824 96341 49 -268550 100298 49087 67 -194357 3921 66108 40 -219846 38566 110935 10 -335134 116481 52791 10 -54710 54257 52791 10 -306332 98960 5745 33 -244096 76781 83721 52 -142478 86345 83721 62 -370041 59485 115412 13 -271585 2817 115412 14 -349745 27240 49967 36 -227886 92733 49967 10 -299493 59111 52758 43 -122529 43291 52758 30 -87872 11728 6227 10 -11529 50936 6227 9 -234078 10491 280 6 -316823 43372 97810 68 -91068 29145 97810 55 -321099 75878 83661 27 -255263 18543 78129 18 -181098 39838 409 26 -194567 5475 84740 38 -263886 78156 68669 50 -284129 84871 84176 61 -187441 84476 85999 37 -223996 70843 7356 14 -187564 85152 114237 31 -249633 102782 14346 71 -252553 4955 86610 82 -224880 77393 33903 32 -189546 93824 61486 8 -265475 86459 53253 13 -49244 85622 79148 10 -209815 98084 63129 6 -290358 1313 94905 46 -283686 82418 102318 90 -113250 76171 102318 6 -56021 69914 67543 19 -5142 60350 49254 62 -246451 88785 67787 10 -190418 97619 27499 49 -117206 11869 27499 87 -126389 66037 30508 13 -37754 23286 30508 9 -268347 99520 13469 10 -91555 31682 13469 11 -302555 81107 2124 9 -161423 18229 2124 11 -257720 33020 4680 10 -166993 50827 4680 12 -290925 4729 76831 70 -92442 38417 76831 43 -291955 10517 1581 45 -345839 85438 101681 12 -203765 64440 101681 39 -179232 27965 100537 65 -89164 19166 100537 64 -332319 69381 55839 6 -287144 98327 55839 8 -356789 38166 14298 11 -208012 90271 14298 10 -161651 19466 69414 50 -23778 27474 69414 48 -267950 97710 67044 65 -364842 86246 38057 33 -38853 35103 38057 243 -205780 78823 3682 146 -224912 77595 410 187 -192604 109847 106158 12 -211441 107020 107696 13 -219344 35525 86308 13 -54506 51931 49051 9 -322564 84056 79671 5 -244097 76782 99024 30 -88109 13185 99024 44 -6727 107053 83400 17 -309185 117058 8794 56 -42801 112823 55071 61 -49913 114407 114828 11 -76661 29579 14224 11 -10591 41433 14224 9 -335859 14224 3594 11 -206212 81000 3594 11 -222084 56402 3352 8 -331533 48352 75263 110 -174778 4828 75263 130 -328871 1896 3045 11 -190956 99860 3045 10 -348952 17392 91031 100 -278887 46786 91031 53 -363761 57508 26683 11 -286575 95761 26683 10 -61173 26490 57935 86 -41265 62398 57935 48 -306344 99030 61934 9 -101555 117790 61934 10 -286560 95688 62979 11 -95808 57144 62979 59 -188853 90719 58621 11 -74375 17713 58621 12 -225635 81285 10505 10 -167949 55923 10505 12 -344663 55975 29965 10 -269255 104223 29965 9 -360941 7465 14331 11 -34715 71419 14331 10 -87308 7725 75778 36 -39799 46029 75778 10 -301380 74072 34148 21 -102459 10703 34148 8 -202347 53563 100614 29 -59223 15859 100614 23 -360204 103228 85484 204 -208995 94430 7170 22 -314523 27603 14406 30 -108467 46170 14406 30 -326034 99096 63072 9 -159352 3849 63072 43 -266839 92580 13282 15 -169405 64544 13282 14 -207874 89758 6960 8 -102113 8283 6960 8 -369654 49310 41879 12 -209834 98145 41879 8 -274688 19302 10657 48 -181333 41845 10485 55 -214788 11697 109235 12 -211758 109776 109240 12 -84464 88762 103741 8 -35444 109776 103741 9 -172695 107145 74917 7 -22216 11697 74917 8 -43102 117142 49292 18 -4739 55467 77307 9 -248276 96887 14286 9 -258418 36603 72210 8 -335186 123 60511 10 -20122 68179 60511 10 -354186 110726 103734 8 -348069 3446 11739 13 -268129 98522 11739 10 -15381 16436 2220 6 -341885 8681 88735 6 -42413 102304 88735 9 -345079 67786 3609 2 -179628 30752 82090 9 -126965 70330 82090 22 -303197 84756 83526 6 -236392 22005 39871 5 -341955 9499 54721 127 -284748 87584 48675 4 -333088 86877 86920 12 -6481 88785 86920 11 -331702 52185 46009 11 -56592 93146 46009 11 -185462 72925 89342 9 -107274 39543 89342 70 -362789 33431 86310 10 -376729 70061 102907 10 -42279 82080 102907 10 -34971 75053 115410 12 -43139 117611 104201 18 -250132 106253 88111 7 -205080 74299 77401 276 -230156 102913 63913 33 -146667 15510 294 60 -48908 71789 294 144 -366914 271 2034 10 -19424 59130 2034 8 -230085 102610 13565 8 -148964 28374 13565 9 -179938 33044 70438 8 -135413 32467 70438 32 -376145 54094 68895 10 -219170 34472 68895 8 -333273 89299 85260 6 -315648 35185 85260 5 -370954 83958 107060 4 -183743 60342 61225 6 -285309 90234 13574 80 -105744 29108 13574 52 -366710 111973 42339 68 -184521 66146 42339 38 -291909 10218 84108 51 -230918 108069 72211 12 -271152 165 78813 237 -351300 62323 6032 9 -288074 102637 6032 9 -329011 6201 13880 9 -295941 33140 13880 9 -368065 19851 206 10 -229773 100902 206 9 -227667 91846 3446 12 -230442 104722 53614 9 -125728 61730 53614 8 -358551 83265 37401 8 -241185 54564 37401 8 -315822 36320 25643 7 -87703 10502 25643 49 -263951 78545 89026 126 -322151 81884 23689 9 -159483 5676 23689 10 -142240 80768 2896 158 -16094 23206 2896 73 -268678 100818 18868 11 -161765 20033 18868 10 -206318 81451 19306 10 -137109 44195 19306 96 -283572 81924 1636 11 -89833 22718 1636 13 -266374 90439 47230 9 -118601 20557 47230 9 -133480 22067 18719 50 -18153 45711 18719 50 -324606 93469 36478 8 -112000 67930 36478 10 -251890 946 33583 83 -205701 78366 78024 101 -230627 106214 105949 42 -128177 86106 105949 91 -309440 1161 93559 46 -220411 43212 88422 32 -329568 14764 16491 45 -261418 60604 16491 75 -319676 65550 87812 49 -188053 87257 115968 54 -205007 73584 78438 10 -334820 107511 86609 55 -185559 73641 86609 39 -174758 4724 6289 22 -17269 35520 115969 14 -373063 117434 91343 38 -138992 55248 38859 6 -345430 77937 101749 117 -20978 105935 101749 66 -226194 84268 100640 20 -227681 91901 123 7 -7011 113343 76003 57 -33680 58246 31704 8 -207554 88246 116472 9 -50528 9061 113668 8 -322359 82721 84180 45 -43340 6305 113669 9 -315931 36874 78130 173 -224099 71704 86315 61 -305782 96567 85726 48 -9337 26146 2176 91 -327858 110971 79675 142 -323114 86765 117524 10 -270818 115545 417 16 -207878 89766 112080 31 -20435 72199 4294 44 -321717 79912 89029 115 -184237 64197 117525 8 -238847 36877 69733 154 -186438 79469 88423 84 -35168 91185 4353 69 -35091 80738 79569 8 -263816 77725 77403 66 -204125 67009 85259 173 -310053 4906 92883 28 -213326 3104 87819 80 -232235 117614 1075 80 -271137 101 996 70 -186294 78543 57446 226 -205905 79584 79877 110 -322408 83011 83338 48 -4535 53158 8096 36 -278127 39721 93830 132 -170407 71454 93830 73 -12250 58840 3158 6 -357903 68703 63676 6 -5159 60525 63676 9 -289324 111568 34984 78 -75062 21166 34984 179 -221851 54571 66143 23 -114041 93589 66143 26 -366262 101049 14070 51 -209191 95243 14070 28 -195090 8293 83596 12 -85230 102933 83596 90 -369803 52827 84675 9 -319418 63615 84675 10 -279879 54393 86323 15 -127823 76702 86323 14 -303844 87680 112623 23 -84314 85438 112623 24 -370095 61362 14265 8 -11345 48924 14265 8 -28588 115030 114835 18 -174696 4317 96552 35 -96067 58677 96552 35 -187613 85348 75779 22 -84817 95794 75779 33 -310610 7973 92157 67 -82895 68347 92157 57 -213189 2337 102702 30 -35420 108751 51348 16 -221195 49395 63402 3 -47244 50705 64931 7 -231011 108613 18352 9 -298169 48738 69862 35 -268066 98257 70943 43 -319168 61851 61388 5 -187853 86458 4272 27 -253656 11015 34128 63 -133110 20015 34128 20 -342245 13590 6340 32 -245310 82870 6340 31 -310202 5839 82518 30 -57834 7197 82518 6 -250782 111019 78444 49 -225287 79893 998 68 -186072 77142 68670 219 -206962 85344 49427 14 -247488 93146 39715 12 -225808 82080 1754 12 -1699 23163 52914 9 -48623 68127 48989 9 -247574 93608 2605 12 -186189 77876 78230 83 -48358 64049 49042 9 -29538 13958 32114 49 -240990 53025 91408 85 -119996 27914 91408 33 -335971 15692 52394 16 -287267 98820 52394 15 -333176 87906 86926 104 -261700 62498 86926 108 -377275 82436 91800 44 -220437 43534 91800 31 -315667 35280 14338 10 -753 13922 72545 33 -234088 10535 78536 68 -319664 65483 91757 67 -213311 2996 91146 74 -270939 116506 85734 57 -242135 62391 78445 21 -232100 116507 89351 57 -223489 67204 114246 30 -215704 15766 115977 33 -251541 116508 86619 58 -211318 106101 77797 73 -289322 111552 89353 57 -259090 41464 73255 26 -60420 22409 73255 24 -346058 88691 109135 105 -269190 103782 109135 14 -327691 109566 88124 44 -130298 114570 88124 104 -250494 109054 21110 70 -130327 114700 21110 57 -307706 106840 109136 42 -231136 109540 85737 48 -85981 110693 85737 56 -291481 7902 81700 79 -300422 66710 75071 48 -146941 17304 75071 19 -306252 98633 41864 45 -140303 63336 41864 66 -324869 94534 14733 10 -137492 46210 14733 42 -32179 42168 9496 14 -6828 111086 115974 17 -175275 7611 100240 21 -255362 18976 89608 63 -131718 11690 89608 65 -303774 87335 40866 12 -350785 49065 14223 42 -190925 99733 14223 19 -202378 53803 80144 95 -282588 75916 83908 24 -194813 6855 84256 52 -334973 112583 80794 130 -303103 84064 80794 57 -306554 100098 36588 13 -206579 82738 84462 46 -17239 35259 112624 12 -233564 7613 84806 36 -212476 114955 76768 31 -41930 71317 5913 120 -360749 2020 16726 13 -35854 114980 16726 10 -258921 40221 106096 72 -114471 102224 106096 76 -283852 83158 82850 96 -273699 14492 104212 17 -128010 82231 82527 64 -194862 7028 84463 79 -214305 8860 112091 11 -5037 59138 39243 10 -347748 111473 85740 27 -269075 102982 85740 34 -269687 107275 41206 10 -235757 18655 86927 29 -247779 94485 76072 84 -226265 84831 84808 20 -205368 76223 74819 71 -224435 74255 83976 69 -6829 111087 113151 15 -206694 83493 85272 7 -207213 86681 78691 20 -340326 95291 40663 17 -248802 99149 40663 14 -9060 23485 21418 13 -258471 37006 97430 22 -299524 59342 96405 39 -313978 25063 66030 15 -1045 16960 1347 28 -25942 52019 12683 11 -35948 116003 64332 10 -56939 111673 113154 10 -223584 67836 101434 94 -4695 54987 10637 12 -307796 107384 76359 83 -302292 79988 79051 48 -215808 16167 76415 19 -262409 67674 79154 37 -24357 33041 104214 11 -219064 34017 38239 64 -201887 49754 70141 19 -255392 19132 35391 7 -271319 1324 1765 48 -175820 10559 78616 46 -213359 3407 91628 55 -194230 3172 47492 56 -225082 78735 78930 58 -281399 66928 97116 75 -232479 1399 97671 66 -291968 10603 40339 86 -223452 66930 45512 75 -222743 61276 96867 18 -81695 59894 96867 53 -181094 39802 77405 25 -372406 100668 80678 131 -203791 64581 80678 98 -185545 73564 93544 18 -124103 52084 93544 10 -253152 8322 87248 9 -24491 35675 10454 13 -290954 4964 74268 82 -290984 5147 101862 78 -290802 3865 95745 60 -213662 5342 20596 36 -204660 71069 34322 80 -309844 3530 102323 30 -194342 3834 81168 113 -328726 117079 84619 30 -193910 1025 90867 52 -371288 89332 85746 54 -327370 107312 85746 29 -257610 32367 78235 142 -290023 117042 85051 45 -173384 113192 85051 28 -193079 113192 108988 39 -135725 35468 108988 42 -315682 35468 88748 41 -164370 35438 88748 90 -283997 84066 83533 63 -128725 96965 40909 44 -13162 71000 40909 23 -361613 16753 81837 30 -260401 52510 92826 31 -107268 39503 92826 25 -338608 65656 15284 11 -285822 92438 15284 9 -33748 58933 74024 10 -190111 96232 31197 10 -138591 52694 31197 11 -277088 33244 70452 11 -304027 88574 114842 26 -167338 52741 114842 49 -333784 94069 82882 102 -364898 86908 88435 37 -221564 52221 88435 11 -303911 87962 9011 21 -35563 111743 113673 9 -203004 58377 58718 18 -124431 53960 58718 45 -359940 99991 91980 66 -182935 53960 91980 63 -328848 1326 70901 8 -248412 97516 70901 8 -246404 88557 111522 12 -69717 86848 111522 13 -326786 102857 42671 42 -134626 28310 42671 152 -229248 98482 13080 9 -147094 18183 13080 10 -213530 4563 78818 8 -220991 48159 71902 6 -363022 37288 49228 12 -190644 98504 49228 11 -339388 84539 114249 11 -34981 75322 114249 13 -88100 13115 35241 12 -12821 65812 35241 13 -224233 72818 43260 27 -107894 43313 43260 81 -206302 81365 38678 10 -83171 70190 38678 64 -230697 106680 84539 11 -202717 56450 85500 56 -247757 94392 51834 9 -209990 98847 70711 10 -305740 96406 35490 9 -262250 66587 33777 38 -213791 6034 76015 25 -263147 73245 79575 6 -200577 38565 104861 8 -49776 112824 51736 16 -321944 80984 50390 7 -17288 35760 3398 7 -351295 62304 20714 9 -288019 102403 20714 11 -222750 61382 83265 8 -243088 69479 60111 26 -83865 75211 60111 13 -11383 49454 2695 13 -325536 97180 62304 9 -111394 63378 62304 10 -249636 102787 76075 19 -142786 93487 76075 43 -320715 73129 97949 44 -133330 21265 97949 29 -186905 81634 59 9 -75936 25573 59 10 -160571 13211 13538 178 -26464 58213 13538 50 -318830 59258 42589 25 -128780 97992 42589 38 -243499 72524 54226 38 -125103 58136 54226 18 -209468 96425 61005 9 -132797 18132 61005 11 -171646 91218 34795 46 -53463 41185 34795 21 -199885 34192 15901 9 -73279 11240 15901 9 -132960 19052 45215 10 -26766 61339 45215 10 -273899 15425 11194 4 -35504 111098 76900 8 -221657 53019 94954 16 -136071 38165 94954 18 -42533 105175 43444 9 -339027 78534 43550 11 -54763 54697 43550 9 -189168 91995 24160 8 -133951 24797 24160 9 -207941 89978 59086 9 -102141 8607 59086 11 -19038 55092 80580 7 -20946 105033 16692 10 -113594 84312 76137 36 -3684 44523 76137 20 -142355 83304 5105 30 -332539 75427 5288 9 -287329 99119 5288 10 -174699 4340 84398 17 -113202 75607 84398 35 -142356 83319 113153 102 -19031 54999 113153 24 -232699 2538 94416 33 -177455 18540 75526 8 -187295 83536 101049 145 -203054 58771 59483 11 -128300 88619 59483 12 -187016 82172 21284 22 -124171 52431 21284 31 -354988 12049 67577 9 -187035 82234 67577 10 -224892 77441 85267 18 -291516 8122 84464 52 -295639 30979 73984 22 -70290 98613 73984 18 -243637 73628 70889 31 -307124 102727 25969 10 -89456 20651 25969 10 -35330 105029 108376 6 -28622 115604 75525 10 -356016 25140 98275 58 -188008 87065 98275 38 -283502 81649 4551 11 -74926 20436 4551 10 -264954 83432 91055 37 -88809 17322 91055 29 -185213 71006 99244 45 -74692 19286 99244 15 -322590 84212 93528 32 -123405 48134 93528 32 -330578 27350 98315 25 -322420 83099 98315 45 -354823 9680 2139 21 -249247 100929 2139 12 -180759 37687 6245 9 -69378 79726 6245 12 -49975 115037 116483 11 -234691 13566 16567 40 -98952 84589 16567 90 -20483 72617 51882 11 -310088 5134 61190 24 -57035 112826 112089 10 -28333 111644 37608 61 -290344 1248 75078 46 -298397 50162 100006 33 -241331 55911 102414 47 -208459 92252 18289 53 -145579 8189 18289 51 -222921 62478 96238 148 -83915 75749 96238 93 -302437 80643 50469 12 -119464 25018 50469 11 -156820 89622 76355 97 -11539 51037 76355 93 -272347 7181 97170 48 -131535 10274 97170 19 -272284 6872 80221 24 -86860 2594 80221 18 -226057 83354 93075 21 -358092 73655 76418 13 -188455 89085 76418 11 -341739 6227 14263 10 -11987 55812 14263 11 -352714 91086 31624 35 -190493 97962 31624 14 -361143 11170 13383 63 -8873 21973 13383 62 -369719 50696 28658 8 -26336 56667 28658 9 -146374 13761 61526 10 -19184 56547 61526 10 -132731 17731 32530 49 -49406 104065 32530 49 -249225 100835 23785 67 -120117 28532 23785 54 -331842 56384 101244 150 -205003 73524 101244 173 -232509 1523 99995 79 -303691 86986 73655 13 -303546 86374 112620 11 -225070 78655 79447 19 -177556 19089 45670 9 -15570 18281 21391 12 -42134 74554 70712 33 -99293 91966 114843 108 -24405 34626 114843 23 -301747 76802 84870 112 -291947 10483 68658 8 -42620 108843 84183 10 -226223 84553 82529 39 -278169 40189 59485 13 -156243 76141 59485 13 -250923 112149 87541 12 -227265 89995 2860 9 -302302 80046 50548 14 -360645 116483 73131 10 -31327 31744 73131 10 -231031 108818 16225 25 -306654 100457 10628 9 -203032 58617 52606 36 -212857 136 83910 65 -310451 7208 7873 22 -205297 75722 83667 37 -69745 87495 83667 43 -6202 73296 32119 11 -325696 97782 71917 10 -86790 534 71917 10 -98812 81329 14901 59 -33278 53646 14901 26 -186196 77958 79267 55 -269711 107450 6376 24 -101528 117574 6376 13 -185681 74636 106160 29 -100713 111259 106160 27 -211496 107427 107426 22 -171088 78032 107426 16 -356232 28080 57 8 -53982 46540 57 8 -20614 75060 56838 12 -46968 47461 1626 12 -39529 43330 1464 12 -24665 38428 58418 12 -286254 94382 2047 10 -262513 68495 67922 79 -12124 57326 61910 12 -49018 73081 60377 13 -369062 34786 73238 28 -313637 23281 73238 34 -227311 90291 48589 23 -156791 88968 48589 27 -347957 267 28241 37 -55191 59063 28241 11 -289915 116099 54411 10 -193151 113708 103743 57 -100071 104907 103743 54 -379176 106045 88136 28 -327363 107266 88136 24 -230200 103083 103746 26 -144482 113708 103746 34 -198147 24228 99313 36 -68701 72132 99313 39 -285996 93230 71824 12 -60955 25279 71824 14 -263006 72132 90833 111 -139502 58377 90833 104 -335699 12071 56055 9 -223114 63976 56055 4 -302320 80157 71916 11 -146502 14589 71916 10 -230177 102952 58123 11 -78367 41124 58123 11 -325488 96915 13047 11 -122240 41626 13047 12 -326085 99329 13675 11 -117785 15738 13675 10 -102312 9738 61304 40 -51182 16913 61304 41 -281797 69836 102516 38 -78990 44442 102516 38 -374362 20838 92265 16 -183796 60719 92265 20 -279838 54079 32924 8 -68682 72002 32924 11 -263311 74521 86936 36 -173707 116229 86936 29 -128597 94682 76352 59 -6613 104420 76352 27 -70483 101954 83070 51 -27999 88501 83070 27 -122542 43353 55175 35 -10524 40726 55175 17 -281331 66361 60099 22 -80852 55058 60099 55 -261349 59883 91707 67 -64590 46490 91707 28 -244336 78277 85055 37 -231414 111617 34632 157 -307353 104256 52264 18 -69644 85437 52264 50 -358764 87745 114850 81 -271516 2307 114850 4 -26995 63647 114847 7 -320846 74232 83980 50 -240854 51812 77406 58 -184647 67012 77313 543 -174205 1663 78620 35 -263381 74966 805 58 -328529 115657 81867 36 -224658 75903 115754 48 -232897 3686 82289 38 -290912 4612 92461 64 -224638 75723 87254 26 -193408 115464 86337 35 -232229 117569 86338 26 -224714 76301 89046 36 -50976 14767 14196 9 -187358 83935 99199 39 -18118 45362 50175 10 -304749 91957 76011 34 -69608 84722 76011 27 -341164 105979 103320 130 -307816 107537 103320 48 -34064 62553 46894 18 -182958 54172 100190 18 -149148 29428 100190 26 -10810 43812 55156 8 -208145 90788 1326 8 -36031 117060 116477 8 -291960 10536 77567 47 -234104 10596 74260 8 -48050 60243 45706 60 -219300 35281 42689 7 -351848 77547 89047 57 -311336 12022 89047 10 -373278 6662 11851 13 -231041 108908 11851 10 -320825 74036 81609 34 -162889 26515 81609 24 -263622 76533 94179 69 -194282 3494 32717 94 -252350 3801 97780 46 -194168 2743 97226 46 -206819 84401 101342 88 -182954 54153 74098 21 -95063 52876 74098 27 -49588 110017 112094 9 -264778 82412 13676 10 -91259 30104 13676 13 -333511 91420 4189 10 -345559 80716 92790 192 -226088 83626 92790 184 -321092 75837 81948 28 -159468 5566 81948 39 -309614 2207 79577 27 -34435 67935 25246 7 -42477 104442 113149 10 -245770 85584 76353 15 -303958 88245 111530 10 -301718 76607 83347 22 -272144 6028 94395 56 -188059 87268 112631 44 -340998 102356 18848 42 -247446 92996 18848 14 -315054 31834 2888 11 -31937 39836 1582 6 -269399 105193 21583 9 -127183 71587 21583 9 -348203 7072 38478 108 -11121 46551 38478 107 -374245 19549 32151 8 -296689 37139 32151 11 -39134 39139 78037 23 -271160 191 96278 81 -114035 93434 76264 66 -54521 52072 76264 36 -48048 60214 55664 11 -283241 80303 14005 12 -98659 76503 14005 18 -264336 80575 5231 10 -149538 31466 5231 9 -132569 16768 11912 62 -16706 28851 11912 41 -268741 101104 33918 10 -90874 28174 33918 83 -33351 54526 1598 10 -258497 37201 97659 20 -327019 104361 92916 15 -174917 5680 10522 8 -20748 85881 59670 8 -213010 1131 92089 55 -54706 54194 66713 7 -332487 74083 116481 34 -6203 73344 116481 10 -232436 1104 93533 29 -130248 114188 34407 58 -82409 64402 113156 95 -20617 75148 113156 71 -176146 12215 88142 34 -86558 116243 88142 34 -322599 84281 101411 17 -86922 4339 101411 18 -358982 90336 99796 42 -205414 76674 99796 32 -339514 86817 96576 93 -253154 8339 96576 17 -348402 10261 81743 93 -276735 31148 81743 55 -331631 50544 96103 62 -288625 106333 96103 57 -146763 16072 44260 49 -18733 51623 44260 49 -324790 94185 39374 68 -112703 71984 39374 102 -13969 112236 12875 14 -240158 46823 80831 60 -362184 24535 4496 11 -185745 75068 4496 10 -330239 23248 39144 6 -266627 91697 39144 7 -351858 78127 37657 8 -183841 61014 37657 9 -358555 83780 75949 8 -17229 35186 75949 6 -211778 109924 114256 32 -142025 75512 114256 34 -113598 84377 75784 32 -27306 68804 75784 21 -289254 110992 78139 31 -221483 51652 51504 19 -361388 14196 71858 9 -44395 19232 71858 9 -278152 40015 37904 24 -124319 53370 37904 30 -118002 17067 80451 60 -261589 61705 42050 7 -140463 64273 42050 8 -345516 80319 8112 11 -39084 38573 8112 38 -371432 90928 66107 9 -2988 37214 66107 10 -364510 80675 6529 7 -10097 33791 6529 8 -364513 80700 29915 7 -52150 26277 29915 9 -22415 13769 48987 8 -56278 72522 1226 24 -235458 17161 54867 103 -353957 103374 9174 288 -284833 88053 9174 302 -350377 39378 26246 10 -192952 112466 26246 58 -339901 91248 12636 10 -273932 15532 12636 11 -234621 13229 62174 9 -277689 36856 16849 7 -78686 42853 16849 8 -372241 98861 50627 8 -22606 15826 50627 7 -202683 56259 52040 31 -171265 82624 52040 49 -371417 90749 59815 8 -314654 28461 59815 7 -363019 37263 24401 6 -278232 40895 24401 30 -122669 44030 6533 7 -27112 65324 6533 31 -224398 74012 54078 24 -110853 60229 54078 17 -355957 24459 93237 14 -320834 74111 93237 25 -259960 49051 7473 8 -161352 17832 7473 9 -377867 91413 50926 9 -293122 16344 50926 9 -311984 14884 50331 42 -270895 116207 77236 42 -313638 23287 42635 46 -232344 507 78543 143 -113890 90773 58390 43 -56236 72155 58390 136 -331606 49812 113683 134 -334890 109968 104221 114 -38805 33796 104221 114 -177182 17341 73367 133 -29244 10444 117005 62 -60163 21143 75446 8 -309529 1728 77315 156 -242474 64987 56000 144 -150400 38582 56000 95 -199545 32633 76770 61 -157302 99239 76770 43 -263996 78802 35381 307 -143617 105934 35381 318 -329250 10694 41845 54 -222655 60616 41845 134 -308989 115737 83536 123 -212295 113668 87558 8 -182964 54205 28406 9 -122382 42485 28406 9 -196994 18242 43843 80 -128828 99098 43843 217 -213024 1259 84915 96 -58016 8701 84915 53 -125299 59263 39626 49 -42393 97298 39626 154 -266134 89283 71840 445 -57604 4749 71840 47 -322473 83460 85506 50 -308862 114792 84400 35 -308450 111907 76016 31 -328178 113154 48828 10 -299194 56838 74195 17 -270778 115320 50108 75 -285339 90351 68495 124 -301563 75525 76599 74 -295359 28658 13761 10 -81849 60892 13761 10 -241021 53169 30687 10 -154136 60832 30687 56 -372515 102190 72058 7 -213377 3496 72058 8 -218912 33337 7181 39 -142965 97170 7181 48 -255788 21391 2535 13 -302009 78314 80030 53 -352914 92901 13666 9 -252340 3749 13666 9 -370934 82725 61019 7 -223752 69089 61019 7 -365727 95908 14463 7 -233422 6970 14463 6 -299310 57664 72546 90 -120908 33059 72546 46 -340818 100093 21472 9 -215224 13620 21472 9 -29525 13666 10891 9 -11752 53385 77786 9 -320136 68895 2515 9 -370625 78427 81696 14 -291508 8079 81696 29 -305485 95312 76357 11 -364619 81878 49131 9 -308800 114367 89374 9 -175754 10155 41223 29 -99249 91060 41223 31 -373141 2731 48134 22 -281668 69027 19077 36 -21606 117038 108659 243 -251516 116366 37837 35 -114167 96565 37837 9 -347235 100208 47144 9 -41817 70125 47144 10 -366025 98728 15698 47 -317863 51549 15698 91 -174843 5240 100835 68 -292731 14458 50291 44 -306026 97555 2219 105 -364754 85298 108660 45 -34759 71840 108660 27 -367082 5867 22814 38 -228402 94986 22814 13 -156135 74855 5867 60 -28188 105872 5867 70 -210650 101827 117544 58 -188286 88327 65615 16 -215384 14301 41342 33 -172052 99381 41342 33 -298360 49877 55255 10 -309597 2126 78143 70 -261331 59730 43207 10 -121607 38412 43207 16 -339337 82366 15310 7 -53302 39881 15310 8 -265015 83849 86344 9 -308382 111512 84401 94 -208757 93432 58467 32 -339686 89401 86949 8 -290147 197 86949 8 -365606 94741 32116 10 -45255 27670 32116 9 -378475 96903 10413 8 -4127 48449 10413 9 -136065 38099 111539 73 -44204 17144 111539 63 -80334 51943 92621 20 -42376 93062 92621 26 -26004 52757 116486 27 -6021 71403 4020 55 -304745 91943 44395 90 -151320 43483 44395 50 -309155 116794 277 12 -186023 76893 3494 69 -55354 60833 49808 35 -193137 113615 10449 68 -156720 87233 10449 28 -39794 45966 2155 20 -218200 28440 1466 32 -128053 83020 75615 23 -39243 40270 75615 20 -248600 98279 70022 29 -137384 45627 70022 12 -193208 114092 53675 22 -156069 74117 53675 28 -4574 53675 89372 22 -256888 27119 56839 8 -197215 19292 2725 31 -177621 19450 116489 16 -279709 53253 95400 19 -157303 99254 54027 27 -258864 39804 29004 73 -127965 81295 29004 18 -328099 112620 85063 11 -132571 16786 86345 24 -260437 52758 43291 30 -62480 33640 43291 76 -260917 56459 10892 6 -122545 43372 41620 63 -45818 33799 41620 48 -298915 54453 59267 22 -98395 73861 59267 96 -252324 3657 75878 28 -175818 10547 84622 25 -263876 78129 87560 18 -253077 7873 3787 21 -193331 114787 84623 27 -245418 83521 91755 47 -256378 24663 57212 13 -31688 36766 75535 39 -284037 84316 84871 34 -251366 115217 78010 9 -42301 85075 87565 11 -315033 31704 8248 10 -276824 31929 25766 9 -6803 110726 13069 10 -42489 104555 75879 11 -313864 24484 17170 8 -271330 1380 70544 23 -240510 49162 10606 58 -42343 87849 78040 14 -293795 19927 21232 16 -27218 67059 71690 22 -31160 30099 2866 41 -48243 62685 1313 37 -32574 46252 3875 8 -332944 84928 116493 162 -24027 29872 116493 132 -245201 82360 36609 59 -128140 84922 36609 796 -143259 102318 82418 90 -35402 108140 82418 171 -309582 2047 10864 12 -16435 26354 2457 15 -27643 72173 23323 65 -70451 101608 42895 10 -34629 70468 42895 11 -365776 96375 11869 47 -30568 24472 11869 48 -378884 100841 32824 10 -28864 4589 32824 11 -367787 16560 13112 10 -215659 15535 13112 9 -340317 95233 12662 10 -316044 37537 12662 8 -378897 100965 6189 11 -318715 58209 6189 10 -176734 15108 12668 7 -212701 116787 31226 26 -128720 96894 31226 17 -376697 69527 39102 7 -253687 11255 39102 8 -351897 79580 49227 9 -358962 90113 17713 11 -7703 9789 17713 11 -54537 52225 54126 15 -290629 2832 1678 105 -262289 66883 78823 145 -184575 66513 3193 157 -221150 49086 112101 106 -249835 104142 108597 58 -252777 6241 115444 33 -320159 69035 78628 28 -213108 1793 2239 29 -112230 69554 13185 28 -19732 62487 13185 90 -332208 66267 76141 12 -301151 72211 76141 15 -300390 66512 8249 32 -74252 17011 8249 48 -254363 14346 6060 72 -104245 20954 6060 8 -332833 81972 68068 12 -281675 69066 68068 10 -56511 83959 85064 9 -225929 82623 85517 12 -301041 71261 85065 51 -355483 17889 13170 9 -279205 49228 13170 11 -290730 3352 704 8 -51393 18801 2858 8 -69148 75263 4828 130 -56429 76059 4828 56 -63435 40386 20414 73 -1923 25362 20414 74 -365896 97493 70156 11 -758 13940 70156 11 -142492 86686 59039 71 -7139 115137 59039 113 -31913 39570 49045 16 -304989 93024 70153 7 -150064 35761 70153 48 -177888 20733 26490 49 -150635 39789 26490 48 -347298 100888 13142 11 -56355 74176 13142 10 -349851 28682 56454 10 -217486 24968 56454 10 -346311 91499 9789 11 -198699 26939 9789 10 -66969 60608 39650 55 -48763 70153 39650 27 -365141 90160 31853 8 -16761 29300 31853 8 -365720 95815 5751 10 -273663 14331 5751 10 -224644 75778 7725 36 -171819 94620 7725 39 -46817 45985 35514 56 -234859 14406 3962 32 -169968 68614 3962 11 -313816 24260 3849 43 -118596 20493 3849 43 -325732 97925 7723 33 -171278 83022 7723 29 -199185 29825 3097 97 -128427 91379 3097 35 -236000 19813 31799 99 -234523 12813 109 120 -210988 103741 88762 8 -113113 74917 88762 7 -320953 74917 107145 7 -174448 2860 55153 10 -50862 13081 3559 10 -138585 52678 13244 9 -270698 114847 86636 9 -203271 60511 76145 11 -360516 112722 112639 8 -27166 65955 112639 25 -377243 82177 13224 11 -296474 35919 13224 13 -222542 59670 13141 8 -130665 117605 117029 4 -149594 31866 115438 4 -336592 23163 21600 8 -260383 52350 21600 8 -316931 44518 73596 9 -99319 92594 31635 6 -226332 85241 108748 9 -99166 89401 108748 8 -322997 86260 58343 13 -323265 87427 104234 12 -284344 85904 104238 11 -226645 86895 116491 19 -5846 69347 104237 15 -351497 68127 22758 9 -233118 5155 22758 9 -36174 4540 41897 14 -62466 33426 60135 10 -54293 49978 60135 17 -269358 104821 104883 10 -130922 5472 104883 6 -270361 112328 76881 6 -123760 50207 76881 6 -1030 16839 49195 11 -223106 63913 3788 108 -292027 10855 1545 7 -80233 51346 1545 8 -358315 80530 71922 9 -294336 23180 71922 9 -347046 98330 71920 9 -43854 13175 71920 9 -338068 51351 65067 8 -292288 12204 65067 8 -286147 93906 62940 111 -95972 58183 62940 52 -71012 106719 106722 11 -13508 76997 106722 82 -182190 48488 117559 54 -142420 85130 117559 50 -77732 36591 104886 4 -168718 60342 60129 3 -249922 104744 88149 50 -234694 13574 16568 66 -145450 7237 16568 30 -289342 111831 3202 315 -41580 66490 67367 10 -332819 81852 66490 9 -283298 80580 66490 7 -346440 92672 14201 8 -23025 20091 14201 8 -352641 90298 14148 8 -474 10898 14148 8 -347069 98606 72832 8 -44610 21177 72832 8 -46074 38179 200 10 -309157 116811 83411 62 -57883 7752 83411 40 -229809 101051 117027 60 -340295 95074 63378 9 -235577 17741 63378 11 -331283 41191 73993 8 -35105 83387 73993 9 -373407 9091 19804 4 -7819 11302 19804 36 -322935 85935 113167 257 -69362 78992 69295 90 -24026 29859 69295 44 -345495 80165 9322 11 -314669 28600 9322 11 -345482 79972 57251 12 -29299 11334 57251 64 -356451 32885 19059 10 -313269 21189 19059 11 -366271 101127 15940 12 -365761 96214 13918 9 -182056 47641 13918 10 -355221 15010 13352 12 -221003 48234 13352 11 -343727 34024 17548 8 -256868 27030 17548 9 -340902 100950 29347 11 -273299 12635 29347 10 -359182 92437 26945 9 -243845 74997 26945 7 -295837 32638 29401 132 -63067 38467 29401 35 -252431 4167 78366 43 -317606 49723 1161 104 -260250 51348 19472 19 -97310 66275 19472 9 -126220 64803 50347 89 -45141 26508 50347 117 -311078 10670 3407 93 -236286 21439 10427 111 -309217 117293 112099 123 -278004 38859 55248 6 -231677 113575 111548 8 -54628 53320 71885 10 -270436 112974 85072 35 -261995 64538 48514 32 -37741 23183 61485 88 -321567 79020 36838 131 -186102 77285 77665 81 -307439 104794 79584 61 -173943 129 4086 183 -202914 57748 85283 52 -316110 37971 110971 90 -328678 116723 79457 169 -271824 4369 85284 152 -251800 417 34597 18 -281683 69104 78942 192 -211128 104795 91547 13 -213103 1703 79167 114 -225060 78609 85515 150 -281656 68949 77499 129 -187894 86609 67340 250 -289343 111839 77576 35 -232390 789 74945 160 -283098 79524 1798 57 -321341 77684 77725 130 -197019 18371 3094 127 -308758 114051 37948 64 -282755 77109 89837 108 -271223 560 35836 115 -219055 33992 112106 138 -174457 2906 77958 75 -263849 77922 2243 96 -245045 81700 6332 52 -114936 107223 57963 142 -24917 41104 57963 18 -377461 86774 91088 30 -174900 5635 91088 35 -260357 52191 83916 16 -91786 33018 83916 40 -205991 80062 35243 55 -127595 74502 35243 10 -336389 20456 95243 20 -187321 83715 95243 13 -350330 38567 104890 12 -254265 13796 104890 14 -228804 96552 6796 68 -159571 6392 6796 45 -283038 79148 85289 17 -303072 83755 94393 21 -155407 69704 94393 23 -281120 64754 87849 19 -65124 49377 87849 11 -208454 92157 370 64 -99201 90016 370 29 -340174 93925 56230 15 -190495 97974 56230 13 -30031 19472 65550 40 -281810 69862 2337 43 -3185 39472 72366 8 -46303 40536 2600 10 -33896 60580 67154 14 -4802 56230 74251 16 -252447 4272 78944 26 -361617 16765 89560 12 -233158 5377 89560 21 -121027 34128 11015 63 -18744 51689 11015 56 -275879 25786 3573 51 -83959 76287 3573 68 -187103 82518 7197 6 -98722 78282 7197 16 -115167 109566 114277 40 -21287 113438 114277 35 -244365 78489 1964 50 -270371 112399 79893 71 -244331 78216 77142 401 -321336 77642 79991 30 -11651 52185 10695 11 -263606 76418 87848 12 -300677 68607 79461 21 -50260 5155 14536 10 -232716 2605 55762 15 -212663 116477 85763 9 -30732 26028 46604 48 -261962 64277 27914 14 -153937 59686 27914 30 -364488 80384 7111 11 -202215 52394 7111 15 -311298 11851 50409 24 -63949 43401 50409 48 -233697 8409 99538 61 -254124 13209 11345 9 -299260 57282 67349 34 -25190 44440 10528 133 -230106 102723 4237 35 -337403 34645 94578 61 -205038 73910 94578 132 -302037 78445 34047 21 -289725 114690 113183 91 -52981 35457 116506 93 -272926 10801 58559 31 -291168 6098 116507 97 -277714 37032 116508 88 -49801 113091 111552 32 -7251 116420 114276 81 -184026 62404 22409 41 -98390 73838 22409 19 -211244 105531 117036 68 -71260 109054 117036 73 -269512 106048 113702 40 -85633 106840 113702 41 -187879 86552 117037 37 -115165 109540 117037 46 -232200 117376 117038 72 -71091 107537 117038 52 -255742 21110 35244 92 -113670 86102 35244 94 -184368 65181 66710 38 -156159 75071 66710 48 -269749 107692 97568 27 -168701 60236 97568 20 -346968 97489 28507 14 -291796 9496 28507 15 -45345 28507 12021 18 -53207 38811 40893 13 -176459 13657 1785 57 -71117 107652 1785 30 -33051 51085 7902 41 -187421 84241 97540 26 -213421 3728 83675 73 -22089 10049 56099 77 -239480 40866 12802 25 -128334 89608 18976 63 -4426 51702 18976 36 -206689 83449 83479 61 -226054 83316 84751 35 -205421 76755 113186 13 -308697 113632 84877 34 -322315 82509 83918 116 -356556 33833 101914 20 -300027 63748 101914 71 -352574 89700 50448 12 -219533 36588 50448 14 -290051 117294 108888 114 -185904 76198 83078 45 -165150 40656 83078 51 -270443 113095 84686 32 -206810 84314 38918 80 -347752 111574 117569 29 -328393 114796 17955 26 -84217 83094 17955 27 -224685 76072 76274 75 -225147 79051 86643 28 -46489 42401 23062 12 -231391 111483 117045 12 -264911 83171 99149 27 -107501 40663 99149 14 -116161 1804 60949 18 -2679 32050 60949 80 -193933 1232 80015 97 -290301 990 92991 107 -322670 84735 86357 79 -239520 41206 114874 10 -319609 65063 84194 108 -260020 49427 113184 20 -297018 39243 13943 10 -291396 7347 76275 141 -182465 50422 84551 58 -176247 12683 3568 10 -194104 2374 79902 46 -204378 68931 94485 50 -282596 76009 88454 24 -243841 74940 78735 59 -18293 46994 66928 112 -28557 114659 66930 60 -250483 108956 10603 71 -314712 29056 1399 76 -195732 11880 30228 101 -126193 64581 30228 47 -297244 40945 69160 37 -74213 16790 69160 20 -302448 80678 50357 123 -78606 42321 50357 67 -289901 115974 112122 18 -229961 101862 4259 91 -185627 74268 71069 82 -259750 47492 3865 43 -42935 114660 5147 51 -181046 39486 4964 90 -265177 84861 4913 113 -194068 2202 78153 35 -225935 82641 33469 41 -278426 42339 73641 25 -69695 86609 73641 39 -227395 90697 63394 58 -68004 67645 63394 31 -268025 98100 4117 188 -191915 105176 116513 69 -193426 115529 7006 67 -142417 85051 117042 45 -28562 114710 117042 87 -71253 108988 113192 39 -57048 112997 113192 143 -171528 88748 35468 41 -43118 117248 35468 120 -337451 35899 10109 9 -3988 47227 10109 10 -62389 32633 11069 54 -37162 17262 11069 25 -170785 73995 21899 25 -23492 24713 21899 23 -378771 99655 24301 10 -105704 28886 23276 11 -7488 6329 23276 9 -376179 55259 43374 10 -270456 113149 43374 11 -206719 83717 33155 25 -212063 111983 34348 13 -158759 113873 34348 12 -85244 103091 53655 9 -115350 111150 34349 12 -10107 34348 34349 13 -253305 9011 111568 16 -135650 34984 111568 78 -269402 105207 86961 59 -261217 58718 53960 45 -69986 91980 53960 63 -297287 41276 53438 24 -172164 101423 53438 100 -215827 16243 71959 17 -157242 98189 71959 36 -376317 58919 83608 12 -193169 113795 83608 12 -346772 95770 47763 12 -278413 42258 47763 12 -353869 102331 4825 11 -292433 13080 4825 9 -261181 58431 79784 44 -200333 36952 79872 44 -356787 38162 53637 11 -16584 27742 53637 11 -332025 61274 84687 11 -216785 20764 27742 12 -110037 55616 27742 11 -331162 38535 84752 10 -219337 35490 11333 13 -135500 33123 11333 10 -203856 65132 53028 42 -62502 33765 53028 18 -239760 43260 43313 81 -127920 80392 43313 93 -26407 57477 72953 11 -206985 85500 116515 70 -200709 39493 34320 43 -211965 111383 96812 44 -290048 117278 89380 11 -30863 27326 61381 11 -257108 28237 71971 12 -296071 33777 6034 34 -221537 52032 77326 66 -13116 70296 68957 27 -250876 111881 87263 44 -204289 68055 94527 91 -28905 5532 78248 8 -201149 43365 38182 31 -171115 79308 38182 16 -298239 49159 69479 118 -110837 60111 69479 26 -245357 83111 83276 18 -87377 8337 83276 30 -353230 96189 19724 9 -185161 70614 19724 9 -364597 81737 12031 9 -214116 7911 12031 9 -273787 14936 66678 47 -108002 43945 66678 48 -353594 99506 14241 9 -201482 46820 14241 8 -359858 99373 11546 10 -320842 74213 11546 9 -271150 164 15861 9 -78294 40643 15861 10 -333451 90894 37670 10 -275628 24693 37670 10 -339129 80486 27195 10 -288370 104639 27195 10 -375268 34132 25196 9 -201014 41999 25196 9 -365908 97611 12249 9 -274863 19996 12249 12 -340154 93708 27455 7 -232633 2220 27455 7 -378731 99138 11240 9 -9235 25196 11240 9 -219144 34366 26354 12 -125788 62050 26354 13 -140594 65157 34532 17 -38428 29691 34532 21 -107178 38963 59609 10 -293181 16692 73837 11 -66016 54625 73837 11 -333508 91388 63777 11 -20368 71470 63777 9 -258557 37531 94874 44 -66496 57586 94874 36 -244558 79510 14015 10 -145444 7210 14015 9 -334036 96328 1949 12 -19850 63777 1949 11 -327996 111895 86039 73 -301947 77920 78463 46 -345931 87053 85075 11 -282576 75854 85075 12 -252991 7326 83735 35 -261663 62227 6815 68 -206807 84298 33931 23 -240923 52431 59379 38 -78009 39012 59379 29 -65985 54466 15757 8 -29890 18031 15757 10 -377618 88878 88778 11 -10108 34349 88778 13 -284464 86291 104902 23 -192852 111661 71045 13 -291727 9185 73628 33 -112461 70889 73628 31 -150708 40166 38720 9 -18036 44766 38720 11 -352743 91406 45620 9 -5336 62276 45620 10 -212890 296 86040 71 -263530 75949 87855 8 -303038 83516 84268 58 -320824 74034 85766 43 -101270 115626 85766 39 -349904 30018 30123 10 -195604 11242 30123 11 -299719 61226 76421 50 -97954 71006 76421 40 -294667 25076 118 63 -142384 84212 118 18 -98647 76378 50713 63 -2599 31448 50713 25 -322431 83167 101028 37 -166219 46363 101028 22 -15293 15653 14096 12 -167660 54504 46818 10 -27185 66381 46818 13 -205507 77286 51997 63 -49247 85963 88456 10 -274799 19772 1390 19 -184966 69118 50162 11 -113237 76036 72863 51 -257260 29355 74066 16 -65855 53710 74066 25 -322441 83257 83206 60 -83982 76525 83206 42 -378270 95111 20170 13 -233293 6193 20170 13 -340001 92320 29346 14 -252589 5123 29346 17 -194496 5097 96755 10 -57652 5437 96755 18 -281583 68326 61702 32 -72709 6873 61702 43 -322521 83771 83354 33 -114207 97562 11024 45 -22139 10425 11024 30 -378140 93863 11728 11 -14539 5775 11728 12 -320333 70263 13479 49 -68499 70930 13479 50 -353455 98291 2594 13 -19352 58443 2594 11 -334881 109686 83610 11 -43428 7646 83610 12 -101955 6874 72585 50 -41703 68622 72585 41 -353121 94939 100141 21 -185377 72121 100141 44 -334445 100327 16177 10 -274290 17177 30270 32 -142692 91071 30270 43 -141800 73524 28532 79 -30148 20669 28532 57 -194516 5214 4774 33 -44026 15069 2542 80 -271455 2000 85520 83 -224876 77363 86355 48 -284285 85716 73260 19 -142499 86780 73260 19 -185610 74190 102473 10 -322694 84870 83018 104 -300688 68658 65905 61 -301929 77774 82872 90 -291108 5764 84553 79 -261930 64145 10218 30 -174096 1195 34492 59 -227026 88827 5073 36 -245514 84295 8116 19 -300194 65051 91612 396 -94299 48324 91612 44 -297148 40236 38000 48 -164611 37402 38000 81 -235429 17046 66381 28 -89079 18777 66381 12 -46950 47274 3901 42 -46222 39780 40194 11 -84244 83667 75722 37 -9141 24158 75722 91 -210373 100427 136 75 -356500 33366 10425 15 -238009 31624 10425 14 -230496 105226 109143 70 -83109 69848 109143 33 -272750 9704 109158 28 -98492 74636 109158 29 -352315 86091 117574 9 -232056 116213 117574 37 -358715 87017 78032 10 -328384 114656 78032 10 -190727 98846 44275 41 -128598 94694 44275 85 -378342 95764 97890 19 -252094 2185 97890 35 -345984 87685 116014 10 -183517 58364 116014 11 -319991 67922 78249 21 -170712 73238 23281 34 -3639 44275 23281 33 -378616 98135 96124 22 -260510 53218 96124 67 -30764 26390 55685 63 -70655 103743 113708 57 -42971 115254 113708 40 -141899 74385 104907 33 -21204 112450 104907 71 -157987 107311 114290 28 -57270 115886 114290 71 -189608 94085 72132 47 -128401 90833 72132 111 -286789 96793 58377 45 -81459 58718 58377 18 -178892 26037 56030 11 -141680 72711 56030 11 -353493 98680 35648 12 -7882 11973 35648 156 -370583 75536 48564 10 -295463 29476 48564 11 -379044 102842 29719 12 -203688 63755 29719 13 -365593 94653 14066 11 -257902 33807 14066 10 -378561 97676 13140 11 -254400 14470 13140 12 -239862 44119 9841 27 -70577 102958 9841 33 -143275 102516 69836 38 -55392 61177 69836 75 -92363 37960 44442 27 -7679 9562 44442 93 -66988 60719 44189 22 -10865 44217 44189 34 -127600 74521 113193 36 -29169 9704 113193 35 -195524 10703 10426 18 -144421 113308 10426 22 -194391 4206 43212 38 -99120 88422 43212 32 -176255 12725 46490 25 -99525 96362 46490 35 -333281 89416 85076 52 -219276 35169 85076 20 -311112 10817 104256 10 -214294 8794 104258 56 -141074 68778 104258 4 -65903 53958 116522 24 -20897 104258 110990 84 -205627 77928 79469 111 -175208 7168 115657 29 -245179 82289 11074 70 -184937 68948 115470 68 -260297 51737 113712 39 -36446 9399 4835 21 -276846 32063 70205 83 -309240 117485 83081 45 -203492 62178 83419 65 -224665 75947 84338 43 -189664 94336 58489 64 -264965 83532 39311 31 -270866 115961 77245 15 -259689 46894 39570 17 -127243 72011 39570 16 -311507 12878 48658 27 -81775 60397 48658 21 -325570 97320 29134 175 -320104 68745 49196 176 -33174 52350 61196 9 -29000 7473 1605 15 -17144 33431 222 13 -48750 70061 65244 11 -309251 117525 86359 10 -221981 55664 37513 11 -247884 94927 64993 87 -28556 114656 75103 10 -69008 74107 41187 32 -52365 28143 41187 30 -40575 54613 16606 61 -294314 22984 59935 8 -262722 69947 3801 9 -5130 60216 2743 49 -208812 93679 64907 30 -355896 23601 80865 14 -318047 52876 80865 22 -185916 76246 78465 41 -196349 15260 83677 39 -56357 74216 5552 22 -174680 4189 14247 5 -156218 75837 14247 21 -244034 76177 82874 93 -111522 64019 82874 55 -327824 110723 5566 74 -142389 84425 5566 36 -322459 83381 8120 42 -357837 66652 13320 45 -300333 66072 13320 39 -193366 115161 43146 59 -127969 81383 43146 48 -7245 116343 76813 25 -169888 68085 22906 9 -260878 56169 48786 87 -185939 76328 76607 68 -262691 69681 87268 28 -206983 85469 114291 89 -246252 88081 8454 31 -140962 68000 8454 51 -338475 61507 68194 6 -53720 44157 68194 52 -277721 37144 57817 43 -250618 109964 94942 54 -118911 21965 90873 10 -340324 95281 71587 9 -262794 70422 71587 8 -239133 38478 25186 186 -153926 59645 25186 85 -279155 48939 22620 22 -164429 35956 22620 5 -130924 5505 10716 7 -184049 62534 99867 215 -133429 21808 99867 25 -346205 90485 8851 9 -293570 18746 8851 10 -126303 65376 16768 31 -41508 65450 16768 32 -345337 74319 12185 8 -216926 21656 12185 9 -4549 53349 56047 58 -53096 36936 3958 22 -9328 26065 38096 8 -53943 46179 68960 12 -365834 96925 56315 8 -25147 44098 56315 8 -372552 102531 44098 7 -233584 7720 44098 7 -174026 698 77419 14 -265691 87397 70055 151 -286967 97487 110992 84 -100935 113156 21736 95 -7925 12351 21736 160 -115032 108128 36611 49 -21174 112047 36611 18 -98001 71426 4339 27 -18076 45073 4339 17 -268432 99796 54228 33 -66595 58300 54228 45 -376706 69710 94185 63 -314914 30807 94185 35 -245055 81743 66365 97 -170831 74523 66365 51 -376597 66365 71984 102 -23440 24215 71984 125 -236883 24668 24215 102 -153121 54232 24215 125 -368354 24215 80442 102 -220650 45595 80442 44 -190150 96386 2484 13 -188357 88648 58911 31 -264402 80831 21558 56 -140917 67572 21558 17 -306364 99103 10548 9 -333621 92413 13325 10 -200856 40709 13325 8 -340385 95872 53015 12 -38419 29649 53015 12 -337439 35702 24789 8 -8006 13325 24789 9 -339783 90251 23761 7 -1318 19752 23761 7 -131019 6486 10486 49 -54610 53149 10486 13 -352588 89801 2186 7 -272146 6035 2186 7 -300608 68059 38179 15 -113730 87383 38179 10 -313305 21418 68523 14 -282057 71858 6362 9 -276085 26839 8076 3 -109024 49481 8076 3 -259438 44766 21840 11 -352737 91349 24906 12 -221745 53705 24906 39 -100151 105578 28722 30 -16244 24587 28722 84 -251646 117073 77070 12 -21710 2418 114891 20 -191803 104262 8268 63 -233675 8268 37774 118 -193996 1699 2505 10 -188921 91027 66413 53 -242673 66413 76609 95 -185984 76609 84880 77 -283930 83675 88159 23 -27949 84121 104262 13 -171594 89925 30463 64 -19260 57511 30463 30 -314886 30463 89925 64 -151579 45002 89925 43 -165198 40872 26631 69 -47553 54467 26631 71 -131431 9710 26218 67 -38595 31318 26218 69 -143139 100831 60611 74 -40346 51825 60611 59 -280632 60611 100831 74 -104539 22670 100831 23 -343890 36642 39505 19 -245113 82005 39505 11 -33092 51518 67598 36 -323172 87036 7444 8 -271897 4774 106836 33 -99034 86599 106836 13 -259876 48540 1584 11 -322852 85585 3982 45 -309912 3982 99229 60 -249859 104215 79980 57 -233852 9174 10457 369 -136061 38057 10457 108 -272856 10457 35103 308 -69019 74261 35103 517 -121478 37375 72751 36 -27030 64048 72751 32 -263085 72751 37375 36 -128900 100624 37375 31 -258528 37375 100624 31 -131547 10332 100624 26 -95788 56904 62996 14 -9032 23236 62996 10 -222989 62996 56904 14 -77816 37435 56904 22 -202784 56904 37435 22 -156050 73937 37435 18 -296749 37435 73937 18 -142613 89711 73937 11 -282304 73937 89711 11 -76754 30046 89711 11 -207925 89894 23601 12 -123787 50312 23601 19 -42083 72886 68717 31 -345370 75215 95407 27 -320826 74038 95407 46 -110889 60454 31618 9 -19429 59209 31618 8 -377304 82863 16356 9 -236418 22135 16356 8 -346528 93606 19438 50 -52444 28931 19438 49 -345594 81005 32426 49 -199721 33520 32426 48 -317940 52040 82624 49 -91049 28999 82624 26 -164614 37437 71121 45 -48641 68548 71121 27 -320462 71121 37437 45 -167888 55633 37437 25 -271602 2910 76080 9 -39110 38920 8121 85 -253117 8121 96691 86 -247965 95369 14251 10 -174042 807 85297 36 -190246 96755 3872 38 -321427 78176 86969 54 -226313 85149 104269 11 -194227 3161 87270 62 -260409 52619 10825 10 -323537 88786 36615 11 -315876 36615 68125 16 -84692 93364 68125 32 -204293 68125 93364 32 -97348 66550 93364 27 -227873 92679 48050 7 -134372 26975 48050 10 -371810 94445 39183 9 -274981 20652 39183 8 -137308 45118 16633 49 -45439 29408 16633 49 -120538 30803 28095 47 -52592 30138 28095 46 -264426 80916 27523 11 -153241 54970 27523 17 -244198 77236 77965 166 -377410 86135 90773 25 -241641 58390 90773 43 -21663 117727 35167 22 -321100 75879 8122 23 -185804 75446 21143 8 -127186 71653 21143 6 -348424 10825 71653 11 -255751 21143 71653 6 -204619 70831 6160 67 -194690 6160 5485 58 -213685 5485 82554 43 -277907 38302 65494 9 -214380 9214 35520 168 -69487 82360 35520 49 -70927 105951 108796 1183 -230585 105935 105936 142 -114809 105785 105936 202 -250080 105936 69213 951 -366528 105934 110488 191 -277480 35381 105934 318 -143675 106429 105934 118 -289189 110488 106429 283 -99816 101749 106429 164 -230653 106429 105935 112 -100192 105936 105935 142 -202530 55170 88164 8 -221089 48741 111581 16 -268530 100198 37109 62 -64626 46628 37109 60 -259350 43843 99098 217 -126793 69335 99098 147 -364885 86706 89074 16 -6719 106342 89074 17 -113034 74105 69554 18 -21681 377 69554 37 -243101 69554 74105 18 -154789 65155 74105 37 -301386 74105 65155 37 -95288 54111 65155 48 -223241 65155 54111 48 -96382 60460 54111 44 -221785 54111 60460 44 -67571 64179 60460 33 -183754 60460 64179 33 -99338 92889 64179 15 -375219 33640 92889 71 -223129 64179 92889 15 -239146 38582 81933 69 -270343 112170 34359 8 -36148 3115 71346 10 -8134 14865 1614 15 -251550 116557 87275 28 -184979 69233 17990 55 -293411 17990 76777 73 -321207 76777 61596 56 -319126 61596 62382 36 -310260 6180 82709 6 -187157 82709 62383 66 -299854 62383 75723 69 -185887 76016 84820 43 -284114 84820 76778 41 -321208 76778 86658 55 -269601 106724 84554 15 -72882 8272 84554 26 -206845 84554 8272 26 -128083 83737 8272 48 -253150 8272 83737 48 -157509 102970 83737 45 -303071 83737 102970 45 -98920 83923 102970 58 -230178 102970 83923 58 -157502 102893 83923 96 -303087 83923 102893 96 -70580 102982 102893 77 -191599 102893 102982 77 -128168 85740 102982 34 -28101 104373 7739 67 -213110 1804 10945 5 -156561 83144 10945 12 -292049 10945 83144 12 -87221 7216 83144 19 -226022 83144 7216 19 -84234 83484 7216 17 -194896 7216 83484 17 -131071 7025 83484 12 -283897 83484 7025 12 -57471 1306 7025 9 -175179 7025 1306 9 -127978 81515 1306 42 -251946 1306 81515 42 -155904 72869 81515 40 -302651 81515 72869 40 -69219 76021 72869 10 -185454 72869 76021 10 -113236 76017 76021 18 -244005 76021 76017 18 -83914 75724 76017 17 -205339 76017 75724 17 -156255 76278 75724 23 -301597 75724 76278 23 -69548 83357 76278 31 -185924 76278 83357 31 -171339 84340 83357 41 -322453 83357 84340 41 -128098 84125 84340 38 -265091 84340 84125 38 -84248 83800 84125 17 -206787 84125 83800 17 -127722 75557 83800 15 -265006 83800 75557 15 -157483 102512 75557 17 -301572 75557 102512 17 -160680 13941 102512 7 -326713 102512 13941 7 -57569 4338 13941 8 -176519 13941 4338 8 -142074 76279 4338 16 -271816 4338 76279 16 -57881 7749 76279 16 -185925 76279 7749 16 -83934 76018 7749 16 -194997 7749 76018 16 -128034 82710 76018 17 -263537 76018 82710 17 -142075 76280 82710 30 -283743 82710 76280 30 -128130 84631 76280 39 -263582 76280 84631 39 -57770 6666 84631 26 -187467 84631 6666 26 -99367 93538 6666 12 -298792 53448 99932 27 -140708 65984 99932 17 -206711 83612 42595 12 -278453 42595 76779 15 -290727 3336 2940 43 -271610 2940 79289 31 -186410 79289 35964 15 -277564 35964 78381 88 -298968 54986 4079 106 -187551 85076 112141 28 -193995 1678 79695 123 -300301 65891 93870 78 -221402 50791 71159 36 -203026 58559 62391 34 -174720 4490 37086 62 -296674 37086 37047 70 -340879 100715 57850 15 -304468 90557 57850 86 -111973 67702 21129 65 -9773 30435 21129 56 -236234 21129 67702 65 -82659 66195 67702 53 -204225 67702 66195 53 -140907 67449 66195 49 -281303 66195 67449 49 -98355 73515 67449 34 -223524 67449 73515 34 -112960 73523 73515 66 -243626 73515 73523 66 -63842 42679 73523 45 -185536 73523 42679 45 -70176 95639 42679 37 -181439 42679 95639 37 -64487 45955 95639 32 -189972 95639 45955 32 -112116 68842 45955 5 -246015 86741 49705 5 -139828 60242 49705 8 -335326 5832 56252 13 -288741 107222 56252 9 -208469 92300 58548 133 -64204 44514 58548 134 -306387 99254 60832 55 -67320 62523 60832 100 -188857 90736 62523 69 -152367 49510 62523 55 -89471 20740 71347 43 -25558 47629 71347 42 -83306 71096 13679 43 -47930 59032 13679 42 -154499 63215 1510 44 -45561 30560 1510 44 -19621 61310 10529 89 -4769 55894 77251 90 -5175 60651 67589 91 -181276 41264 83738 38 -32155 41890 76282 6 -185927 76282 6371 5 -310305 6371 86053 6 -121675 38784 62309 39 -39778 45782 62309 39 -277473 35352 87871 45 -231199 109994 109628 7 -185857 75744 85534 7 -54270 49639 7569 29 -302247 79682 57606 6 -6609 104389 10944 14 -220171 41223 91060 31 -145353 6464 91060 6 -344831 59549 6464 2 -304556 91060 6464 6 -213879 6464 112681 9 -114545 103348 112681 55 -259402 44275 94694 85 -135067 30829 94694 70 -64667 46785 47143 44 -18299 47047 47143 42 -290200 428 38030 88 -85315 103814 38030 23 -200498 38030 103814 23 -136949 43392 103814 69 -288267 103814 43392 69 -153004 53492 43392 77 -297588 43392 53492 77 -121511 37592 53492 16 -260549 53492 37592 16 -164655 37737 37592 13 -316052 37592 37737 13 -139082 55798 37737 29 -277816 37737 55798 29 -106999 37745 55798 27 -241312 55798 37745 27 -106993 37679 37745 6 -239005 37745 37679 6 -165652 43398 37679 8 -316060 37679 43398 8 -65671 52657 43398 15 -181532 43398 52657 15 -165658 43442 52657 16 -318019 52657 43442 16 -107921 43507 43442 16 -239786 43442 43507 16 -136076 38181 43507 15 -278558 43507 38181 15 -78802 43501 38181 16 -200511 38181 43501 16 -135986 37382 43501 29 -220284 42219 60371 39 -222619 60371 77156 39 -244178 77156 98655 65 -373120 2219 102985 45 -235524 17469 102985 85 -326820 102985 14186 20 -292658 14186 42219 38 -174942 5848 5476 69 -205564 77590 85298 57 -288951 108660 104933 26 -327084 104933 807 47 -265089 84338 94611 47 -35130 86370 1538 16 -44364 18867 68747 6 -274080 16257 6465 12 -56439 76313 2690 18 -28374 112148 10568 13 -180474 35897 51157 100 -143594 105673 51157 102 -279480 51157 105673 102 -114465 102141 105673 37 -250051 105673 102141 37 -129686 109515 102141 33 -268928 102141 109515 33 -98290 73120 109515 27 -231132 109515 73120 27 -111938 67283 73120 22 -243575 73120 67283 22 -170721 73332 67283 35 -319891 67283 73332 35 -90305 25119 73332 18 -224307 73332 25119 18 -127045 70815 25119 24 -256479 25119 70815 24 -150283 37717 70815 33 -300990 70815 37717 33 -63709 41925 37717 21 -180763 37717 41925 21 -157130 95881 41925 26 -297391 41925 95881 26 -143222 101946 95881 24 -286595 95881 101946 24 -106995 37719 101946 38 -249449 101946 37719 38 -111832 66206 37719 32 -239003 37719 66206 32 -70513 102153 66206 8 -184529 66206 102153 8 -69878 90143 102153 32 -44863 23749 104281 7 -267274 94611 86370 14 -273774 14865 62300 9 -117428 13110 62300 18 -252245 3115 26517 9 -157656 104281 26517 6 -333726 93481 23749 16 -294973 26517 23749 9 -200876 40841 76908 9 -66712 59058 76908 7 -373697 13228 11939 17 -186029 76908 11939 8 -155269 68747 60305 6 -56211 71923 60305 7 -378528 97410 18867 15 -299608 60305 18867 7 -204685 71346 14865 10 -135990 37423 14865 7 -41260 62300 37423 7 -232727 2690 112148 17 -580 11939 59058 8 -261906 64040 109676 13 -267037 93538 64040 15 -35441 109676 1631 19 -185998 76694 16257 31 -36255 6465 41928 13 -232646 2290 5509 19 -233170 5509 84127 12 -303116 84127 84632 11 -284091 84632 84821 14 -206882 84821 60508 57 -241878 60508 84411 77 -303159 84411 77590 44 -222881 62305 73973 30 -65901 53943 73973 56 -185587 73973 53943 56 -170773 73844 53943 64 -318173 53943 73844 64 -96391 60518 73844 46 -224379 73844 60518 46 -153952 59752 60518 36 -299632 60518 59752 36 -66931 60388 59752 35 -183694 59752 60388 35 -69869 89991 60388 43 -183745 60388 89991 43 -92530 38990 89991 16 -227263 89991 38990 16 -62153 31552 38990 8 -180963 38990 31552 8 -170789 74015 31552 16 -315021 31552 74015 16 -125204 58720 74015 33 -263242 74015 58720 33 -96148 59143 58720 30 -222415 58720 59143 30 -65733 53018 59143 24 -183638 59143 53018 24 -111674 65020 53018 33 -240987 53018 65020 33 -83763 73967 65020 21 -203840 65020 73967 21 -80590 53520 73967 30 -205044 73967 53520 30 -167355 52831 53520 32 -318131 53520 52831 32 -80501 52959 52831 15 -202265 52831 52959 15 -66809 59680 52959 39 -182814 52959 59680 39 -88249 14301 59680 47 -351420 65615 103015 15 -233830 9029 75940 30 -212016 111654 56555 9 -315465 34193 37298 24 -185184 70783 89077 43 -350863 50699 7146 19 -259288 43207 38412 16 -136069 38157 38412 13 -277928 38412 38157 13 -128924 101022 38157 55 -258617 38157 101022 55 -136216 39188 101022 52 -287745 101022 39188 52 -149956 34948 39188 3 -131407 9564 72745 67 -13344 72816 72745 68 -151323 43517 58476 23 -36801 13574 58476 52 -299420 58476 43517 23 -136056 37999 43517 30 -278560 43517 37999 30 -122566 43497 37999 30 -258600 37999 43497 30 -121007 33840 43497 35 -259316 43497 33840 35 -139789 60044 33840 29 -171272 82870 60044 17 -41248 62185 60044 75 -348002 1546 82870 34 -318916 60044 82870 17 -277224 33840 62185 80 -62548 34501 62185 66 -186100 77270 37051 80 -111645 64809 93809 54 -26274 56076 93809 61 -340042 92621 51603 20 -247091 91651 51603 9 -169006 62061 51943 8 -9655 29383 51943 18 -324875 94545 58166 56 -136247 39448 58166 116 -170344 71170 39448 129 -41329 63123 39448 78 -51875 23611 71170 70 -6266 75040 5613 19 -339912 91357 51261 9 -202061 51088 51261 10 -260619 53958 38338 24 -63952 43414 38338 26 -180861 38338 43414 26 -62927 37618 43414 25 -341692 5454 37618 8 -181533 43414 37618 25 -122550 43415 12937 30 -254076 12937 43415 30 -95553 55631 43415 44 -220429 43415 55631 44 -69634 85302 55631 25 -183131 55631 85302 25 -338842 72035 85533 12 -316015 37365 43940 23 -100879 112681 59549 8 -71799 113291 95675 10 -20726 82988 95675 45 -21089 110767 112678 12 -201998 50588 75796 9 -263507 75796 85304 7 -297149 40243 78698 11 -34901 73279 8263 85 -214177 8263 7028 145 -359903 99680 38951 12 -206471 82120 38951 29 -129505 107516 35177 47 -32335 43978 35177 21 -258149 35177 107516 47 -97144 65213 107516 166 -230837 107516 65213 166 -99340 92928 65213 161 -223247 65213 92928 161 -141276 70356 92928 30 -342203 13098 41015 15 -285201 89818 41015 14 -359768 98433 50490 13 -15146 13744 50490 16 -97060 64577 50636 171 -31413 32588 50636 145 -221370 50636 64577 171 -114877 106604 64577 40 -242424 64577 106604 40 -169416 64589 106604 28 -327274 106604 64589 28 -157439 101899 64589 27 -300133 64589 101899 27 -70492 102022 101899 12 -191428 101899 102022 12 -140747 66272 102022 34 -287960 102022 66272 34 -97098 64873 66272 56 -223376 66272 64873 56 -114467 102175 64873 36 -242464 64873 102175 36 -100221 106273 102175 27 -230009 102175 106273 27 -84748 94336 106273 33 -76123 26581 31733 182 -7985 13072 31733 54 -63308 39719 26581 138 -11562 51261 26581 138 -113410 80466 64898 128 -41050 59799 64898 117 -242466 64898 80466 128 -151939 46903 80466 18 -295987 33282 58577 10 -161108 16701 58577 37 -318718 58259 39573 11 -137063 44010 39573 11 -285443 90765 77634 110 -82247 63344 77634 108 -69945 91311 57382 122 -55101 58179 57382 65 -183373 57382 91311 122 -65660 52586 91311 65 -363406 48050 20652 8 -188974 91259 20652 8 -360148 102494 26975 8 -39138 39183 26975 10 -34264 64909 51420 48 -207674 88818 112150 34 -322982 86182 69233 25 -352765 91629 76724 48 -289321 111539 38099 73 -202112 51603 29383 19 -151322 43516 29383 33 -295444 29383 43516 33 -128896 100562 43516 31 -259318 43516 100562 31 -87644 10145 100562 17 -216986 22008 45674 76 -140724 66139 45674 80 -278771 45674 66139 80 -106563 34346 66139 46 -236051 20114 10608 97 -195504 10608 4673 148 -319732 65905 49127 81 -270937 116486 69234 15 -36043 117193 2731 10 -271766 4020 91684 20 -57433 117752 8788 5 -297694 44395 43483 50 -357186 49127 93295 39 -374337 20554 31049 36 -266975 93295 31049 33 -225042 78465 92857 40 -189177 92019 48540 11 -14057 113294 10890 13 -14013 112777 793 13 -42831 113295 66587 13 -316362 39448 23611 70 -167556 53993 23611 10 -313712 23611 53993 10 -139777 59983 53993 19 -279816 53993 59983 19 -114018 93194 59983 28 -241818 59983 93194 28 -73927 15068 93194 41 -280357 58166 63123 64 -122576 43555 63123 32 -261773 63123 43555 32 -142917 96131 43555 32 -278563 43555 96131 32 -104283 21179 96131 76 -95054 52854 56076 29 -28028 93809 56076 61 -222035 56076 52854 29 -128991 101959 52854 31 -260451 52854 101959 31 -137651 47211 101959 64 -331450 46330 43599 12 -264696 81999 43599 39 -366334 101959 19870 199 -6621 104466 19870 190 -334285 98813 47211 56 -274820 19870 47211 237 -347268 100562 22008 18 -3749 45088 22008 9 -140079 61813 10145 9 -18149 45674 10145 75 -353224 96131 16550 65 -286868 97083 16550 54 -340098 93194 21179 75 -235307 16550 21179 113 -197577 21179 15068 90 -83610 72808 15068 60 -10101 33901 72808 36 -49922 114451 74932 126 -211148 104934 3318 98 -194255 3318 37132 144 -180670 37132 36953 146 -200334 36953 518 123 -309046 116095 104934 39 -263489 75615 83020 23 -171291 83298 83020 27 -285520 91099 67903 100 -85158 101794 67903 23 -285049 89167 57270 200 -99254 91099 57270 281 -365852 97059 91099 104 -222216 57270 91099 281 -204260 67903 101794 23 -84903 97059 101794 27 -210646 101794 97059 27 -140947 67903 97059 32 -298810 53675 74117 28 -113003 73824 74117 31 -243686 74117 73824 31 -84862 96341 73824 49 -212019 111666 114900 5 -194162 2725 91261 55 -49642 111124 3921 31 -321428 78181 87277 31 -259982 49172 54526 29 -70973 106333 54526 12 -21107 111095 49172 23 -289967 116560 86059 15 -159094 116618 86059 10 -303624 86728 113736 22 -107891 43292 113736 33 -251147 113736 43292 33 -113715 87065 43292 23 -279669 52882 60607 48 -153936 59672 60607 44 -376168 54790 59672 10 -299640 60607 59672 44 -299572 59935 69417 7 -368785 30687 99254 10 -298860 54027 99254 27 -306490 99774 61512 11 -98759 80042 61512 18 -377827 91120 80042 16 -222760 61512 80042 18 -109242 50861 92506 37 -247313 92506 71038 39 -99256 91120 71038 30 -224016 71038 91120 30 -167512 53702 91120 17 -321734 80042 53702 26 -59752 18909 53702 25 -369326 39952 18909 13 -182903 53702 18909 25 -104531 22637 24861 39 -50096 116658 24861 15 -236922 24861 40409 17 -156966 92338 50861 42 -27529 71038 50861 52 -298479 50861 92338 42 -78442 41607 92338 33 -208479 92338 55160 33 -116345 5657 55160 28 -329437 12979 5657 14 -260761 55160 5657 28 -6618 104457 39345 24 -142909 95917 41607 21 -11907 55160 41607 31 -278330 41607 95917 21 -104872 24374 95917 60 -133862 24281 22637 28 -24843 40409 22637 31 -278088 39464 51576 13 -128447 91791 51576 23 -260271 51576 91791 23 -170435 71594 91791 24 -322012 81295 71594 24 -81665 59718 71594 23 -204728 71594 59718 23 -377909 91791 81295 23 -257216 29004 81295 18 -356460 32979 90995 33 -174803 5043 90995 44 -350469 41481 13566 13 -33950 61295 13566 12 -263526 75904 75888 71 -263520 75888 76517 79 -113592 84271 76284 6 -35104 83099 76284 26 -244044 76284 84271 6 -150347 38256 84271 22 -303136 84271 38256 22 -70343 99667 38256 34 -282654 76378 76781 54 -113565 83721 76781 52 -227960 93030 70325 39 -113910 91160 70325 117 -243211 70325 91160 117 -92859 40784 91160 99 -20281 70325 64788 26 -242453 64788 57640 8 -202899 57640 3131 8 -213329 3131 98 7 -271135 98 78552 10 -225050 78552 2440 60 -213209 2440 77332 96 -282792 77332 100980 89 -35354 105537 3856 10 -246073 87079 112149 7 -272699 9350 3691 16 -194314 3691 78260 25 -205678 78260 2628 43 -194139 2628 92316 75 -192432 108701 59011 10 -353795 101194 1305 6 -292039 10892 1305 7 -229188 98190 13186 27 -301584 75663 5951 68 -152892 52758 59111 43 -27609 71867 59111 24 -339833 90698 13121 7 -243536 72773 13121 4 -340081 92954 13371 132 -9721 29966 13371 133 -300522 67366 72773 4 -22363 13121 291 6 -43179 1305 67366 4 -259111 41620 43372 63 -171965 97810 43372 68 -271747 3945 67809 61 -204245 67809 77426 76 -222503 59267 73861 96 -156062 74017 73861 118 -301352 73861 74017 118 -83770 74065 74017 102 -205050 74017 74065 102 -96120 58963 74065 94 -224413 74065 58963 94 -143391 103867 58963 40 -280456 58963 103867 40 -124410 53863 103867 28 -269205 103867 53863 28 -110833 60091 53863 30 -241089 53863 60091 30 -188104 87560 114902 19 -226608 86707 46262 23 -191381 101640 104936 29 -231559 112678 5475 32 -231845 114902 18543 19 -178488 24152 104937 30 -248682 98655 65610 37 -93317 43337 65610 10 -223309 65610 43337 10 -154123 60751 43337 42 -297582 43337 60751 42 -113035 74108 60751 68 -241903 60751 74108 68 -263475 75535 84476 62 -364313 74360 75336 78 -20724 82692 75336 91 -22162 11156 75889 23 -42618 108733 6162 8 -28412 112722 114317 57 -231772 114317 83991 67 -322553 83991 8273 74 -16407 26046 65978 22 -203961 65978 1969 22 -232592 1969 1970 11 -174267 1970 77393 10 -25058 42828 58617 38 -231187 109946 88466 16 -188128 87640 66600 13 -319816 66600 65389 46 -242521 65389 36767 48 -315904 36767 99063 28 -291969 10606 1933 54 -379272 108730 71789 91 -292635 14071 71789 140 -146983 17529 40387 13 -54837 55356 40387 11 -349955 31618 22135 9 -39656 44562 22135 8 -332653 80245 60454 9 -22664 16356 60454 9 -99620 98071 30210 85 -4713 55236 30210 78 -318206 54262 78553 30 -253352 9264 86054 13 -35112 84437 48154 32 -259835 48154 114318 30 -207551 88239 4210 30 -264218 80053 77256 9 -193571 116493 109766 155 -258421 36609 84922 796 -26482 58417 4242 13 -174686 4242 79295 26 -205855 79295 65513 29 -33348 54463 61864 52 -183947 61864 57641 86 -299307 57641 99633 52 -42523 105081 952 5 -367275 9537 25823 5 -311040 10518 25823 5 -110129 56158 11875 131 -48471 65658 11875 131 -343871 36322 21958 8 -249286 101114 21958 5 -273308 12668 46792 45 -123324 47602 46792 45 -153114 54200 2563 46 -45534 30252 2563 44 -121128 35006 10507 45 -13159 70987 10507 44 -156314 76831 4729 70 -54548 52312 4729 56 -182999 54559 10518 5 -52102 25823 49635 8 -39874 46792 54559 42 -120010 27965 90689 83 -267767 96894 64440 45 -85144 101681 64440 39 -359018 90689 96894 36 -257463 31226 96894 17 -70392 100537 27965 65 -34231 64440 27965 91 -357472 56839 100298 8 -49066 74621 100298 8 -208865 93915 109763 25 -135009 30532 36663 52 -55141 58535 36663 53 -279109 48514 85784 26 -311229 11434 111008 15 -257330 29900 54696 54 -83316 71179 54696 54 -121947 40164 13611 50 -24216 31368 13611 49 -257722 33026 3785 9 -353702 100414 3805 10 -194138 2623 3805 9 -353208 95917 12429 79 -33025 50766 12429 79 -234441 12429 24374 128 -168026 56355 24374 59 -357596 60193 29900 10 -321202 76704 29900 9 -364060 66775 14919 10 -33370 54696 14919 53 -156063 74046 21255 47 -40123 49631 21255 29 -294040 21255 74046 47 -109684 53473 74046 44 -243676 74046 53473 44 -110760 59681 53473 45 -241059 53473 59681 45 -81833 60803 59681 45 -203156 59681 60803 45 -142674 90736 60803 41 -332007 60832 90736 69 -280658 60803 90736 41 -186284 78463 89399 17 -45369 28812 115497 12 -290263 767 93994 50 -13750 105015 42594 11 -183615 59011 3417 11 -267834 97168 1408 103 -240512 49175 2697 10 -288944 108627 2502 34 -309663 2502 37133 90 -200360 37133 3734 123 -309882 3734 93030 79 -187834 86385 109847 58 -70948 106158 109847 12 -212739 117068 107020 63 -85709 107696 107020 13 -213674 5385 35525 63 -99020 86308 35525 13 -239325 39766 88467 52 -270281 111641 75035 25 -266172 89466 109846 25 -291463 7766 86660 12 -31201 30452 111590 123 -184861 68362 80427 58 -271930 4933 84056 5 -252652 5519 76782 16 -114278 99024 76782 30 -337107 30458 377 38 -234616 13185 377 55 -129007 102184 5020 49 -7351 532 5020 38 -238408 34080 4340 14 -69599 84398 4340 17 -136974 43553 31157 17 -3819 45736 31157 19 -276737 31157 43553 17 -152963 53248 43553 11 -284338 85871 5973 33 -194657 5973 117058 33 -129021 102415 70219 46 -31534 35008 70219 25 -339098 80230 102415 31 -262771 70219 102415 46 -311137 10934 81819 43 -76592 29274 81819 38 -47617 55238 58034 55 -239350 39956 72605 63 -69889 90332 14965 127 -41263 62366 14965 47 -176720 14965 90332 127 -111301 62782 90332 89 -373286 6739 13738 11 -239165 38695 13738 8 -246651 89721 57813 50 -135032 30639 20623 49 -19898 64421 20623 48 -351602 70382 45494 10 -266393 90506 45494 8 -358381 81125 95289 40 -320839 74202 95289 44 -223232 65107 59588 20 -143272 102470 59588 69 -280526 59588 102470 69 -123594 49354 102470 63 -123936 51070 33325 133 -38234 27886 33325 133 -365163 90340 52470 10 -300080 64215 52470 9 -193807 346 35850 129 -79141 45238 35850 125 -328824 28 57933 10 -206582 82761 57933 8 -345679 81769 55981 10 -1769 23917 55981 9 -148355 25000 49104 129 -19355 58472 49104 110 -141489 71629 14466 49 -18243 46548 14466 48 -64865 47788 73533 49 -25071 43013 73533 49 -300897 70153 35761 48 -97010 64117 35761 51 -181070 39650 60608 55 -97124 65107 60608 41 -222653 60608 65107 41 -96244 59588 65107 20 -149874 34148 74072 21 -85089 100614 53563 29 -303096 84007 81292 16 -160726 14406 81292 39 -310561 7723 83022 29 -114499 102887 83022 27 -245343 83022 102887 27 -77272 32484 102887 21 -184072 62757 18325 87 -68781 72582 18325 84 -361399 14306 22492 23 -191037 100216 22492 10 -210114 99351 17658 47 -78696 42886 17658 47 -238038 31799 99351 9 -8414 17658 62757 47 -1174 18325 84 88 -330846 32873 27437 91 -309318 204 27437 94 -360689 84 19302 50 -247893 94959 19302 47 -271142 109 94959 7 -22956 19302 204 51 -52282 27437 10694 92 -239010 37800 80513 25 -126337 65680 80513 21 -246448 88762 11697 9 -100501 109235 11697 12 -85828 109240 109776 12 -35239 103741 109776 9 -272667 9166 2527 89 -307117 102707 65980 23 -287276 98890 31421 47 -111276 62634 31421 50 -266083 89147 77392 46 -345953 87321 92347 16 -206755 83872 92347 31 -282620 76145 83612 10 -142059 76035 75795 23 -53726 44223 75795 13 -51425 19162 1121 22 -174080 1121 77428 97 -231421 111657 13231 10 -19197 56672 60566 76 -310776 8862 112151 6 -328039 112151 10765 9 -56792 107703 252 52 -339881 91085 102304 24 -42356 88735 102304 9 -171677 91794 51372 6 -317839 51372 91794 6 -142561 88383 91794 4 -285663 91794 88383 4 -77310 32706 88383 2 -207573 88383 32706 2 -75165 21815 32706 6 -199558 32706 21815 6 -280701 61196 30752 9 -69474 82090 30752 9 -271020 117029 117605 4 -90767 27647 117605 4 -232233 117605 27647 4 -98494 74684 27647 1 -218048 27647 74684 1 -285644 91666 117606 5 -92044 35262 117606 4 -232234 117606 35262 4 -224569 75220 75036 20 -83842 75067 75036 7 -341615 2606 75067 9 -205193 75036 75067 7 -308955 115438 31866 4 -85624 106765 31866 4 -199435 31866 106765 4 -161895 20923 106765 3 -327287 106765 20923 3 -103769 18320 20923 7 -236196 20923 18320 7 -336466 21600 23163 8 -189748 94648 23163 27 -194631 5824 84756 6 -358577 85063 75904 11 -27970 86374 75904 12 -188069 87306 4547 20 -371067 86355 86374 30 -27850 75904 86374 12 -125382 59836 112155 6 -270341 112155 59836 6 -156733 87583 59836 6 -299565 59836 87583 6 -284790 87848 115500 11 -113808 89085 115500 11 -329156 9008 89085 23 -251399 115500 89085 11 -171453 86986 115501 13 -6337 76418 115501 13 -371009 85520 86986 25 -328512 115501 86986 13 -125352 59534 73171 6 -263139 73171 59534 6 -62479 33639 59534 6 -183674 59534 33639 6 -265525 86660 30452 11 -364973 88209 109572 10 -143981 109574 49190 4 -279194 49190 109574 4 -104414 22005 109574 4 -250568 109574 22005 4 -107321 39871 22005 5 -356112 26354 88428 9 -33730 58747 62050 21 -218620 31635 92594 6 -109476 52060 92594 6 -247338 92594 52060 6 -174356 2457 60350 14 -349417 23323 88785 67 -6460 86920 88785 11 -99077 87584 13829 5 -215278 13829 87584 5 -137909 48675 87584 4 -284309 85812 115502 27 -231024 108748 89401 8 -77129 31733 89401 55 -207268 86949 13072 7 -168276 58060 13072 7 -55881 68125 1297 18 -30397 22922 10536 10 -339688 89403 109923 17 -7331 117607 109923 3 -333029 86065 64197 13 -349794 27907 117607 4 -6780 109923 117607 3 -377421 86359 113745 9 -124480 54290 7472 7 -253014 7472 54290 7 -91702 32438 54290 5 -221814 54290 32438 5 -321824 80427 51931 21 -171529 88786 51931 8 -373315 7473 88786 8 -317923 51931 88786 8 -53066 36615 17832 12 -251944 1297 22922 11 -371008 85515 86664 24 -353021 93926 93146 27 -53920 46009 93146 11 -117334 12531 9340 7 -253370 9340 12531 7 -97023 64202 12531 6 -214965 12531 64202 6 -234874 14536 72925 10 -69834 89342 72925 9 -361114 10695 96684 10 -164019 32339 8358 7 -310680 8358 32339 7 -78703 42936 32339 6 -199496 32339 42936 6 -349371 22758 68127 9 -303696 87001 68127 19 -170998 76264 34289 33 -20723 82155 34289 7 -357579 59638 52072 12 -313889 24602 52072 11 -351552 69402 82155 9 -17173 34289 82155 7 -85781 108654 5622 5 -194590 5622 108654 5 -122720 44301 108654 3 -269888 108654 44301 3 -146117 12129 44301 7 -297685 44301 12129 7 -306238 98583 64049 28 -373072 222 98332 14 -135331 32133 37557 6 -277791 37557 32133 6 -131661 11383 32133 4 -276854 32133 11383 4 -94983 52375 11383 7 -214729 11383 52375 7 -357303 52072 59638 12 -188926 91063 59638 24 -345484 79991 82080 33 -42416 102907 82080 10 -77356 33141 36048 7 -200183 36048 33141 7 -95376 54587 33141 7 -218869 33141 54587 7 -265336 85763 13958 7 -133312 21154 13958 4 -273564 13958 21154 4 -158548 112156 21154 3 -294023 21154 112156 3 -142604 89402 112156 6 -341347 112154 89402 4 -289389 112156 89402 6 -376556 65244 33426 10 -183724 60135 33426 10 -79335 46200 18473 7 -197035 18473 46200 7 -67912 66884 46200 6 -181864 46200 66884 6 -265867 88191 117060 36 -71659 112154 117060 4 -339687 89402 112154 4 -193660 117060 112154 4 -265136 84638 2004 35 -252062 2004 1690 12 -252007 1690 944 8 -290290 944 99 17 -271136 99 67583 27 -204214 67583 34605 30 -186183 77817 87282 33 -181682 44638 39453 14 -107423 40358 39453 14 -239281 39453 40358 14 -171760 93608 40358 11 -353172 95510 93608 12 -316474 40358 93608 11 -143655 106253 45433 7 -278742 45433 106253 7 -113763 88111 106253 7 -38863 35280 5472 10 -258081 34605 75053 17 -373241 5994 35280 29 -288431 104883 35280 10 -31563 35281 50207 6 -284687 87282 117611 11 -347335 101260 35281 12 -263680 76881 35281 6 -58637 12391 113219 7 -193081 113219 12391 7 -125105 58154 12391 7 -253939 12391 58154 7 -299044 55762 44638 13 -63264 39453 44638 14 -301905 77665 78168 130 -353337 97275 105502 21 -315046 31784 105502 44 -119949 27648 4550 10 -26090 53906 4550 10 -254603 15495 27648 11 -134533 27898 27648 11 -286100 93687 116548 24 -70977 106363 116548 23 -193582 116548 106363 23 -142526 87586 106363 26 -333283 89431 87586 30 -288627 106363 87586 26 -96853 63234 47803 12 -6225 74433 47803 11 -321672 79695 79475 57 -290131 100 65891 70 -232274 112 100 93 -209649 97445 76156 21 -171322 83924 76156 24 -321136 76156 83924 24 -70130 94763 83924 27 -187354 83924 94763 27 -164966 39829 94763 24 -361394 14251 24985 10 -314261 26391 24985 9 -359274 93390 72420 8 -370932 82692 14071 69 -32685 47288 14071 54 -347022 98047 13541 47 -30118 20424 13541 46 -93073 41945 21450 48 -20021 66264 21450 47 -60194 21292 13444 47 -13338 72772 13444 47 -31842 39046 75890 57 -377528 87619 106719 43 -192137 106722 106719 11 -335348 6486 109924 45 -56848 110026 109924 28 -345744 82435 91901 63 -152544 50601 53095 3 -298744 53095 50601 3 -91717 32584 50601 2 -221366 50601 32584 2 -60414 22386 32584 2 -179836 32584 22386 2 -58685 12660 22386 2 -178160 22386 12660 2 -243419 71885 63484 8 -358194 77392 36603 45 -113683 86377 35526 7 -238639 35526 86377 7 -284792 87855 36254 6 -171382 85260 35185 5 -211140 104886 36591 4 -318926 60129 60342 3 -67087 61225 60342 6 -98625 75949 33130 7 -232026 116065 35186 49 -185263 71379 84477 30 -69883 90234 84477 56 -187442 84477 90234 56 -139519 58476 90234 39 -293162 16568 7237 30 -169605 65991 7237 14 -310455 7237 65991 14 -171195 81303 65991 45 -319740 65991 81303 45 -102999 14146 81303 44 -244933 81303 14146 44 -98083 72033 14146 20 -205001 73516 108954 11 -111827 66146 108954 27 -250481 108954 66146 27 -63787 42339 66146 38 -183208 56133 4632 75 -271877 4632 2943 229 -174538 3277 101 85 -264162 79792 632 250 -320045 68337 79792 91 -290699 3205 56915 249 -318526 56915 51968 89 -302234 79625 945 209 -20362 71379 48988 18 -14740 8877 755 10 -4680 54837 4315 95 -138128 50222 13688 45 -4959 58203 13688 43 -150753 40385 70610 44 -20209 69478 70610 44 -97554 68330 26385 43 -24174 31068 26385 43 -20113 68071 1544 44 -13586 87977 68506 15 -213050 1390 96178 50 -187278 83411 7752 40 -84454 88472 7752 41 -194998 7752 88472 41 -71613 111741 88472 45 -347820 113760 104941 10 -187569 85157 104941 11 -92533 39004 53198 48 -9207 24914 53198 49 -93312 43314 43528 45 -4645 54541 43528 21 -220436 43528 43314 45 -109940 55080 43314 31 -170476 71836 9885 145 -52651 30662 9885 145 -289380 112106 57506 151 -321394 77965 2005 199 -184983 69295 78992 90 -83539 72465 78992 56 -205934 79773 32315 7 -118399 19432 32315 11 -370715 80607 6828 12 -254451 14754 6828 9 -82935 68631 7272 70 -46700 44885 7272 67 -196678 16885 50371 12 -118469 19797 50371 14 -332639 80085 11195 11 -257616 32382 11195 11 -107854 42919 39342 66 -397 9899 39342 67 -245111 82000 43886 11 -88315 14674 43886 9 -351749 74351 44400 11 -215295 13908 44400 14 -167073 51280 16592 67 -24572 36678 16592 68 -121867 39777 56087 89 -17015 31750 56087 90 -257759 33216 61056 8 -88551 15907 61056 8 -353803 101268 52692 9 -214535 10216 52692 10 -113195 75494 41425 68 -25342 45770 41425 68 -247551 93474 71365 12 -64889 47913 71365 11 -340687 98961 55022 11 -179385 28879 55022 12 -66679 58815 15592 67 -10784 43458 15592 68 -189987 95691 73010 11 -145060 2326 73010 12 -339357 82647 27242 12 -292444 13120 27242 11 -120141 28611 22212 65 -12344 59709 22212 66 -76811 30281 20783 66 -30951 28177 20783 67 -126028 63509 22352 84 -41225 61896 22352 72 -255936 22352 63509 84 -152798 52221 63509 21 -35368 106067 86379 15 -265814 87963 111594 80 -354144 108858 106067 12 -252405 4066 106067 108 -114909 106877 38244 121 -28387 112293 38244 60 -133728 23429 6303 50 -40640 55229 6303 49 -80566 53411 60061 49 -33023 50743 60061 48 -209390 96097 64339 11 -60995 25444 64339 12 -334205 98037 13646 11 -179229 27928 13646 10 -95144 53375 16670 50 -3063 38407 16670 51 -347960 291 10491 6 -228908 96955 10491 5 -316875 43829 91296 40 -124571 54842 91296 27 -166685 49003 14892 45 -12249 58830 14892 44 -99579 97433 70227 40 -33176 52364 70227 26 -3023 37937 3073 10 -3336 40988 4024 56 -290829 4024 946 89 -181517 43291 33640 76 -160388 12073 33640 76 -365934 97861 12073 11 -324479 92889 12073 10 -67573 64190 7147 60 -37828 23954 7147 60 -186679 80649 30458 9 -72530 5020 30458 38 -340860 100538 532 11 -193815 377 532 38 -12286 59148 20595 66 -223572 67740 38019 17 -80803 54811 38019 41 -179446 29401 38467 35 -150387 38534 38467 63 -296904 38467 38534 63 -78760 43258 38534 88 -200574 38534 43258 88 -68016 67740 43258 64 -181514 43258 67740 64 -92368 38019 67740 17 -200496 38019 54811 41 -153369 55782 54811 50 -298946 54811 55782 50 -219820 38398 13394 11 -149987 35191 13394 12 -303378 85558 54830 15 -70954 106214 54830 17 -183024 54830 106214 17 -100195 105949 106214 42 -115216 109947 63234 14 -15113 13394 63234 13 -246059 87016 59124 17 -85242 103086 59124 24 -230885 107865 68504 24 -125526 60604 68504 54 -262516 68504 60604 54 -117911 16491 60604 75 -377140 81292 27603 19 -264761 82259 27603 9 -193402 115436 87283 11 -308878 114900 114909 7 -30321 22182 9264 9 -194216 3094 69800 163 -291934 10427 84478 128 -322630 84478 7031 37 -270334 112099 83360 124 -206672 83360 9214 232 -259950 48987 51518 6 -157804 105509 105785 73 -27335 69213 105785 883 -362793 33469 105509 12 -307575 105785 105509 73 -126120 64135 65651 60 -262145 65651 64135 60 -169613 66056 64135 38 -319499 64135 66056 38 -111725 65530 66056 20 -242619 66056 65530 20 -111691 65247 65530 24 -242544 65530 65247 24 -71242 108844 65247 59 -184384 65247 108844 59 -77559 35220 108844 60 -211663 108844 35220 60 -110652 59173 35220 50 -238598 35220 59173 50 -142810 93993 59173 63 -358252 79840 93993 49 -280476 59173 93993 63 -243601 73301 82435 63 -26977 63484 1554 6 -271363 1554 3292 8 -271669 3292 57067 37 -353744 100776 51516 9 -51506 19898 51516 11 -123515 48683 63268 131 -25061 42851 63268 130 -337164 31733 51088 55 -261605 61840 51088 9 -263521 75889 86672 34 -290622 2810 55170 8 -183899 61485 6387 99 -309876 3711 8994 8 -35457 110051 117065 3 -182386 49819 36625 13 -262464 68110 95193 73 -309619 2243 78176 52 -186304 78571 36874 67 -290817 3954 165 140 -174292 2113 4603 103 -194218 3105 36875 102 -49808 113293 78067 15 -174802 5038 4265 34 -264020 78942 36876 92 -303609 86664 112158 12 -241463 56969 86065 15 -301277 73261 30122 6 -257354 30122 66732 6 -174298 2150 89403 44 -211777 109923 27907 4 -251716 117607 68319 8 -309578 2016 36877 426 -321320 77499 37137 107 -49862 113818 111012 14 -243129 69800 67184 161 -203967 66009 4906 24 -258591 37948 66009 16 -174520 3202 36886 112 -28743 116990 117614 31 -213536 4603 3277 115 -263888 78168 3332 234 -296631 36838 3161 34 -251971 1472 86070 20 -282987 78738 112686 8 -244488 79167 2150 31 -241601 57963 107223 142 -224511 74868 79912 66 -252808 6387 82721 36 -303082 83875 5038 29 -142801 93830 39721 132 -331085 36463 33018 32 -226137 83916 33018 40 -365754 96144 49847 101 -55577 63523 49847 103 -349282 21655 1427 8 -41989 71966 1427 8 -267410 95189 27006 52 -92504 38768 27006 54 -224578 75253 21655 8 -111556 64262 21655 12 -232489 1427 51620 10 -141166 69592 51620 12 -273754 14765 41526 133 -144068 110317 41526 151 -278320 41526 110317 151 -71422 110410 110317 29 -175902 11055 41519 13 -95527 55511 41519 12 -356806 38623 110410 15 -192667 110317 110410 29 -69636 85317 65683 11 -33383 54829 65683 10 -363698 55578 76212 8 -3873 46217 76212 8 -84241 83596 8293 12 -42361 88963 8293 11 -310387 6796 6392 45 -167843 55394 6392 12 -311146 10979 37791 19 -72773 7394 37791 22 -143903 108715 7394 13 -158975 115658 85317 10 -3391 41519 85317 12 -340136 93512 91379 31 -252244 3097 91379 35 -358720 87080 86076 19 -311126 10897 86076 83 -332180 65683 11055 11 -36044 117198 11055 12 -365792 96566 4658 7 -182325 49411 4658 9 -72480 4317 3362 14 -39638 44444 3362 13 -206323 81472 4317 34 -70213 96552 4317 35 -304933 92821 49411 8 -69238 76212 49411 9 -372672 104993 46217 8 -82 4658 46217 8 -45876 35109 37747 19 -212904 370 90016 29 -159231 46 90016 26 -301621 75835 7973 16 -171696 92157 7973 67 -156217 75835 4381 31 -8883 22054 4381 33 -319492 64106 226 13 -131117 7323 226 10 -287427 99682 26022 7 -57531 3012 26022 11 -178891 26022 3012 11 -213314 3012 71379 19 -69602 84477 71379 30 -301028 71132 63589 9 -244440 78944 91599 20 -56796 107893 49395 5 -271782 4163 97967 30 -212948 678 19233 55 -242775 67154 101449 33 -290803 3875 93915 24 -13839 109763 71132 8 -214657 10986 86383 12 -8258 16065 55157 3 -241245 55157 53586 32 -4014 47451 61851 4 -38338 28772 2526 41 -327604 108876 58125 36 -291618 8628 3860 31 -85103 100863 3860 47 -357009 44506 100863 21 -194345 3860 100863 47 -364829 86126 78282 16 -214007 7197 78282 16 -347774 112203 10986 11 -42515 105022 10986 8 -377699 90016 64106 28 -40091 49294 64106 12 -340924 101206 46 10 -50174 226 46 12 -102146 8628 1168 11 -10710 42403 1168 15 -232382 755 8628 10 -145122 3860 8628 31 -268688 100863 1546 45 -101894 6340 1546 55 -194297 3573 76287 68 -116679 8504 76287 47 -263584 76287 8504 47 -127751 75962 8504 26 -253190 8504 75962 26 -57705 5839 75962 40 -185879 75962 5839 40 -171257 82518 5839 30 -174545 3322 86385 107 -6779 109847 117068 62 -13793 107020 5385 63 -17271 35525 111019 41 -174307 2184 88801 76 -281586 68344 91063 37 -5079 59638 54978 14 -309664 2512 93926 97 -286768 96684 10535 39 -193583 116553 94648 101 -42992 115500 116553 82 -194438 4577 87001 34 -302208 79461 37156 13 -180674 37156 77174 50 -27708 72925 1129 24 -232438 1129 2960 60 -271617 2960 68344 59 -224843 77174 33575 63 -48376 64393 47244 12 -46678 44638 2672 39 -174397 2672 57801 70 -280290 57801 2184 90 -223607 67988 67187 73 -262327 67187 95510 66 -194155 2698 98583 145 -220772 46604 67988 57 -181262 41187 74107 32 -65768 53191 74107 33 -185600 74107 53191 33 -127547 73982 53191 38 -260506 53191 73982 38 -152945 53121 73982 18 -301372 73982 53121 18 -124278 53025 53121 64 -260493 53121 53025 64 -113927 91408 53025 85 -295248 27914 59686 30 -114073 94300 59686 42 -241773 59686 94300 42 -137721 47565 94300 26 -100497 109207 29675 35 -38877 35405 29675 13 -218398 29675 109207 35 -170763 73653 109207 25 -327641 109207 73653 25 -96715 62498 73653 76 -224351 73653 62498 76 -128225 86926 62498 108 -182464 50409 43401 48 -150251 37447 43401 68 -297589 43401 37447 68 -78804 43534 37447 46 -200416 37447 43534 46 -99285 91800 43534 31 -193812 363 75897 38 -268218 98986 14327 10 -301628 75897 5994 52 -40445 52771 1790 16 -204363 68788 4741 75 -271891 4741 84638 95 -223523 67437 34645 103 -214569 10528 98364 155 -232986 4237 1708 24 -232545 1708 95527 34 -38483 30287 2996 91 -234094 10553 36970 204 -49516 106918 4581 11 -281484 67671 39766 108 -277731 37203 86386 50 -316728 42594 112 84 -21513 115977 36632 33 -193247 114276 86073 57 -298390 50108 88481 57 -374915 27946 39088 15 -33169 52274 39088 17 -356543 33758 99381 23 -316571 41342 99381 33 -358162 75901 36300 15 -56118 70951 36300 15 -127459 73255 41464 26 -34624 70377 41464 23 -217041 22409 73838 19 -151321 43492 73838 15 -301350 73838 43492 15 -138697 53464 43492 21 -278555 43492 53464 21 -62981 37949 53464 21 -182881 53464 37949 21 -153026 53674 37949 14 -296823 37949 53674 14 -107919 43494 53674 11 -241072 53674 43494 11 -78796 43465 43494 29 -201164 43494 43465 29 -138607 52778 43465 28 -278551 43465 52778 28 -142966 97187 52778 21 -279659 52778 97187 21 -74962 20645 97187 16 -209596 97187 20645 16 -161115 16742 20645 3 -313169 20645 16742 3 -127102 71117 16742 14 -254866 16742 71117 14 -150308 37909 71117 22 -301026 71117 37909 22 -138611 52822 37909 23 -277838 37909 52822 23 -62946 37701 52822 37 -182799 52822 37701 37 -165646 43367 37701 30 -316064 37701 43367 30 -150317 37986 43367 13 -297586 43367 37986 13 -138592 52704 37986 23 -277848 37986 52704 23 -107897 43335 52704 30 -240956 52704 43335 30 -107880 43187 43335 43 -239777 43335 43187 43 -141879 74089 43187 33 -278518 43187 74089 33 -107916 43479 74089 37 -243681 74089 43479 37 -192610 109884 103782 11 -129649 109135 103782 14 -251237 114277 109566 40 -171505 88124 109566 44 -212305 113702 106840 41 -158164 109136 106840 42 -251638 117037 109540 46 -98994 85737 109540 48 -193649 117036 109054 73 -104271 21110 109054 70 -303488 86073 35611 62 -129729 109884 35611 41 -252649 5504 12183 11 -155639 71134 12183 10 -154350 62351 36628 14 -18770 51940 36628 16 -296597 36628 62351 14 -167353 52810 62351 25 -319220 62351 52810 25 -172223 102226 52810 28 -318037 52810 102226 28 -200565 38472 81866 25 -291270 6708 84062 13 -303102 84062 6715 29 -226912 88230 111613 35 -270277 111613 75651 47 -253030 7612 7611 15 -175351 7991 83617 29 -187212 83028 97827 114 -27212 66967 53803 52 -308415 111659 117073 12 -226087 83617 6855 42 -320771 73571 89414 13 -35553 111677 117071 39 -251645 117071 7407 62 -194930 7407 7612 33 -202664 56099 83028 127 -273331 12802 83683 46 -245440 83683 83999 51 -245481 83999 7991 27 -174232 1785 107652 30 -131036 6710 107652 24 -288800 107652 6710 24 -171328 84064 6710 26 -310369 6710 84064 26 -156445 80794 84064 57 -187289 83479 91774 30 -245600 84751 84278 77 -226196 84278 2772 86 -272487 8120 7613 12 -245620 84877 82738 35 -322542 83918 98228 49 -208068 90490 13669 12 -252546 4899 96766 96 -3731 44941 5504 11 -29388 12183 67628 11 -226267 84880 4312 62 -327351 107181 73571 14 -129371 106096 40221 72 -24429 34936 40221 37 -53621 42902 112170 8 -319423 63632 76883 9 -322417 83078 40656 51 -95445 54957 40656 33 -361343 13669 14394 13 -227867 92668 14394 13 -205449 76884 10952 7 -21515 115995 72632 41 -301195 72632 84351 113 -251262 114374 63632 9 -263629 76644 85110 58 -322746 85110 59870 24 -261348 59870 6010 3 -233249 6010 7992 13 -284099 84686 88804 34 -253097 7992 77635 41 -14153 114974 76884 7 -175587 9255 78713 4 -172657 106724 54371 18 -48999 72913 54371 32 -318227 54371 106724 18 -128124 84554 106724 15 -205372 76274 77397 75 -174886 5476 33934 63 -196932 17955 83094 27 -69544 83285 83094 33 -187234 83094 83285 33 -84684 93169 83285 65 -206662 83285 93169 65 -65211 49824 93169 61 -186700 80763 13098 13 -94640 50490 13098 13 -337361 34179 13744 15 -220145 41015 13744 17 -72625 5848 75902 78 -11535 51011 75902 47 -329088 7739 5848 99 -205319 75902 5848 78 -316092 37906 84831 8 -211910 111012 84767 29 -14012 112757 10977 51 -272957 10977 6424 69 -288450 104968 87605 84 -224337 73578 83493 7 -249530 102387 71693 25 -262955 71693 76298 68 -224713 76298 4308 66 -252454 4308 76299 31 -321146 76299 37906 15 -188338 88530 76799 15 -186014 76799 86681 27 -322688 84833 91957 24 -153140 54371 91957 32 -113620 84704 72913 21 -49122 76011 72913 34 -357685 62300 3115 9 -280982 63655 3115 10 -30776 26517 13110 19 -356948 41928 93538 14 -213916 6666 93538 12 -261477 60949 1804 18 -87734 10945 1804 5 -243552 72913 84704 21 -69510 82592 84704 12 -187489 84704 82592 12 -100135 105474 82592 47 -225918 82592 105474 47 -85194 102260 105474 52 -211233 105474 102260 52 -72526 4950 102260 24 -210715 102260 4950 24 -171820 94632 4950 35 -310065 4950 94632 35 -116264 4792 94632 24 -267276 94632 4792 24 -116529 7397 4792 25 -252534 4792 7397 25 -113388 79840 7397 44 -233514 7397 79840 44 -126991 70513 79840 47 -267146 93993 70513 55 -169300 63908 70513 63 -320370 70513 63908 63 -127788 76427 63908 62 -261890 63908 76427 62 -142058 76033 76427 30 -282659 76427 76033 30 -98965 84832 76033 9 -224678 76033 84832 9 -157806 105514 84832 25 -303209 84832 105514 25 -99473 95371 105514 42 -230533 105514 95371 42 -135439 32671 95371 24 -286482 95371 32671 24 -124766 56021 32671 20 -257658 32671 56021 20 -69965 91629 56021 38 -183187 56021 91629 38 -101671 4297 91629 33 -263587 76313 84566 33 -77655 35897 84566 56 -206848 84566 35897 56 -57606 4784 35897 31 -84251 84001 4784 25 -4380 51157 4784 77 -194463 4784 84001 25 -170665 72912 84001 41 -322555 84001 72912 41 -98921 83931 72912 55 -224253 72912 83931 55 -67687 65008 83931 51 -187356 83931 65008 51 -116418 6425 65008 24 -262058 65008 6425 24 -170977 76034 6425 38 -310317 6425 76034 38 -72865 8138 76034 41 -205340 76034 8138 41 -101751 5215 8138 27 -233656 8138 5215 27 -157925 106716 5215 27 -290996 5215 106716 27 -131076 7060 106716 26 -288684 106716 7060 26 -69612 84833 7060 21 -175187 7060 84833 21 -171684 91957 84833 24 -188968 91239 1141 9 -277729 37188 93636 48 -247581 93636 59342 18 -232987 4243 37188 144 -290723 3326 74926 53 -205174 74926 37006 29 -311887 14438 1272 26 -301687 76275 89909 30 -272319 7061 5389 48 -319832 66764 79988 51 -309953 4310 96930 59 -9686 29672 5832 13 -213925 6713 82741 20 -283745 82741 77398 39 -323304 87634 35129 14 -290726 3335 97636 38 -207680 88833 75737 21 -224640 75737 82896 59 -206614 82896 4951 79 -252551 4951 82742 48 -264840 82742 73355 56 -185510 73355 6856 51 -233393 6856 4310 38 -184661 67091 48941 11 -318306 55148 11372 10 -322587 84194 115400 152 -193392 115400 7061 72 -207805 89454 50845 7 -202035 50845 67674 35 -272510 8318 70782 14 -223991 70782 75900 23 -301629 75900 5648 29 -175077 6479 14519 14 -207435 87633 10925 90 -239495 40963 7058 11 -230650 106400 72634 47 -282157 72634 84486 73 -187444 84486 7062 56 -175188 7062 7063 72 -175189 7063 6713 51 -184420 65494 72631 9 -226222 84551 65009 52 -184350 65009 83932 19 -283977 83932 8318 14 -231779 114368 83286 60 -264932 83286 6519 22 -195097 8327 70783 40 -226112 83744 82120 94 -325611 97469 76028 19 -244006 76028 7255 57 -233477 7255 84768 50 -284106 84768 76644 43 -243065 69401 59875 38 -241800 59875 75732 44 -263498 75732 32859 42 -257691 32859 84487 40 -322632 84487 5281 39 -233145 5281 37959 42 -316107 37959 84705 42 -187490 84705 83095 37 -187235 83095 75733 43 -224639 75733 84567 17 -303171 84567 84209 28 -265066 84209 97469 30 -303043 83562 69401 64 -301458 74577 6714 26 -272267 6714 86182 21 -207669 88804 73579 55 -224338 73579 90557 122 -47831 57850 10926 80 -311132 10926 8319 116 -310673 8319 83744 116 -253569 10615 461 7 -251806 461 34174 7 -300427 66723 32893 11 -46317 40724 55148 8 -250440 108650 1324 26 -27619 71936 67091 10 -282067 71925 19132 7 -207900 89837 10559 77 -278016 38918 3172 74 -203274 60530 70784 33 -300982 70784 6180 23 -308493 112150 72635 57 -307718 106869 61276 24 -99549 96867 61276 18 -271869 4581 39802 19 -204410 69160 16790 20 -257359 30228 64581 47 -84103 80678 64581 98 -201963 50357 42321 67 -222134 56715 73564 20 -70074 93544 73564 18 -185935 76307 2779 137 -250361 108005 6479 13 -232023 116048 8322 7 -292047 10925 38472 90 -290959 4999 78048 68 -14358 117677 40243 10 -192062 106170 63110 29 -299944 63110 84488 36 -303165 84488 83745 44 -283942 83745 7413 74 -202681 56252 77159 14 -20903 104372 11038 63 -292061 11038 6481 119 -252839 6481 4999 91 -252446 4259 5342 73 -271925 4913 94203 127 -267191 94203 76293 27 -185931 76293 3834 83 -244320 78153 67671 94 -288515 105509 117079 21 -252941 7031 85325 44 -36072 117676 40963 10 -327407 107544 64905 40 -67399 62993 64905 33 -223191 64692 107544 24 -169451 64905 107544 40 -184146 63394 67645 31 -115131 109208 67645 26 -242829 67645 109208 26 -172867 108905 109208 28 -327642 109208 108905 28 -141799 73520 108905 45 -288997 108905 73520 45 -111631 64692 73520 43 -243627 73520 64692 43 -100343 107544 64692 24 -252418 4117 1025 76 -205592 77746 471 26 -309364 471 66448 26 -270940 116513 89416 59 -252938 7006 78841 85 -205782 78841 77746 30 -45924 35611 32367 49 -322591 84214 84066 47 -299074 56000 38582 95 -113476 81837 38582 73 -299485 59043 52510 16 -128507 92826 52510 31 -313383 21899 73995 25 -77911 38250 73995 14 -205049 73995 38250 14 -167485 53555 38250 9 -314971 31207 65021 28 -167352 52803 65021 26 -297612 43553 53248 11 -157299 99173 53248 28 -169465 65021 31207 28 -55415 61400 31207 23 -68973 73862 37721 36 -298765 53248 99173 28 -136786 42489 99173 28 -357489 57163 52803 22 -319601 65021 52803 26 -181804 45893 82098 45 -68912 73356 82098 33 -180765 37721 73862 36 -157279 98952 73862 19 -316151 38250 53555 9 -109642 53250 53555 4 -241065 53555 53250 4 -171969 97877 53250 15 -338113 52212 97877 20 -318090 53250 97877 15 -119399 24491 25460 12 -9748 30200 25460 10 -377229 82077 98952 22 -301353 73862 98952 19 -369338 40387 14547 13 -56829 109546 14547 9 -292750 14547 17529 10 -163648 30302 17529 11 -327555 108588 45893 23 -69475 82098 45893 45 -247788 94507 31364 22 -110632 59043 31364 19 -237974 31364 59043 19 -152854 52510 59043 16 -344072 40200 39845 50 -54789 54927 39845 48 -379557 117651 43356 12 -20848 101562 43356 11 -202693 56309 54185 31 -92381 38038 54185 41 -246610 89492 30979 19 -156057 73984 30979 22 -299996 63509 52221 21 -99121 88435 52221 11 -290857 4201 87307 13 -145005 1342 87307 11 -318119 53438 101423 100 -109104 49919 101423 102 -165532 42671 102857 42 -56871 110467 102857 33 -112702 71980 6979 17 -91284 30241 11376 34 -19199 56678 11376 34 -69420 80787 66491 39 -23185 21930 66491 35 -93305 43260 72818 27 -53786 44709 72818 25 -300314 65980 378 44 -222119 56605 2910 8 -45365 28741 48159 5 -224256 72924 4742 25 -111411 63477 4742 22 -233062 4742 63477 22 -157170 96739 63477 19 -171845 95289 74202 44 -33734 58794 74202 14 -86946 4742 72924 25 -5128 60203 72924 17 -299990 63477 96739 19 -66599 58350 96739 16 -247627 93819 10934 16 -171223 81819 10934 43 -375645 41430 8004 50 -4620 54294 8004 48 -53337 40137 36689 12 -333265 89146 76648 12 -185269 71407 76648 13 -358619 85583 14451 47 -5704 67562 14451 48 -350997 54295 75808 19 -175194 7078 75808 33 -136906 43179 5000 9 -26202 55332 5000 10 -375809 46632 37063 3 -286591 95851 37063 4 -339381 83398 33765 9 -182822 53028 33765 18 -259296 43313 80392 93 -81388 58267 80392 20 -18156 45727 2885 53 -45459 29568 2760 17 -309115 116515 76647 57 -316817 43356 84423 11 -307364 104308 1104 40 -302992 83222 95439 33 -17227 35159 104308 24 -22772 17522 90 16 -174037 793 83222 30 -37048 16184 7997 18 -252376 3940 34485 85 -243020 68957 78181 38 -7057 113883 4201 12 -49261 87307 89101 11 -33681 58253 77509 34 -282816 77509 102251 45 -300696 68717 3466 45 -316147 38182 79308 16 -138797 54064 79308 13 -282582 75890 63478 86 -222330 58034 91409 63 -291563 8337 7078 33 -69204 75808 7078 33 -218462 30210 98071 85 -165927 44747 98071 18 -171973 97949 73129 44 -23921 28820 73129 23 -215147 13231 56672 11 -112348 70247 56672 7 -156825 89755 10927 40 -40514 53817 10927 19 -249397 101684 54659 10 -145113 3535 54659 10 -292048 10927 89755 40 -67042 60966 89755 30 -369669 49635 10517 45 -30388 22810 10517 44 -296315 34880 52957 28 -80540 53187 52957 36 -297347 41640 73906 31 -114229 97993 73906 28 -316841 43514 43511 28 -156978 92586 43511 33 -239998 45494 59258 16 -165516 42589 59258 25 -243667 73906 97993 28 -98264 72970 97993 20 -214426 9420 70382 8 -111991 67856 70382 10 -341186 106725 53187 21 -202277 52957 53187 36 -113027 74044 43281 12 -12085 56711 43281 10 -208230 91137 72524 29 -109824 54226 72524 38 -156046 73906 41640 31 -5615 66085 41640 20 -152916 52957 34880 28 -11271 47991 34880 11 -297607 43511 92586 33 -79024 44677 92586 22 -243664 73878 43265 9 -139351 57374 43265 10 -279867 54321 43514 16 -165671 43511 43514 28 -297091 39778 65056 33 -142948 96839 65056 24 -220734 46238 34327 26 -90050 23888 34327 13 -219122 34327 23888 13 -163068 27393 23888 19 -334149 97413 19898 9 -311719 13738 19898 10 -164228 34247 53219 43 -2319 29000 53219 18 -281164 65056 96839 24 -66835 59850 96839 14 -190794 99140 6739 9 -167130 51516 6739 11 -313759 23888 27393 19 -78860 43813 27393 20 -351928 80100 34247 32 -318085 53219 34247 43 -91921 34327 46238 26 -38736 32465 46238 20 -154775 65056 39778 33 -7505 6758 39778 23 -103229 15425 51811 4 -240853 51811 15425 4 -131629 11194 15425 4 -201256 44813 43445 118 -70473 101896 43445 112 -78791 43445 44813 118 -50616 10020 44813 21 -369267 39048 101896 17 -181535 43445 101896 112 -350538 43281 73878 10 -47537 54291 73878 9 -291067 5541 98281 16 -65151 49488 98281 12 -363459 49124 99139 21 -182825 53064 99139 38 -356472 33084 80416 35 -278612 44047 80416 42 -265924 88428 58747 17 -80690 54153 58747 21 -253651 10992 94843 128 -139952 61023 94843 14 -369859 54659 64215 9 -286241 94295 64215 9 -359746 98251 3535 10 -47416 52470 3535 10 -77649 35850 346 129 -31228 30714 346 14 -277364 34532 65157 17 -80579 53448 65157 19 -203860 65157 53448 19 -157332 99932 53448 27 -316808 43236 53019 8 -99445 94954 53019 16 -221764 53874 43139 20 -65641 52452 43139 11 -181496 43139 52452 11 -107042 38134 52452 12 -240924 52452 38134 12 -165624 43205 38134 18 -246325 88313 53874 21 -93280 43139 53874 20 -363092 38831 43205 20 -316139 38134 43205 18 -375539 39011 73872 35 -240766 51188 73872 45 -183969 62062 102929 30 -165629 43236 102929 28 -326801 102929 43236 28 -167388 53019 43236 8 -170794 74036 9795 27 -6184 73066 9795 15 -353999 104284 22543 10 -29418 12372 22543 10 -113009 73872 51188 45 -23032 20152 51188 21 -310562 7725 94620 39 -75601 23759 94620 15 -341868 8341 16702 42 -306866 101560 16702 36 -263954 78574 57547 44 -252456 4315 89417 106 -301742 76770 99239 43 -138984 55209 99239 22 -279392 50435 87890 74 -28584 114989 112703 9 -21321 113830 50435 59 -303482 86039 63657 21 -281376 66757 3936 5 -290814 3936 6483 7 -233389 6815 2538 57 -226111 83735 7775 27 -195004 7775 37365 33 -53700 43940 10725 10 -301581 75630 80510 52 -243587 73217 43420 33 -114254 98514 43420 30 -107907 43420 73217 33 -57384 117187 73217 22 -239783 43420 98514 30 -66185 55518 98514 19 -20551 73340 114920 12 -251328 114920 77441 7 -263741 77189 79087 9 -186372 79087 3878 10 -213443 3878 3879 9 -194349 3879 823 5 -252951 7102 87012 36 -6975 112775 73656 10 -320482 71214 37800 18 -113413 80513 37800 25 -360253 104269 4955 37 -214098 7777 4955 33 -282567 75795 76035 23 -131179 7777 76035 20 -282602 76035 7777 20 -86966 4955 7777 33 -240116 46485 54249 35 -62563 34634 54249 18 -302481 80843 71214 13 -164662 37800 71214 18 -109828 54249 46485 35 -27028 64038 46485 31 -182971 54249 34634 18 -155146 67657 34634 14 -207224 86733 68775 6 -219538 36625 68110 50 -212313 113763 85806 45 -38953 36254 113763 32 -205309 75844 78049 8 -55590 63646 10978 50 -241474 57067 888 52 -33447 55576 78563 6 -213815 6162 101359 31 -369626 48739 110753 7 -226965 88561 110753 7 -345136 69547 109946 13 -49589 110018 109946 12 -239772 43292 87065 23 -70277 98275 87065 38 -180846 38256 99667 34 -63338 39861 99667 24 -215347 14146 72033 20 -95162 53456 72033 18 -224139 72033 53456 18 -140014 61426 53456 6 -171298 83432 71125 36 -26434 57814 71125 27 -320463 71125 83432 36 -128410 91055 83432 37 -224737 76421 71006 40 -70321 99244 71006 45 -271144 118 84212 18 -171755 93528 84212 32 -226170 84137 84643 26 -92359 37912 84643 30 -171990 98315 83099 45 -35021 76284 83099 26 -242142 62460 84137 42 -98957 84643 84137 26 -221386 50713 76378 63 -142118 76781 76378 54 -337833 46516 71126 11 -325213 95887 71126 14 -226244 84643 37912 30 -84280 84706 37912 20 -195077 8249 17011 48 -110736 59560 17011 36 -341137 105000 87013 10 -289528 113235 87013 11 -7660 9269 35660 19 -360130 102285 72014 9 -9570 28567 72014 13 -98949 84428 71124 58 -31404 32476 71124 48 -200488 37912 84706 20 -101726 5043 84706 29 -245592 84706 5043 29 -69924 90995 5043 44 -284132 84896 87895 69 -329157 9021 76161 26 -206828 84428 76161 30 -263620 76517 97468 35 -321055 75668 95197 66 -81292 57514 95197 56 -344198 43886 13908 12 -206384 81739 13908 14 -378991 102254 14674 9 -18000 44400 14674 11 -96518 61285 56053 107 -54047 47070 56053 109 -370514 73010 13120 10 -228140 93855 13120 11 -371430 90913 2326 11 -45212 27242 2326 12 -87311 7780 65856 84 -47179 50010 65856 68 -27950 84137 84896 46 -286002 93257 70291 40 -185103 70291 62460 69 -264214 80030 85802 68 -240878 51997 86683 64 -322796 85351 113760 10 -298180 48786 1248 73 -300704 68775 79187 8 -240810 51551 34193 20 -159660 7146 34193 25 -185888 76036 83872 61 -84638 92347 83872 31 -318145 53710 51551 30 -106552 34193 51551 20 -185596 74066 53710 25 -167137 51551 53710 30 -243548 72863 76036 51 -69576 83872 76036 61 -373179 3872 76525 40 -206655 83206 76525 42 -339151 80741 92252 33 -321176 76525 92252 32 -214229 8512 81392 28 -152633 51201 81392 15 -253647 10969 62478 125 -99515 96238 62478 148 -125851 62478 10969 125 -56235 72151 10969 15 -359660 97282 2019 12 -248960 99777 2019 30 -102133 8512 6716 33 -33341 54397 6716 23 -233373 6716 8512 33 -98816 81392 8512 28 -156442 80741 5437 22 -291046 5437 80741 22 -74476 18289 80741 42 -213958 6875 82898 24 -87176 6872 82898 21 -225983 82898 6872 21 -142217 80221 6872 24 -203440 61702 6873 43 -142871 95271 6873 22 -312339 16701 9008 47 -72077 115501 9008 24 -243508 72585 6874 50 -150471 38922 6874 21 -338171 54056 5518 12 -298921 54507 5518 11 -363809 58582 83495 12 -13581 87308 83495 11 -98878 82898 6875 24 -42572 106925 6875 22 -114297 99537 76040 48 -54816 55194 76040 22 -341052 102873 102184 22 -252564 5020 102184 49 -339176 80957 2166 49 -27258 68080 2166 48 -376300 58577 58259 11 -11613 51754 58259 11 -159921 9008 16701 47 -53277 39573 16701 37 -145246 5519 82899 17 -4936 57865 82899 18 -302947 82899 5519 17 -127835 76782 5519 16 -336017 16234 99537 38 -244007 76040 99537 48 -337324 33907 56348 9 -273669 14356 56348 8 -171648 91296 43829 40 -10387 39173 43829 22 -345446 79029 97433 23 -223908 70227 97433 40 -276653 30270 91071 43 -118814 21560 91071 21 -267787 96947 45996 9 -132107 14233 45996 10 -122518 43208 71105 44 -2616 31597 71105 16 -262877 71105 43208 44 -167962 56004 43208 36 -316579 41396 52899 10 -369813 53171 37937 10 -186201 77977 37937 10 -276395 28532 73524 79 -85124 101244 73524 173 -191604 102944 53158 63 -104748 23785 53158 40 -42568 106836 112698 33 -13597 88592 3711 8 -185936 76310 84138 27 -284011 84138 87306 21 -77 4547 7766 11 -230472 104941 87892 11 -226411 85612 116559 50 -251552 116559 78655 62 -263199 73656 49681 10 -14908 11110 53837 36 -202383 53837 2207 48 -299775 61733 2347 16 -212897 348 72035 12 -206992 85533 7996 32 -272465 7996 95929 67 -141866 73994 48883 37 -21700 2019 48883 36 -279153 48883 73994 37 -140600 65179 73994 13 -278133 39832 74080 128 -157928 106732 74080 17 -297156 40323 54056 12 -84235 83495 54056 12 -282311 73994 65179 13 -138633 53002 65179 101 -281180 65179 53002 101 -143007 98234 53002 105 -352342 86452 87308 11 -194574 5518 87308 11 -96018 58387 74044 11 -25079 43265 74044 12 -222459 58976 74113 15 -83773 74101 74113 13 -40271 51109 1160 22 -233186 5613 76802 75 -314952 31049 39370 55 -282655 76379 75663 38 -187186 82872 87896 59 -278077 39370 83496 56 -187427 84284 98190 40 -252365 3856 71704 22 -322411 83018 6575 76 -265539 86727 18737 8 -270276 111594 99741 94 -24992 41859 49175 9 -28426 112828 113237 66 -310646 8116 99970 31 -224206 72638 48324 30 -70255 97586 48324 153 -333424 90671 18127 27 -315134 32437 18127 23 -103442 16567 41481 43 -2339 29156 41481 13 -182158 48324 97586 153 -91701 32437 97586 130 -229053 97586 32437 130 -161409 18127 32437 23 -358682 86469 6373 22 -225984 82900 6373 52 -370714 80593 61000 10 -201021 42085 61000 10 -102034 7419 75816 67 -46197 39546 75816 17 -316114 38000 37402 81 -65841 53609 37402 56 -243974 75816 7419 67 -128457 91911 7419 70 -378837 100372 91911 18 -253005 7419 91911 70 -156260 76380 76381 19 -55161 58724 76381 9 -301697 76381 76380 19 -156554 82900 76380 48 -301696 76380 82900 48 -87119 6373 82900 52 -52857 32951 3864 56 -309462 1369 97853 70 -295092 27111 47112 87 -27311 68861 1369 41 -271593 2851 80592 69 -48513 66180 38895 6 -294245 22513 1394 10 -37084 16537 617 17 -290239 617 78184 29 -53845 45302 51429 35 -187143 82665 10557 29 -234095 10557 1974 45 -232594 1974 88496 56 -11375 49380 69547 12 -194346 3864 102712 70 -256356 24542 45672 7 -300498 67195 90807 24 -286990 97549 49088 9 -205662 78184 4153 37 -182084 47858 114922 10 -174262 1933 98169 25 -42318 86059 85803 13 -265236 85148 36642 17 -219981 39505 2851 62 -13437 75328 116560 14 -289848 115563 89421 11 -14154 114977 64694 15 -291967 10583 36973 17 -258465 36973 78274 38 -48976 72650 65427 36 -203899 65427 36007 46 -258302 36007 57358 17 -272219 6498 113235 10 -370199 64335 43092 10 -12458 61000 43092 10 -44872 23849 22888 13 -81717 60031 41765 7 -36045 117199 41765 9 -200979 41765 60031 7 -171956 97594 60031 26 -318915 60031 97594 26 -113008 73854 97594 25 -248433 97594 73854 25 -142844 94692 73854 23 -282288 73854 94692 23 -149088 29176 94692 27 -346326 91612 72638 25 -305159 93719 72638 12 -271375 1613 85111 63 -298228 49104 25000 129 -61372 27566 25000 29 -363334 45996 14356 9 -188869 90777 14356 8 -332802 81646 14233 10 -40740 56348 14233 9 -157491 102676 6717 129 -4303 50265 6717 29 -291271 6717 102676 129 -163371 28928 102676 110 -231081 109158 74636 29 -70949 106160 74636 29 -211693 109143 69848 33 -143780 107450 69848 37 -281806 69848 107450 37 -116416 6376 107450 24 -100331 107429 116861 30 -27740 73137 116861 14 -370974 85115 6488 24 -250276 107431 6488 31 -164518 36545 117631 14 -43251 4478 117631 12 -232132 116861 107429 30 -114954 107427 107429 32 -250275 107429 107427 32 -85682 107426 107427 22 -129491 107431 112173 30 -29371 12022 112173 20 -270344 112173 107431 30 -101904 6488 107431 31 -141867 74003 117078 30 -17282 35723 117078 23 -290375 1408 72308 110 -299335 57824 34000 56 -281224 65513 96608 32 -222299 57823 4490 59 -271769 4079 57823 129 -263921 78381 101096 107 -238878 37047 16009 58 -243482 72308 67863 47 -223588 67863 57824 66 -299331 57813 74356 63 -263896 78249 79189 28 -321600 79189 94459 32 -364826 86090 36545 15 -328730 117095 36545 13 -172543 105502 31784 44 -39005 37068 31784 34 -333765 93916 64950 20 -301349 73798 64950 23 -133024 19551 25343 12 -4228 49507 25343 13 -370008 58698 96565 8 -239016 37837 96565 9 -280806 62138 57722 15 -97701 69428 57722 15 -308792 114290 107311 28 -157988 107312 107311 22 -307782 107311 107312 22 -171399 85746 107312 29 -288435 104907 74385 33 -157984 107266 74385 24 -301432 74385 107266 24 -171507 88136 107266 24 -203091 59124 103086 24 -172288 103083 103086 23 -326835 103086 103083 23 -99971 103746 103083 26 -371241 88815 86686 18 -280461 59039 86686 71 -344331 47803 38398 11 -48296 63250 38398 11 -175714 9841 102958 33 -141746 73044 102958 17 -277084 33223 24228 23 -85011 99313 24228 36 -150875 41080 87 35 -23097 20848 87 36 -98145 72361 13473 41 -48766 70162 13473 41 -167328 52637 42770 37 -55027 57273 42770 36 -165608 43065 13689 35 -38557 30962 13689 35 -220407 43164 91393 23 -97517 68052 91393 6 -68985 73931 68052 12 -19392 58848 68052 9 -184812 68052 73931 12 -152984 53333 73931 13 -301361 73931 53333 13 -168440 58922 53333 11 -181626 44189 60719 22 -70005 92265 60719 20 -220538 44442 37960 27 -107920 43500 37960 22 -239036 37960 43500 22 -151309 43418 43500 17 -297605 43500 43418 17 -156479 81381 43418 26 -148133 23903 19551 13 -40869 57722 19551 13 -306425 99396 30627 12 -136901 43164 30627 24 -276689 30627 43164 24 -99265 91393 43164 23 -351962 80441 81381 18 -297592 43418 81381 26 -362271 25343 62138 14 -22125 10355 62138 14 -318108 53333 58922 11 -98391 73846 58922 11 -222448 58922 73846 11 -95276 54079 73846 9 -224380 73846 54079 9 -135483 32924 54079 8 -270460 113193 74521 36 -128226 86936 74521 36 -288924 108549 18739 12 -113541 83070 18739 29 -333129 87354 88501 12 -233595 7780 88501 28 -349052 18739 7780 31 -223330 65856 7780 84 -339133 80506 18665 18 -3054 38331 18665 15 -346286 91221 100200 16 -201027 42119 100200 106 -329914 18792 24222 14 -16877 30400 24222 12 -178502 24222 38331 13 -141322 70578 38331 16 -220761 46490 96362 35 -78103 39692 96362 26 -209100 94932 18792 14 -59722 18665 18792 16 -290028 117078 74003 30 -125394 59883 74003 71 -263240 74003 59883 71 -128441 91707 59883 67 -231636 113247 78277 72 -289530 113241 111617 142 -47388 52264 113241 18 -175822 10594 100955 42 -194273 3415 51307 10 -288330 104258 68778 4 -82545 65387 68778 47 -204362 68778 65387 47 -107789 42455 65387 46 -242520 65387 42455 46 -116182 2307 42455 3 -259213 42455 2307 3 -144615 114850 2307 4 -193576 116522 53958 24 -121597 38338 53958 24 -187464 84623 74232 43 -253660 11074 8327 71 -187305 83624 86403 22 -284492 86403 113238 46 -212234 113238 60530 54 -243510 72635 83624 57 -291235 6519 104321 43 -191812 104321 74577 39 -10367 38951 6188 48 -252770 6188 4227 84 -194392 4227 76301 61 -193410 115470 75903 68 -328268 113712 84004 59 -265038 84004 83562 76 -290936 4835 6727 27 -175120 6727 8650 73 -291623 8650 38221 98 -277889 38221 3686 54 -204537 70205 4611 94 -290911 4611 4612 65 -245353 83081 4373 33 -13001 68930 9838 9 -271298 1158 82135 44 -322221 82135 83935 45 -184025 62382 38949 35 -233541 7481 88818 56 -312799 18867 13210 7 -280393 58489 75821 71 -323601 89077 72044 58 -224140 72044 64510 37 -272173 6223 70831 67 -185339 71923 40841 9 -13501 76908 57984 22 -114773 105436 105440 10 -250025 105440 105436 10 -258225 35611 109884 41 -70662 103782 109884 11 -339629 88481 106101 48 -191721 103780 106101 21 -193650 117038 107537 52 -157538 103320 107537 48 -219616 37022 77595 95 -264354 80634 46786 21 -142691 91031 46786 53 -290788 3788 89778 101 -201723 48658 60397 21 -95299 54172 60397 20 -222624 60397 54172 20 -70373 100190 54172 18 -38533 30752 54490 65 -298917 54490 68362 102 -241461 56943 88191 50 -1842 24602 69402 9 -245150 82155 2808 81 -174433 2808 78070 96 -244305 78070 56943 35 -325841 98332 2512 82 -315307 33426 2698 125 -328274 113745 67821 8 -262486 68319 3604 96 -252315 3604 91085 109 -210722 102304 10596 7 -128230 87016 35191 12 -47582 54830 35191 16 -319591 64993 78567 51 -321488 78567 3881 15 -232932 3881 57677 10 -280270 57677 77817 31 -362468 27648 93687 9 -43065 116548 27898 26 -101691 4550 97275 11 -250029 105502 53906 21 -338964 75340 108855 58 -8199 15495 60911 10 -64868 47803 89431 13 -188114 87586 74433 28 -99142 88815 74433 10 -224459 74433 88815 10 -150368 38398 88815 9 -303613 86686 63250 20 -171394 85558 63250 11 -367531 13394 85558 11 -319356 63250 85558 11 -351339 63234 87016 13 -258152 35191 87016 12 -26557 59124 109947 18 -135266 31784 86090 36 -277648 36545 37068 13 -159214 117631 85115 14 -357310 52206 4478 11 -291227 6488 4478 21 -372827 109962 110751 58 -354543 4478 52206 11 -50120 117095 52206 10 -129986 112173 87017 20 -263861 78032 12022 10 -171541 89047 12022 10 -116004 116861 86091 13 -251711 117574 73137 10 -279683 53002 98234 105 -98040 71749 98234 17 -310947 9795 74036 27 -171209 81609 74036 34 -312316 16606 61695 81 -262045 64907 90726 42 -49355 101617 10483 7 -144984 294 82692 73 -20623 75336 82692 91 -203048 58747 54153 21 -69007 74098 54153 21 -264405 80865 50312 21 -138801 54106 50312 23 -279383 50312 54106 23 -109612 53064 54106 37 -241119 54106 53064 37 -70316 99139 53064 38 -226101 83677 85811 19 -290950 4934 85812 48 -42993 115502 8514 11 -253634 10890 4291 20 -184572 66491 80787 39 -125541 60679 80787 15 -222691 60822 96567 36 -145126 4189 96567 24 -308874 114862 75837 52 -171227 81948 75837 28 -245311 82874 64019 55 -171307 83626 64019 35 -319483 64019 83626 35 -99332 92790 83626 184 -272049 5566 84425 36 -171308 83627 84425 21 -322619 84425 83627 21 -171335 84281 83627 20 -254141 13320 11022 81 -85034 99733 11022 78 -195566 11022 99733 78 -58931 14223 99733 19 -301573 75567 85330 31 -12711 64206 71407 12 -193089 113267 73378 27 -6348 76648 85331 12 -48588 67535 1169 112 -301292 73378 84709 50 -33329 54244 60673 52 -203295 60673 85332 77 -226353 85332 75567 43 -214654 10978 76304 79 -359737 98137 81383 34 -259283 43146 81383 48 -301001 70917 85813 58 -244099 76813 6548 43 -325934 98734 38225 40 -64333 45180 38225 39 -186541 79962 32117 7 -243398 71653 6028 41 -226046 83276 8337 30 -145425 7078 8337 33 -253451 9825 83749 19 -322515 83749 8655 41 -206683 83419 101124 37 -289265 111075 119 13 -272540 8454 68000 51 -97767 69849 68000 85 -223611 68000 69849 85 -192913 112158 4577 22 -107913 43450 25635 179 -10623 41745 25635 180 -335267 3362 81472 39 -200469 37791 3882 18 -223632 68119 87314 16 -42864 113785 68119 11 -368111 20407 25029 6 -174250 1872 25029 9 -137448 45997 23961 145 -43497 8850 23961 18 -360346 107017 35956 6 -313502 22620 35956 5 -167057 51180 69953 25 -35809 114437 69953 24 -320286 69953 51180 25 -142919 96183 51180 73 -279482 51180 96183 73 -153999 60016 96183 73 -305257 94127 27657 4 -165865 44506 27657 6 -314532 27657 44506 6 -116151 1546 44506 33 -252427 4153 88814 33 -263990 78737 9021 15 -185900 76161 37655 27 -6608 104383 10583 12 -299271 57358 6948 15 -41725 69041 42778 16 -56418 75668 6478 29 -263395 75039 66117 13 -239101 38244 106877 121 -375285 34289 24602 8 -183034 54978 24602 12 -272904 10716 5505 7 -57475 1437 5505 7 -174888 5505 1437 7 -220862 47244 56431 12 -191292 101283 4327 41 -290876 4327 251 89 -173960 251 99048 134 -250920 112133 1387 6 -232478 1387 80645 8 -320584 72075 10968 162 -292052 10968 76673 135 -185994 76673 102695 90 -224031 71124 84428 58 -83952 76161 84428 30 -259117 41672 102921 60 -168953 61751 102921 33 -325120 95501 46516 11 -83471 72014 46516 9 -372792 108853 28567 13 -204665 71126 28567 15 -123940 51104 65225 63 -47517 54060 65225 65 -15985 22234 28787 25 -291601 8514 88506 11 -39068 38320 69943 41 -243159 69943 77513 39 -282817 77513 1388 11 -213049 1388 4053 14 -290833 4053 37201 9 -202653 56047 69012 62 -290818 3958 45462 36 -309849 3558 2868 4 -232751 2868 78072 4 -213054 1420 92915 56 -33860 60185 1131 18 -300731 68960 33951 29 -163812 31148 69710 46 -41086 60194 69710 45 -332959 85153 78925 34 -46104 38621 78925 34 -224889 77419 3336 31 -321651 79475 191 31 -216943 21736 75148 91 -238800 36611 108128 49 -227571 91393 58848 9 -171456 87024 58848 31 -318788 58848 87024 31 -149773 33100 87024 27 -303704 87024 33100 27 -73455 12215 33100 31 -199633 33100 12215 31 -69772 88142 12215 34 -322503 83627 84281 20 -172163 101411 84281 17 -213507 4339 71426 27 -113304 76674 71426 42 -243365 71426 76674 42 -85038 99796 76674 32 -182967 54228 58300 45 -131248 8339 58300 30 -280368 58300 8339 30 -128693 96576 8339 17 -142277 81743 31148 55 -53266 39374 31148 51 -182998 54526 106333 12 -142915 96103 106333 57 -253223 8657 97153 14 -139805 60130 97153 10 -281875 70380 28 10 -66250 55981 28 10 -343593 32646 23917 9 -183438 57933 23917 8 -290868 4265 94978 30 -271542 2484 56298 7 -318442 56298 86405 5 -5872 69626 66362 7 -223390 66362 78760 6 -205766 78760 68788 8 -339931 91547 89766 10 -175712 9838 63654 9 -313874 24515 52426 13 -183086 55324 65979 37 -300313 65979 546 30 -232352 546 74220 27 -243715 74220 46823 32 -275119 21558 67572 17 -89593 21288 67572 23 -378383 96165 21288 18 -223546 67572 21288 23 -313283 21288 1164 48 -251928 1164 36946 40 -200331 36946 36894 6 -315933 36894 4054 6 -290834 4054 78397 7 -225031 78397 4055 9 -213466 4055 77968 12 -224978 77968 4090 10 -252414 4090 65845 16 -281270 65845 96165 20 -234093 10548 77903 9 -301944 77903 88507 6 -21657 117680 114925 5 -308885 114925 65202 6 -223244 65202 65269 9 -309961 4373 91700 30 -28942 6278 55324 12 -248320 97090 2950 53 -25651 48768 1158 9 -62030 30969 4119 133 -4838 56658 4119 131 -128606 94843 10992 128 -9777 30487 10992 123 -116808 9355 59374 44 -12586 62575 59374 45 -67051 61015 43834 44 -8901 22205 43834 45 -371124 87081 77075 43 -5862 69530 77075 44 -343640 33130 116065 50 -50063 116121 116065 50 -86359 114256 6486 66 -42339 87619 6486 80 -250735 110684 84072 12 -116653 8341 84072 14 -265046 84072 8341 14 -306348 99048 72958 135 -141461 71432 72958 79 -282191 72958 71432 79 -145576 8158 71432 63 -301063 71432 8158 63 -99565 97090 8158 80 -347952 119 97090 52 -214165 8158 97090 80 -276274 27859 7443 10 -368319 23695 13762 16 -372176 98245 13922 13 -176600 14327 13922 10 -69557 83500 70546 54 -48498 65931 70546 24 -185149 70546 83500 54 -116367 5874 83500 50 -264961 83500 5874 50 -112720 72075 5874 97 -233232 5874 72075 97 -164428 35952 72075 90 -155924 72958 35952 62 -233646 8076 49481 3 -104270 21105 49481 3 -240552 49481 21105 3 -122132 41057 21105 4 -263298 74402 40015 12 -136046 37904 40015 24 -241944 60970 93390 8 -117552 14071 93390 55 -376271 57710 47288 7 -263042 72420 47288 7 -125954 63023 12260 69 -28625 115623 12260 68 -218256 28722 105578 30 -70887 105583 105578 33 -191970 105578 105583 33 -258746 39036 105579 22 -211622 108571 108575 5 -114888 106700 108575 7 -252077 2076 3249 62 -341626 2830 36311 16 -375767 45478 25063 54 -263753 77315 383 162 -180658 37080 1030 50 -288447 104937 68553 87 -308246 110746 897 57 -223817 69629 37012 70 -319874 67124 61951 106 -175398 8189 84214 35 -282228 73304 81999 36 -256423 24849 36313 135 -116288 5199 36313 53 -258367 36313 32873 52 -68406 70318 32873 10 -234696 13589 14306 47 -135474 32872 14306 47 -275255 22492 32872 36 -74091 16056 32872 34 -199586 32872 13374 54 -75009 20827 13374 54 -194913 7300 20827 36 -116603 7956 20827 36 -255669 20827 10979 37 -164658 37791 10979 19 -328511 115497 5880 46 -280634 60625 63703 114 -41115 60472 1613 38 -244271 77839 67009 172 -307500 105233 70545 67 -309436 1141 104968 52 -260894 56287 84900 99 -309572 1956 77906 104 -302122 78997 4038 198 -312821 18964 522 159 -270846 115822 54764 146 -174681 4198 832 135 -291808 9602 37013 314 -194017 1888 89435 98 -300812 69632 901 130 -230497 105231 57570 248 -225111 78886 2016 307 -284884 88342 51812 155 -226971 88626 112714 150 -283095 79457 36895 638 -278804 45910 61549 224 -126958 70317 61549 59 -291578 8410 10897 73 -171414 86076 10897 83 -192878 111910 3954 173 -328156 113052 8342 86 -309380 655 79625 164 -309576 2005 56133 120 -20611 75036 2606 9 -224549 75067 64169 5 -10070 33104 26876 8 -180715 37402 53609 56 -171861 95763 53609 14 -25034 42444 10541 59 -232226 117544 9029 52 -27851 75940 115529 16 -290512 2204 55081 38 -325632 97540 75916 28 -319641 65269 5883 8 -291139 5883 2290 13 -322651 84622 83294 40 -271412 1798 3320 54 -26339 56715 48886 36 -247052 91478 1871 46 -180538 36233 74299 240 -270274 111590 88209 125 -289079 109572 34366 11 -205659 78159 1035 39 -329020 6282 91378 90 -205053 74056 91378 44 -221798 54185 38038 41 -113941 91737 38038 20 -321112 75986 75666 94 -277691 36876 2161 77 -244174 77122 3322 130 -310741 8655 3945 55 -212233 113237 84284 77 -235654 18212 1144 32 -290881 4381 75835 31 -145548 7973 75835 16 -306926 101885 109556 12 -129693 109557 109556 32 -354238 112396 109557 85 -270028 109556 109557 32 -309179 117005 89436 57 -54435 51287 428 102 -223890 70055 77444 36 -321312 77444 88210 28 -227876 92690 62305 59 -98410 73973 62305 30 -85855 109477 35584 23 -250552 109475 89439 113 -86238 112939 89439 42 -202887 57555 69027 44 -212449 114835 84007 15 -156475 81292 84007 16 -27557 71319 55149 83 -298987 55149 1566 109 -187934 86868 69863 72 -320264 69863 101217 57 -279938 54867 86413 73 -213258 2687 10594 39 -272285 6873 95271 22 -97140 65193 95271 13 -193446 115748 59679 46 -171547 89196 59679 67 -203801 64671 53190 38 -95303 54188 53190 36 -221677 53190 54188 36 -98400 73916 54188 7 -221799 54188 73916 7 -70420 101084 73916 22 -353518 98888 101084 33 -185582 73916 101084 22 -200528 38249 43175 46 -85053 100104 43175 36 -182898 53640 74043 33 -141857 73910 74043 134 -193667 117107 79312 48 -321612 79312 85564 51 -19718 62305 59084 125 -54831 55305 65483 273 -209031 94578 10553 201 -267689 96503 67437 84 -324266 92034 10599 47 -290548 2371 85335 17 -287153 98364 30287 61 -168750 60513 30287 50 -212208 113114 34465 36 -205802 78982 47162 32 -307412 104664 60341 74 -63033 38330 60341 65 -238603 35244 86102 94 -100456 108659 86102 236 -373114 1942 59159 40 -220269 42059 59159 23 -190272 96881 27098 37 -276141 27098 17641 25 -103839 18773 17641 46 -95220 53833 18773 147 -27386 69646 18773 56 -300188 65022 52566 31 -65842 53610 52566 18 -208076 90520 41111 59 -96930 63630 41111 19 -220162 41111 63630 19 -142850 94858 63630 25 -340074 92883 94858 26 -280978 63630 94858 25 -223336 65972 52952 26 -253583 10661 2857 50 -220807 46897 113247 120 -368636 27523 93292 30 -280511 59507 93292 130 -314305 26562 14671 111 -101490 117319 14671 114 -215495 14671 109962 110 -152797 52206 109962 59 -379556 117631 117095 11 -308247 110751 117095 9 -213046 1372 90351 84 -345072 67501 85130 19 -290093 117559 85130 50 -264922 83244 85133 34 -200464 37775 35750 60 -125489 60363 35750 29 -258251 35750 60363 29 -125458 60191 60363 36 -261391 60363 60191 36 -171776 93799 60191 31 -318935 60191 93799 31 -96011 58366 93799 48 -257202 28901 52633 132 -292000 10725 3415 12 -234234 11401 3524 18 -171685 91960 46635 103 -17539 39553 46635 48 -205728 78553 678 75 -308609 112977 111634 6 -193102 113406 83875 27 -317066 45672 45302 36 -113036 74112 45302 42 -347628 107735 86106 92 -32911 49812 86106 114 -334965 112450 13413 115 -21397 114689 13413 116 -347880 115886 9041 114 -7079 114117 9041 115 -366870 116439 111637 113 -18231 46423 111637 114 -268824 101541 49812 102 -70793 104850 49812 114 -193146 113683 114906 105 -142577 88826 114906 57 -289763 114906 88826 57 -243321 71162 2508 9 -1970 25755 3902 39 -99539 96567 60822 36 -290407 1541 97269 59 -350120 34034 74621 21 -49344 100298 74621 8 -201064 42635 26146 109 -148918 28158 26146 228 -209684 97570 62704 94 -128567 94062 62704 53 -261734 62704 94062 53 -67095 61278 94062 17 -147625 21092 61278 67 -6093 72117 61278 91 -299723 61278 21092 67 -67724 65379 21092 95 -223163 64415 65701 15 -99634 98353 65701 12 -223316 65701 98353 12 -111874 66652 98353 27 -117027 11022 66652 86 -245782 85654 1857 163 -289243 110914 115542 112 -173726 116376 115542 113 -348037 2471 109964 53 -43026 115901 109964 48 -347904 116380 69611 114 -5096 59884 69611 86 -352396 87486 78920 85 -21450 115320 78920 107 -379439 114125 62877 72 -28768 117317 62877 113 -379441 114145 109965 115 -42633 109968 109965 116 -366846 115330 78921 113 -327743 109965 78921 115 -347483 103317 29368 115 -42752 112001 29368 116 -289329 111637 109968 114 -63811 42494 109968 116 -191796 104221 111638 114 -68305 69611 111638 116 -316760 42778 75668 30 -171841 95197 75668 66 -224846 77192 67195 26 -304982 92991 87906 130 -209500 96576 41405 45 -57242 115370 67204 27 -178400 23749 63655 10 -309490 1538 76313 18 -128125 84566 76313 33 -168711 60305 13228 15 -329454 13210 71923 7 -311313 11939 71923 8 -232574 1871 56715 43 -98360 73564 56715 20 -174117 1272 16960 11 -22367 13209 26234 11 -289776 114958 68087 6 -100452 108615 68087 7 -243647 73714 105373 9 -97508 68004 105373 9 -285035 89111 113785 11 -163956 31929 23617 8 -326228 100037 50039 37 -200487 37903 99774 50 -150882 41096 99774 27 -113470 81761 41096 49 -48143 61512 41096 27 -263776 77428 99768 105 -23265 22709 1420 18 -296642 36886 68645 139 -309731 2943 77447 242 -219596 36875 69904 69 -271517 2323 3105 83 -175450 8534 86707 27 -252450 4291 84285 29 -277593 36152 78571 133 -318576 57283 78764 48 -254553 15298 13877 19 -106378 32365 13877 20 -234751 13877 5541 18 -157249 98281 5541 16 -232312 309 29872 10 -143749 107144 29872 10 -360514 112639 112722 8 -234578 13069 112722 10 -347959 277 20114 11 -286927 97298 20114 118 -283008 78875 1863 150 -306879 101633 74170 6 -112990 73750 74170 8 -347500 103875 85824 5 -176053 11674 85824 5 -164241 34494 38427 95 -316174 38427 34494 95 -78033 39156 74062 95 -205056 74062 39156 95 -205052 74049 54204 55 -290574 2535 6661 12 -213191 2347 18281 21 -343944 37618 5454 8 -212795 117484 5454 55 -304024 88565 55500 9 -230399 104364 73340 10 -328593 116030 69914 27 -263953 78559 33113 5 -170889 75041 33113 4 -246361 88456 111644 10 -69840 89442 111644 11 -192850 111644 89442 11 -71906 114020 89442 53 -233460 7146 26667 22 -272863 10486 87619 50 -172979 109924 87619 46 -260811 55713 95430 9 -94665 50575 95430 16 -291027 5349 42254 10 -145204 5253 42254 24 -265443 86277 82434 139 -303224 84921 107520 38 -84308 85211 107520 85 -335217 1644 58060 135 -311555 13072 58060 7 -20961 105232 113253 19 -156150 74999 105802 6 -35359 105801 105802 6 -69116 75000 105801 7 -35360 105802 105801 6 -158207 109449 109452 4 -205241 75377 101569 7 -142501 86781 101569 6 -158210 109462 109461 5 -20972 105590 109461 6 -85846 109417 105590 7 -21051 109461 105590 6 -303670 86890 36644 10 -358822 88467 111641 18 -309994 4564 12263 4 -157908 106583 12263 5 -289060 109413 106187 3 -85845 109414 106187 4 -211333 106187 109414 4 -115153 109412 109414 5 -250540 109414 109412 5 -172930 109415 109412 5 -114032 93390 60970 8 -96390 60511 87321 10 -227787 92347 68179 17 -120279 29355 99637 12 -92547 39066 54931 8 -85724 107944 105602 6 -66201 55634 55222 7 -376625 67598 87036 37 -193985 1627 69033 67 -243031 69033 68715 22 -204359 68715 4066 116 -303155 84400 76307 122 -247408 92867 3455 41 -230062 102457 89723 47 -108086 44286 89723 89 -246654 89723 17469 116 -114511 102985 17469 85 -226035 83234 4703 32 -113610 84577 4703 34 -265155 84767 76223 77 -309507 1631 6223 64 -144882 117146 20303 4 -40 2721 20303 8 -83740 73790 38999 57 -15719 19709 38999 100 -350720 47955 73790 82 -200640 38999 73790 57 -69762 87911 106212 37 -192070 106212 87911 37 -66709 59039 87911 76 -204066 66635 1865 37 -219583 36822 66635 35 -81855 60911 75340 59 -354546 4550 15495 10 -211667 108855 15495 10 -290340 1213 55320 63 -154067 60377 58698 10 -31426 32765 18176 11 -174236 1811 39401 21 -38175 27290 45658 195 -205823 79118 78573 163 -198175 24360 64413 29 -65724 52979 64413 30 -184277 64413 52979 30 -65834 53564 52979 11 -182819 52979 53564 11 -127518 73798 53564 13 -260556 53564 73798 13 -154750 64950 73798 23 -214573 10576 79097 42 -321583 79097 78574 49 -324307 92180 1872 15 -252440 4210 79316 73 -321614 79316 56273 48 -318820 59159 92179 32 -89389 20336 92179 42 -251561 116596 7461 74 -197899 22888 44047 19 -142230 80416 44047 42 -244187 77188 77822 100 -301933 77822 86706 85 -285029 89074 112197 19 -270348 112197 93036 46 -289109 109846 77188 48 -200205 36168 79098 107 -300722 68905 36168 93 -244210 77375 88216 53 -252253 3193 682 47 -209648 97441 77 17 -282769 77245 3401 73 -309814 3401 37022 130 -244639 79939 34546 27 -283105 79548 88827 89 -300869 69954 1150 13 -317302 47781 7459 33 -145615 8657 7459 37 -291414 7459 8657 37 -128735 97153 8657 14 -257804 33413 31683 23 -161591 19149 31683 49 -315030 31683 30004 73 -244088 76697 7102 54 -258501 37204 77189 9 -253599 10753 1247 39 -174111 1247 3326 56 -299805 61951 69609 49 -262281 66817 2112 24 -213156 2112 67745 25 -300571 67745 77191 25 -301822 77191 433 38 -193823 433 78288 32 -204181 67340 3575 238 -358313 80513 98522 20 -369249 38720 80843 10 -352345 86522 86113 31 -364814 85999 114949 14 -342747 19472 107865 9 -308266 110815 70843 9 -148323 24861 39952 14 -40323 51576 24281 13 -195941 13064 39684 8 -312444 17262 62987 12 -240890 52084 48321 25 -140830 66908 48321 66 -303605 86658 114368 98 -185113 70328 58210 6 -66541 57868 58210 8 -219166 34466 34967 11 -99467 95290 107227 49 -261467 60892 79029 10 -96559 61526 79029 10 -335825 13761 92300 9 -260932 56667 92300 9 -221913 55100 94939 8 -105656 28658 94939 8 -318476 56547 102307 9 -166961 50696 102307 9 -342101 12021 88230 16 -301311 73511 87922 7 -334954 112122 106170 9 -273282 12559 56196 6 -92215 36628 97489 18 -335873 14519 87633 13 -185564 73677 88231 9 -334911 110841 86117 13 -277521 35675 86117 13 -341791 7058 106400 10 -192099 106404 106399 7 -348052 2779 108005 45 -352494 88652 115557 17 -364370 76883 14492 8 -263917 78339 14492 6 -278485 42902 115558 5 -50513 8887 111652 4 -345438 78713 8860 4 -56936 111652 8860 4 -350075 33513 114374 21 -29581 14492 114374 8 -376966 77398 87634 31 -49340 98807 87634 13 -214352 9069 35615 5 -316505 40724 8861 5 -342045 11372 16167 10 -50510 8861 16167 8 -292902 15248 25344 7 -363492 49705 107222 5 -42328 86741 107222 7 -341454 114874 88833 10 -288822 107750 86118 7 -372663 104742 107747 11 -232009 116003 107747 11 -342270 13943 34017 10 -299495 59138 34017 10 -327240 106275 33138 8 -356570 33934 107275 36 -354589 5601 107151 10 -298808 53638 11347 7 -348077 3568 108650 9 -182695 52019 108650 10 -369635 48941 107384 11 -224361 73729 107383 7 -345875 85970 88834 20 -338871 72631 49754 9 -183043 55078 49754 8 -289215 110708 110705 7 -335160 117045 88530 12 -222618 60366 88530 12 -364939 87557 38302 25 -4251 49754 38302 9 -85775 108575 108571 5 -350507 42401 33654 12 -349395 23062 102387 11 -257034 27892 102387 11 -225192 79325 3631 88 -340629 98335 65728 10 -217243 23485 111653 7 -345105 68523 51652 14 -21144 111653 51652 9 -211542 107829 33913 9 -363799 58442 29179 54 -341390 113184 89454 14 -288647 106460 94413 7 -339652 88801 85344 25 -259113 41664 94214 5 -331846 56431 101283 12 -319535 64393 101283 12 -78133 39778 93708 24 -363014 36936 91953 7 -331408 45462 5680 20 -185020 69698 48842 4 -362340 26065 99968 8 -376371 60566 8862 75 -237676 28525 24044 2 -342208 13141 111657 2 -196818 17477 21315 3 -354466 1961 93671 7 -318198 54194 93671 7 -319662 65436 4097 49 -204294 68139 1826 118 -355380 16839 79852 11 -344415 49195 102913 10 -269388 105015 86425 7 -242152 62526 101254 12 -119062 22715 101254 11 -373566 11603 92253 12 -184099 62972 92253 11 -379519 116406 95163 13 -261394 60369 95163 12 -236777 24141 94958 8 -119482 25130 94958 10 -338204 55255 111654 9 -350783 49045 89721 15 -282077 72011 89721 15 -28113 104489 72372 11 -245382 83297 84010 46 -310679 8353 73303 46 -193594 116662 73304 30 -222567 59872 263 10 -191829 104486 70917 46 -103169 15133 13589 35 -48564 66956 13589 34 -316037 37519 114367 9 -367237 9073 15047 11 -303848 87693 15047 9 -85060 100200 42119 106 -45975 36347 42119 101 -203444 61713 52827 8 -156865 90690 52827 41 -305276 94212 12603 9 -147863 22399 12603 9 -315174 32682 17950 10 -59611 18123 17950 11 -302749 81860 11740 9 -167558 53996 11740 9 -306567 100131 26235 10 -72426 2706 26235 11 -287611 100425 29925 11 -169168 63186 29925 11 -105833 29624 46461 86 -12505 61616 46461 48 -296355 35234 18415 10 -87328 7963 18415 12 -337674 40807 8114 170 -44503 20243 8114 78 -335541 9458 58757 8 -229200 98240 58757 9 -362811 33583 60625 89 -46988 47636 60625 51 -263640 76700 7481 87 -274949 20491 59036 9 -141878 74080 39832 128 -52947 35015 39832 122 -156312 76811 40206 86 -39105 38862 40206 25 -152541 50589 70313 94 -33562 56873 70313 58 -257750 33114 13553 12 -153116 54202 13553 11 -160558 13114 13587 164 -18078 45102 13587 69 -238511 34504 13319 58 -158700 113415 13319 58 -128090 83916 52191 16 -18635 50635 52191 11 -348559 12706 49322 11 -219687 37549 49322 9 -358668 86323 13796 16 -303452 85886 13796 11 -183484 58193 1663 65 -301909 77677 69608 671 -238900 37208 79998 312 -223306 65568 78981 405 -301977 78082 2113 132 -309571 1951 68135 282 -229508 99533 75220 61 -309312 176 91666 16 -174370 2519 70339 3 -257081 28092 32186 40 -367015 3443 40729 2 -312376 16869 40729 3 -161973 21430 16989 6 -41934 71333 16989 8 -302272 79861 1699 11 -340486 96910 88838 44 -261482 60976 88838 35 -156944 91915 57758 31 -55853 67654 57758 24 -200297 36763 487 15 -364184 70438 93906 68 -261746 62841 93906 90 -175518 8887 9255 4 -26108 54122 10689 9 -270882 116133 75844 7 -20019 66243 13455 9 -19448 59451 4899 69 -326471 101193 13567 10 -196572 16309 9824 17 -175030 6238 99650 47 -291467 7804 95362 36 -329021 6286 47641 12 -321951 81011 47641 10 -321365 77829 959 64 -224409 74058 52882 20 -139898 60607 52882 48 -214537 10245 74083 46 -322930 85891 117651 13 -183111 55466 74038 25 -171847 95407 74038 46 -193826 438 96609 66 -226051 83298 83502 21 -69525 82932 83502 24 -271203 439 69035 18 -174733 4568 76310 40 -211080 104366 69036 19 -180111 33764 12871 8 -251937 1255 4163 17 -249151 100546 63976 7 -95628 56055 63976 4 -53466 41190 70884 9 -290695 3187 97887 66 -77942 38579 71710 16 -32896 49694 71710 15 -239097 38218 73850 26 -223816 69616 47728 70 -252338 3730 85141 81 -286938 97351 5752 9 -308021 108909 64671 10 -80541 53190 64671 38 -201166 43519 43138 19 -150302 37841 43138 29 -258579 37841 38249 30 -78746 43175 38249 46 -298727 52906 53640 12 -68999 74043 53640 33 -303453 85887 117107 47 -303846 87687 5119 15 -315785 36173 92690 203 -224993 78083 96503 36 -320063 68402 93086 21 -290733 3384 960 21 -279763 53585 53371 16 -62975 37930 53371 21 -268389 99674 22382 29 -108139 44576 22382 33 -338831 71710 57953 16 -206218 81032 57953 17 -346742 95527 9302 48 -221596 52512 9302 39 -251770 213 78982 42 -261301 59395 1806 7 -334935 111522 113795 12 -188281 88289 113795 12 -228228 94234 59946 18 -107870 43124 59946 19 -239407 40372 27946 13 -164461 36300 27946 15 -301379 74069 92613 14 -154154 61036 92613 25 -182893 53611 37454 18 -165642 43351 37454 15 -331761 54316 96881 74 -263243 74019 96881 33 -221736 53610 34054 16 -150678 40060 34054 25 -281520 67899 65022 34 -152862 52566 65022 31 -49779 112854 9825 13 -222692 60834 74255 26 -305618 95923 1372 29 -177229 17555 1402 4 -211930 111083 84147 46 -322155 81900 14168 8 -245316 82918 39273 42 -283720 82636 20456 11 -73756 14070 20456 23 -318200 54232 28901 144 -124218 52633 28901 132 -256875 27063 48913 7 -151313 43446 40294 54 -41737 69248 40294 20 -349139 19612 7720 8 -53457 41146 7720 6 -39228 40113 348 12 -349819 28241 11401 11 -45860 34939 11401 9 -340131 93490 11948 28 -240836 51669 11948 12 -242398 64324 73804 64 -170798 74094 73804 20 -322765 85165 112203 9 -271042 117133 117108 5 -192208 107193 112735 33 -211784 110006 83753 32 -323320 87683 5120 56 -262066 65039 68828 15 -222988 62993 73516 20 -85797 108954 73516 11 -357237 50371 32382 12 -205893 79521 32382 11 -332400 71365 28879 12 -189299 92617 28879 12 -370451 71464 55418 19 -188560 89564 55418 11 -356408 32315 14754 8 -216710 20372 14754 9 -332343 70137 74962 56 -23937 28957 74962 56 -344880 61056 10216 8 -208433 92060 10216 9 -341658 4219 34288 40 -266259 89840 34288 10 -342036 11277 28334 7 -265415 86185 28334 9 -330169 22337 27189 214 -17551 39633 27189 170 -206360 81587 14795 10 -119066 22773 14795 8 -369944 56816 90514 50 -42391 97012 90514 7 -341673 5131 99010 35 -219947 39282 99010 7 -324155 91481 41119 10 -63186 39087 41119 11 -369068 35088 16279 8 -248894 99494 16279 9 -229452 99314 6677 8 -108361 45602 6677 10 -284173 85170 77409 9 -129898 111507 77409 34 -221717 53479 97570 68 -72738 7155 97570 67 -203893 65379 64415 41 -97205 65701 64415 15 -246028 86798 104992 8 -144017 109964 104992 48 -280571 59884 103780 33 -70941 106101 103780 21 -366838 114922 115563 10 -270966 116669 115563 11 -57437 117772 4623 15 -302081 78768 77192 27 -323697 89646 4592 10 -108606 46818 4592 10 -48675 69054 10801 8 -299501 59209 74360 8 -133493 22135 74360 9 -91539 31618 75215 9 -6406 80245 75215 9 -61895 30210 80245 78 -6282 75215 80245 9 -241254 55236 82863 9 -161643 19438 82863 50 -117483 13541 80530 47 -168758 60541 100709 90 -119128 23180 10982 8 -221701 53343 79395 8 -121415 36856 79395 8 -329660 15826 98010 8 -214551 10330 98010 9 -317024 45374 98861 8 -145700 9250 98861 54 -89566 21167 81005 9 -2793 34069 81005 9 -124805 56259 81267 8 -363498 49785 102766 90 -86832 2034 98047 9 -89614 21450 98330 48 -367507 13175 81225 8 -328896 2505 91027 10 -56491 79861 91027 10 -342714 19112 80609 9 -262205 66243 80609 9 -367443 12183 98633 10 -181714 44941 98633 10 -344090 40656 92668 34 -31487 34272 92668 12 -340617 98228 90490 23 -260739 54957 90490 12 -358787 88062 114375 30 -14152 114955 114375 12 -373185 4312 107181 42 -308417 111677 107181 13 -56937 111659 108014 11 -370973 85109 111659 22 -309647 2418 111659 11 -341391 113186 114955 12 -212750 117138 114955 11 -372132 97827 87335 49 -366270 101124 111075 12 -180400 35425 23695 7 -155759 71858 23695 8 -255414 19232 76937 7 -360884 6362 27859 10 -35062 76937 27859 5 -320141 68930 115566 8 -376506 63654 24515 9 -57245 115566 24515 6 -328737 117136 117656 7 -332632 80015 91239 52 -117960 16726 33833 12 -107398 40221 89700 36 -361311 13324 92153 12 -371506 91774 100098 18 -346621 94487 75278 15 -124328 53417 59994 9 -155533 70546 98245 27 -359887 99538 98986 34 -45894 35339 78736 7 -351686 72296 35339 14 -298711 52771 35339 10 -353405 97845 95019 28 -49210 80461 95019 8 -249387 101617 114958 6 -140988 68087 114958 6 -114767 105373 73714 9 -35155 89461 73714 8 -371066 86344 89461 8 -34919 73714 89461 8 -354640 6575 86727 30 -242887 68004 86727 8 -343767 34492 89995 23 -212752 117142 89995 10 -4220 49463 116592 6 -367996 19077 3532 15 -375816 46818 5134 12 -20137 68374 5134 10 -372168 98169 100457 12 -371069 86383 48738 9 -131610 10986 86126 8 -350876 50969 34106 21 -333166 87849 85348 15 -338297 57212 88239 12 -133923 24663 5421 7 -218280 28772 93925 14 -72484 4381 93925 36 -347353 101449 108613 26 -95173 53545 68359 101 -373517 10872 28267 48 -330890 33317 19187 49 -128654 95812 46186 128 -8695 20317 46186 58 -332134 64339 27928 11 -304966 92940 27928 10 -247340 92597 16234 10 -73651 13383 16234 63 -344985 63774 59693 11 -225622 81248 59693 9 -181427 42513 37903 48 -85037 99774 37903 50 -264357 80638 60193 10 -117659 14919 60193 10 -168464 59041 29909 123 -10549 41002 29909 51 -369258 38895 27111 85 -17656 40681 27111 87 -304742 91935 32398 12 -131079 7106 32398 14 -129040 102921 41672 60 -27871 76449 41672 34 -99376 93745 54162 80 -25839 51024 54162 54 -372134 97853 22513 35 -248029 95608 22513 10 -251951 1341 97496 39 -363305 45215 19996 12 -54990 56781 19996 11 -358634 85803 85148 12 -289856 115626 48739 14 -158263 109946 48739 12 -333216 88466 87640 15 -371048 86059 86728 11 -331668 51429 82665 8 -360169 102712 24542 22 -365215 90807 97549 15 -358848 88814 78737 13 -333174 87893 47858 14 -212684 116670 47858 9 -193732 117772 105000 9 -77621 35660 105000 17 -155 6498 74979 6 -354631 6478 75039 15 -365033 89103 6498 16 -175596 9269 6498 11 -57345 116669 113799 9 -270828 115658 38623 10 -126339 65683 38623 10 -130734 1427 96144 8 -13436 75253 96144 7 -343281 27006 75253 50 -13637 96144 75253 7 -363571 51620 14765 8 -97605 68703 94940 6 -67488 63676 36463 6 -2423 29796 36463 5 -77290 32611 90326 9 -356661 35243 95189 10 -349401 23113 99823 8 -329945 19218 30021 6 -218724 32347 30021 6 -373843 14928 34323 5 -242351 63921 34323 5 -321169 76484 99805 6 -160882 15343 99805 6 -316611 41609 93978 6 -133384 21598 93978 6 -350238 36502 91554 87 -88845 17496 95619 6 -301161 72362 90011 6 -137991 49399 90011 6 -154731 64839 23255 6 -96527 61362 93005 8 -201192 43795 93512 8 -73783 14265 93512 8 -368368 24423 97062 10 -220733 46221 97062 9 -335259 2966 96137 11 -179551 30053 96137 12 -298062 47923 98728 9 -132624 17044 98728 8 -220913 47649 97451 8 -105052 25341 97451 9 -244556 79502 74966 106 -183811 60833 98536 48 -117529 13877 98536 36 -317100 45966 65105 63 -65858 53755 65105 102 -364821 86070 78738 13 -345872 85931 103238 10 -358808 88316 108657 15 -81328 57891 57745 8 -358730 87270 52619 47 -192160 106900 52619 4 -345925 86969 85149 24 -374794 26358 81697 79 -145738 9519 98196 84 -148153 23968 92652 9 -373766 13986 23198 8 -314806 29750 23198 7 -337432 35514 94430 12 -86877 2874 10103 15 -51828 23198 10103 7 -348411 10502 81360 48 -259709 47078 81360 7 -368727 29114 106059 6 -224168 72351 88540 10 -133924 24692 88540 7 -111639 64749 94237 38 -161645 19439 80524 12 -366132 99867 80303 27 -156076 74170 101633 6 -69659 85824 11674 5 -338390 59379 58771 29 -270961 116660 58771 12 -164539 36689 41430 13 -13602 88844 41430 12 -10590 41430 88844 12 -184731 67535 89146 12 -58960 14451 89146 48 -181128 40137 85844 12 -130250 114249 85583 11 -345401 76647 106680 43 -261249 59005 61274 11 -68849 72924 61274 16 -346055 88670 89464 12 -301540 75322 89464 12 -334082 96739 98504 16 -353267 96589 94982 46 -126935 70219 17889 25 -73775 14224 80230 10 -65373 50822 96492 65 -339286 81819 81000 39 -349782 27742 93819 12 -13639 96816 93819 11 -353701 100413 96816 85 -13627 93819 96816 11 -241003 53077 38162 11 -127570 74202 38162 16 -128645 95634 57093 10 -344919 62265 39158 50 -117582 14331 81125 11 -6505 92485 81125 11 -342638 18201 92485 111 -6413 81125 92485 11 -258916 40192 95815 11 -142038 75778 95815 11 -340248 94620 89978 14 -6497 90792 89978 11 -367571 14015 101560 9 -6403 79510 101560 11 -352683 90792 79510 13 -6546 101560 79510 11 -351181 59086 90792 10 -6494 89978 90792 11 -376645 68141 55962 80 -233729 8607 55962 11 -139755 59851 110442 5 -350314 38179 110684 15 -56549 86730 110684 16 -284600 86778 75326 6 -356667 35385 86730 80 -56872 110684 86730 16 -109274 51029 98142 25 -230574 105845 86132 58 -101375 116419 86132 14 -358691 86636 89147 9 -377580 88365 85846 7 -364726 84545 35352 6 -332925 83650 54664 47 -346002 87871 109994 45 -377500 87207 85151 52 -191823 104398 85151 9 -265754 87679 104355 3 -358832 88661 89148 13 -352295 85813 85584 20 -280574 59887 86731 5 -338643 66525 65272 8 -308897 114985 65272 7 -341563 1334 78304 14 -241715 58884 87929 7 -364868 86563 107416 10 -367106 6548 88245 25 -203270 60483 86133 5 -3003 37519 50552 7 -300595 67935 104356 7 -329237 10424 18540 17 -48442 65272 18540 8 -8569 19089 47859 6 -334501 100783 19089 18 -195766 12084 19089 8 -351294 62244 75076 8 -49417 104356 75076 8 -377759 90475 19684 16 -285767 92278 40113 31 -339929 91513 90144 14 -294275 22672 46987 9 -136218 39267 46987 47 -377452 86683 85351 21 -250861 111741 85351 10 -107133 38673 50699 6 -357271 51430 39205 6 -211787 110025 39205 5 -357544 58462 99916 11 -259293 43301 99916 11 -120857 32626 38635 11 -377320 84661 54572 8 -113224 75784 89801 20 -49213 81500 89801 6 -256230 23898 7861 6 -145309 6035 7861 5 -332933 84160 39251 17 -332553 76357 41264 10 -195228 9183 81878 8 -140151 62309 81878 40 -333964 95675 108547 10 -145321 6242 78427 6 -377568 88164 109995 8 -225905 82537 109995 6 -358836 88684 101632 8 -258234 35677 101632 8 -345971 87558 48741 8 -205616 77862 48741 7 -371222 88447 2810 19 -21063 109995 2810 8 -308319 111098 21786 9 -344570 53149 25793 6 -221377 50671 33392 8 -59105 15303 33392 36 -91016 28881 57651 5 -374968 28881 24400 7 -54282 49830 24400 6 -364122 69045 93156 51 -341875 8471 37043 47 -331382 44622 81185 6 -347972 950 73301 7 -69329 77075 98596 43 -351918 79966 60297 25 -137283 45004 80838 20 -140145 62265 54810 48 -40556 54355 54810 8 -258696 38702 101686 9 -260721 54837 81852 9 -58848 13688 81852 45 -40599 54810 54355 8 -329840 18031 92604 10 -49216 82234 92604 10 -329652 15757 82172 10 -220393 43085 82172 9 -136957 43444 38831 12 -332483 73837 62062 9 -376785 71470 35894 9 -366140 99932 98572 15 -223341 65984 96328 12 -69234 76137 96328 21 -220547 44523 91388 11 -58177 9795 91388 17 -162885 26500 86135 12 -376747 70468 93317 10 -331339 42895 97619 9 -355959 24472 81351 9 -135004 30508 96375 11 -156238 76067 95870 35 -165199 40875 100841 15 -367027 4589 92572 10 -364389 77303 87343 34 -339397 85072 88246 13 -27963 85847 88246 8 -234189 11156 87053 11 -100933 113153 87053 23 -27994 88246 85847 8 -332581 78010 85152 9 -250860 111685 85152 9 -85381 104491 86136 13 -27940 82977 86136 13 -340765 99732 91447 40 -295562 30286 91447 10 -364588 81645 96092 26 -331153 38225 79962 40 -374505 22906 98734 10 -221786 54122 82218 9 -59679 18475 82218 9 -352679 90708 90663 38 -373102 1584 85585 10 -35171 92019 85585 10 -333658 92857 92019 13 -35121 85585 92019 10 -358588 85189 88541 65 -238582 35159 88541 11 -289535 113293 109459 9 -128639 95430 55713 9 -43285 5349 55713 5 -320790 73738 95931 18 -145335 6359 95931 18 -151099 42254 5349 10 -47661 55713 5349 5 -273338 12830 67993 13 -97339 66459 67993 13 -348602 13273 100580 8 -260927 56602 100580 4 -373691 13134 36068 47 -343189 25930 34216 86 -300856 69898 34216 4 -361307 13244 98890 8 -13640 96887 80425 9 -349948 31421 96887 47 -13536 80425 96887 9 -335213 1545 97445 7 -299839 62219 97445 7 -341555 378 4563 25 -341654 3897 36294 7 -72198 116481 85153 10 -243609 73344 54790 10 -167349 52791 54790 10 -333242 88933 87345 11 -221812 54257 87345 11 -376696 69522 22913 6 -60515 22845 54167 42 -335340 6327 96489 41 -378990 102251 80984 17 -344905 62056 55152 11 -148287 24668 98873 36 -341382 113030 2736 10 -359820 98958 81414 24 -366948 1469 116595 8 -98971 84930 108632 27 -245626 84930 84921 52 -158019 107520 84921 38 -370375 69417 98960 6 -69214 75985 7966 23 -351213 60075 8589 112 -373117 2143 27461 10 -246642 89691 27461 9 -351085 56672 102787 6 -164437 36060 98621 42 -376678 69012 104361 6 -196939 17987 39542 4 -305462 95222 86137 5 -86849 2198 102898 7 -56596 93817 102898 7 -78541 42026 93817 60 -56635 102898 93817 7 -123653 49753 34427 21 -348647 13893 32947 114 -314907 30697 32947 7 -345328 74216 101656 9 -327754 110017 101656 9 -328938 3787 39838 10 -333557 91755 24152 11 -331445 46262 101640 10 -122186 41291 92543 8 -342004 10731 53476 6 -356254 28406 100198 9 -260797 55547 100198 9 -358662 86204 78938 19 -364854 86345 2817 25 -260059 49640 2817 11 -364292 73260 40189 19 -177071 16786 40189 13 -343949 37704 111230 13 -226622 86780 66267 13 -69553 83400 66267 16 -21015 108069 8867 6 -345825 85285 108069 16 -230754 107053 108069 11 -372332 99970 80046 32 -300079 64207 80046 14 -357766 64260 49463 14 -182570 51109 49463 9 -364933 87495 89465 35 -205242 75381 89465 14 -100177 105827 105815 6 -35207 101605 105815 6 -326566 101604 105814 8 -172584 105828 105814 6 -172940 109504 104362 6 -250554 109504 108864 7 -172864 108865 108864 6 -85788 108791 108792 5 -288985 108791 108842 7 -128327 89512 108842 7 -115089 108863 108866 12 -70996 106580 106577 12 -100552 109695 107809 5 -172173 101586 75376 5 -85138 101569 75377 7 -70452 101654 114382 5 -172865 108868 108867 9 -114558 103428 103430 12 -170928 75424 101578 5 -99809 101603 101606 11 -172292 103119 109437 5 -157410 101582 101577 4 -70448 101581 101580 5 -129610 108671 108672 6 -42619 108778 108672 6 -158127 108779 108778 7 -42614 108672 108778 6 -307993 108779 75177 7 -129684 109503 75177 7 -192537 109503 106901 6 -157949 106899 106901 6 -211541 107825 106579 7 -157907 106578 106579 7 -192119 106578 106992 6 -172683 106990 106992 7 -250222 106990 107845 7 -158052 107846 107845 7 -269775 107846 107824 7 -100373 107825 107824 7 -114413 101575 101576 5 -298095 48130 109991 87 -99161 89283 109991 479 -339454 85948 78305 54 -351869 79033 107984 8 -338941 75024 73584 60 -164703 38012 106966 16 -143671 106402 106403 10 -358674 86386 89466 36 -192853 111681 4564 4 -160434 12263 4564 4 -143646 106187 109413 3 -129157 104101 38860 17 -71552 111323 87930 31 -377510 87417 69933 65 -172714 107317 107318 5 -375830 47288 57710 7 -378230 94763 26391 23 -42280 82101 26391 8 -353279 96691 95369 11 -181095 39829 95369 10 -4738 55466 39140 8 -345469 79784 56605 33 -278017 38920 56605 8 -183076 55260 54295 8 -101725 5000 54295 9 -222002 55855 54601 7 -171352 84653 38645 83 -350540 43314 54564 32 -277999 38849 54564 8 -344975 63478 61382 37 -202522 55080 61382 8 -344571 53198 104722 49 -258713 38829 104722 8 -200641 39004 104122 8 -116410 6283 104122 24 -263249 74106 41191 9 -63964 43528 41191 20 -241178 54541 39067 9 -171371 84863 39067 128 -376456 62587 100961 45 -139678 59404 102801 47 -103883 19016 80596 91 -13624 93606 80596 9 -353472 98466 34069 70 -6411 81005 34069 9 -335579 10140 93494 8 -329474 13444 33044 46 -377385 85784 11434 16 -339462 86040 86733 12 -351880 79187 55911 6 -335162 117065 49819 3 -270092 110051 49819 6 -343063 24479 15458 44 -351886 79341 49638 6 -371171 87711 78306 16 -143906 108747 108746 6 -348148 6060 34080 8 -338280 56788 81255 9 -364843 86249 87932 7 -367345 10870 80553 7 -357686 62309 33239 39 -262591 68975 29742 4 -80783 54702 29742 41 -369646 49163 107018 8 -350381 39472 19457 7 -358051 72366 98257 7 -268295 99370 72269 3 -165710 43733 72269 6 -206090 80460 20407 3 -148146 23961 20407 17 -80620 53713 85851 19 -249235 100889 26440 3 -98108 72159 26440 39 -376973 78040 54262 10 -224496 74765 54262 5 -140439 64106 16765 9 -360694 226 99682 12 -72376 1168 101206 16 -272379 7323 61630 7 -77560 35241 83398 14 -69181 75490 100910 14 -179970 33123 46632 5 -170645 72818 46632 24 -371896 95439 96406 17 -76400 28237 82504 9 -340476 96812 98847 20 -23611 25882 19714 9 -235532 17522 25882 10 -134427 27267 25882 18 -350144 34320 94392 28 -201282 45027 69455 8 -112289 69947 100799 8 -357420 55701 34589 9 -344516 51461 41712 3 -145328 6282 27105 73 -223577 67759 1664 58 -309903 3890 102723 23 -232375 726 77827 743 -265123 84577 102457 8 -99187 89723 102457 47 -226219 84500 95805 22 -226228 84579 76694 24 -228860 96756 76101 64 -377296 82763 98682 26 -134869 29675 80384 18 -345190 70584 99171 36 -278205 40686 99171 8 -362053 22570 95620 104 -203040 58664 95620 9 -272973 11083 93804 10 -107502 40673 93804 75 -162177 22619 82806 35 -263615 76478 33391 10 -164060 32651 33391 140 -336215 18581 93171 102 -261682 62342 93171 8 -277087 33237 20261 3 -59781 19041 20261 30 -61927 30366 90296 35 -351323 62812 99318 103 -344713 56901 81911 105 -278200 40564 81911 9 -361817 19312 93184 36 -319411 63587 93184 10 -125698 61622 99152 31 -356625 34582 80040 65 -357654 61622 95690 29 -280598 60162 89695 7 -87413 8638 89695 33 -89050 18581 81691 103 -372204 98528 98697 65 -367546 13648 97858 34 -320070 68429 97858 8 -365559 94300 98820 27 -105098 25541 94057 104 -333399 90467 93420 21 -316454 40073 93420 8 -203672 63563 98587 10 -110817 60019 98587 34 -336549 22619 93264 34 -240376 48480 93264 9 -361901 20196 102373 34 -237995 31550 102373 8 -201125 43105 74266 8 -120663 31556 74266 52 -378691 98891 93145 13 -182389 49846 92176 8 -58839 13648 92176 35 -317433 48713 91335 11 -142017 75470 91335 62 -343617 32865 104283 132 -351519 68478 35239 105 -320549 71783 35239 9 -340125 93434 95459 42 -259109 41601 95459 10 -83240 70584 96401 36 -181462 42841 80780 8 -161234 17289 80780 104 -301132 72004 82163 8 -89166 19170 82163 34 -347037 98234 108908 16 -336780 25541 34698 106 -259355 43924 34698 8 -351212 60073 37803 105 -197994 23398 37803 9 -320442 70982 101199 9 -75304 22410 101199 53 -240950 52679 104081 9 -145275 5748 104081 34 -217129 22917 92643 9 -168117 56901 92643 105 -65662 52596 75033 134 -355575 19041 86738 32 -362735 32787 94910 34 -310854 9219 94910 9 -217071 22539 7292 5 -154316 62135 7292 20 -348941 17289 98767 105 -297129 40088 98767 10 -336331 19805 100068 35 -319164 61831 100068 10 -351663 71849 92496 85 -256093 23280 92496 9 -344548 52219 101083 35 -280657 60785 101083 9 -155753 71849 86441 82 -201917 50031 96039 9 -162167 22570 96039 105 -126669 68478 99391 106 -335479 8638 29842 33 -352605 89944 98739 38 -342257 13731 100299 22 -320498 71337 100299 9 -296424 35680 17887 9 -151341 43651 17887 104 -376352 60019 102856 34 -182234 48825 102856 8 -358536 82815 80334 79 -224365 73739 80334 8 -334219 98195 33981 138 -124644 55317 79085 46 -356986 43651 98477 104 -281761 69553 98477 9 -331719 52709 102371 4 -330267 23672 91310 34 -279615 52466 91310 8 -64105 44169 93336 48 -314979 31286 90616 9 -133145 20196 90616 34 -363125 39543 97733 70 -149528 31406 97808 58 -222704 60934 89680 9 -135453 32787 89680 34 -367074 5748 101015 34 -297986 47260 101015 8 -223856 69871 96146 9 -80374 52219 96146 34 -132989 19312 83001 35 -133766 23672 94564 34 -361799 19170 95123 34 -313277 21246 95123 7 -280890 62824 102897 8 -161709 19805 102897 34 -124762 55991 100599 69 -125911 62812 99904 103 -344294 46937 97121 107 -199401 31669 97121 8 -261542 61374 75349 9 -91757 32865 75349 132 -320645 72505 99849 9 -154015 60073 99849 105 -357195 49328 107390 24 -237840 30039 98097 8 -64699 46937 98097 107 -75053 21129 100715 60 -350638 45955 86741 4 -42580 107222 86741 7 -121167 35177 99680 23 -365429 92928 89818 31 -333684 93169 80763 61 -83930 75902 34179 47 -123855 50636 98433 144 -370763 80992 102129 53 -347160 99409 97850 14 -297240 40900 100745 14 -93986 46667 100745 69 -92584 39284 107343 19 -131373 9315 96150 5 -340334 95392 97352 19 -342693 18870 93575 4 -167045 51114 92685 8 -154185 61246 100804 12 -369986 57989 92978 6 -137496 46238 97611 19 -108283 45215 80100 9 -147968 22933 93211 131 -339716 89624 95520 10 -123811 50373 102468 10 -350637 45907 90914 10 -181995 47070 74351 11 -103447 16592 74351 66 -340309 95197 81739 57 -167981 56053 102254 107 -375710 43630 82369 82 -367315 10399 99900 68 -240936 52600 99900 10 -102649 12094 50015 92 -350820 49924 108810 73 -365597 94694 82668 70 -201502 47047 91743 9 -102435 10399 91743 67 -353507 98772 17986 60 -94087 47143 100208 42 -331479 47143 33015 41 -317609 49749 33015 7 -152428 49924 90303 76 -223124 64088 80165 12 -86881 2896 80165 73 -366336 101975 90023 52 -221440 51280 102445 11 -75740 24559 102445 107 -373978 16592 81884 66 -336406 20783 81451 67 -118654 20783 32885 66 -368376 24559 80310 107 -355790 22212 100818 67 -262130 65574 100818 11 -62682 35505 100646 86 -356220 27966 33030 5 -260092 50010 82647 12 -75261 22212 82647 66 -344666 56053 93855 109 -222428 58815 90913 10 -154905 65856 90913 67 -356677 35505 95912 87 -279247 49485 95912 9 -69254 76352 87354 30 -79724 48241 97373 59 -260654 54299 99658 10 -166781 49718 99658 24 -280704 61222 98395 9 -74783 19820 98395 66 -375040 30363 99806 5 -90997 28787 74319 24 -374267 19820 98578 67 -217016 22234 98578 9 -108115 44445 21112 37 -355375 16768 101104 31 -201075 42698 101104 10 -372253 98948 95128 50 -278300 41371 90485 9 -87911 11912 90485 40 -344483 50625 102604 73 -295387 28851 102604 10 -87760 11139 97898 41 -357795 65225 80575 65 -154798 65225 108853 64 -364145 69594 96242 40 -121623 38512 93833 32 -61973 30573 23670 26 -356339 30573 101629 27 -330333 24485 12926 87 -75237 22083 20084 26 -362022 22083 100201 28 -119243 23702 94206 41 -355004 12260 61705 68 -344353 48241 94381 58 -102690 12260 91349 70 -374568 23702 93011 41 -360841 5512 97550 53 -103663 17788 91157 46 -356753 37145 59710 36 -331559 48877 89759 60 -278624 44245 92139 11 -162120 22225 92139 44 -359329 93961 101354 59 -102261 9461 56122 20 -159459 5512 92972 53 -354810 9461 100857 22 -63980 43630 115571 79 -378215 94635 85857 72 -334472 100581 96195 63 -337159 31539 36363 55 -361880 19913 34651 60 -346281 91160 92733 98 -62150 31539 15134 55 -89309 19913 89476 59 -132992 19325 52427 32 -105426 27492 101312 38 -131061 6961 34044 137 -222133 56691 99656 10 -110405 57797 99656 138 -348191 6961 80476 136 -259507 45352 80476 8 -369844 54072 90061 134 -80681 54072 75308 133 -343388 28310 79832 141 -262980 71980 89163 12 -85678 107402 89163 134 -348194 6979 88557 17 -318789 58885 88557 12 -349104 19325 86758 32 -259280 43065 79818 10 -68471 70773 79818 157 -135448 32724 93662 59 -345199 70773 95671 156 -150457 38866 104104 49 -132031 13689 94653 36 -240940 52637 100758 12 -151792 46034 100758 134 -375689 42770 96915 35 -58724 12929 80295 84 -350347 38866 65210 47 -369540 46034 86448 132 -183091 55381 80092 9 -127859 77043 80092 46 -336917 27099 95212 130 -319533 64363 95212 7 -87509 9402 81275 51 -357115 47482 94690 33 -89755 22261 82486 96 -320626 72361 34061 12 -148722 27099 34061 132 -354803 9402 32939 49 -316483 40502 32939 9 -97002 64078 80929 38 -152064 47482 82188 33 -351842 77043 92675 46 -258429 36681 92675 8 -311119 10847 80276 8 -148388 25151 80276 125 -348292 8640 100087 33 -240445 48926 100087 10 -131290 8640 90897 31 -367435 12045 34122 132 -181248 41080 99383 10 -73430 12045 99383 132 -61527 28371 96585 135 -234014 10016 95274 12 -122219 41525 95274 140 -337010 28371 90706 133 -375649 41525 100443 138 -203183 59834 100443 10 -355334 16187 99486 35 -181780 45661 90905 9 -74114 16187 90905 35 -336334 19822 97818 168 -220605 45048 97818 8 -60564 23142 80887 35 -343599 32724 95432 58 -277672 36680 95432 8 -349404 23142 97876 35 -218567 31090 100627 8 -132907 18805 100627 41 -330147 21987 34295 41 -348575 12929 99798 84 -241017 53142 99798 9 -330165 22261 91671 96 -357756 64092 107942 39 -331082 36371 99987 122 -376478 63057 73215 56 -356371 31648 40251 38 -185425 72590 40251 8 -181666 44469 79072 11 -122393 42568 79072 59 -62798 36371 90341 121 -62190 31648 89636 39 -335643 11365 102314 39 -204322 68453 102314 11 -145983 11365 82078 38 -126281 65252 92047 152 -370500 72769 87659 47 -162327 23463 96061 25 -133536 22352 101127 72 -374260 19747 104610 120 -358349 80787 82412 14 -279382 50276 82412 10 -111861 66491 102331 37 -342046 11376 98482 33 -77334 32912 86449 44 -368438 25186 37139 89 -349006 18233 102089 48 -110686 59348 1480 91 -83189 70254 98253 163 -87808 11376 95770 34 -348175 6686 99760 34 -89055 18629 81008 74 -57773 6686 102706 34 -349039 18629 90502 75 -202754 56678 90502 11 -356999 44068 92020 31 -137070 44068 108594 30 -59630 18233 88560 48 -271044 117162 58919 12 -172265 102857 58919 33 -67560 64092 94470 39 -359593 96649 30813 10 -349611 25756 97573 32 -359036 90873 105193 9 -182192 48496 105193 9 -77931 38478 95281 108 -140697 65915 88863 129 -330852 32912 96297 46 -152072 47504 98357 75 -349350 22537 33637 33 -363380 47283 96616 43 -60443 22537 91112 34 -361867 19812 102661 51 -184430 65628 102661 12 -111344 63057 90250 56 -350511 42568 65650 57 -371656 93120 90360 89 -137666 47283 33246 45 -337874 47504 95090 76 -331503 47683 97051 46 -239864 44127 97051 11 -123335 47683 93603 43 -319090 61307 5656 8 -83334 71290 5656 31 -368137 20685 91383 130 -298664 52409 91383 7 -373734 13689 99329 36 -181063 39600 99329 11 -338818 71290 108670 32 -139510 58437 82224 122 -367672 15149 90125 44 -369998 58437 91011 122 -314939 30962 91011 10 -295307 28361 94342 10 -132265 15149 94342 45 -364014 65383 94705 156 -222808 61877 94705 10 -165550 42770 102842 36 -294133 21841 92560 10 -147011 17770 92560 141 -357083 46650 100914 38 -300954 70520 100914 10 -361696 17770 91550 142 -342233 13473 102952 41 -204853 72436 91785 8 -108567 46650 91785 37 -358526 82536 96122 157 -220431 43437 96122 10 -125971 63185 65390 151 -221669 53097 75536 10 -146334 13473 75536 41 -338391 59380 100757 44 -376488 63185 47165 151 -204530 70162 47165 11 -366906 87 80157 36 -239630 42201 80157 11 -78005 39001 97856 89 -332277 68399 34035 67 -332346 70254 90535 165 -297237 40868 98680 11 -101559 87 98680 35 -151465 44364 95697 147 -198018 23530 19591 5 -147214 18857 19591 67 -375586 39682 102160 123 -185296 71598 102160 6 -162044 21791 80730 49 -105148 25968 89696 63 -355519 18344 92459 84 -376919 75239 11834 9 -318217 54314 101020 9 -58947 14383 101020 40 -140621 65383 86759 155 -298461 50711 96556 9 -118838 21666 96556 97 -376263 57499 89897 22 -330134 21791 79771 49 -66477 57499 82654 22 -329025 6378 41112 23 -278630 44289 41112 7 -97564 68422 82281 98 -355844 23070 30292 10 -72622 5834 83784 24 -58895 13942 85593 12 -349283 21666 101609 97 -368425 25032 94059 44 -218472 30283 48393 7 -155987 73430 48393 66 -332279 68422 97701 99 -300861 69918 97701 10 -261372 60133 91434 10 -75826 25032 91434 43 -344710 56849 82595 42 -259266 42971 82595 10 -222496 59242 90752 10 -66167 55414 90752 102 -168108 56849 80393 42 -342205 13114 96699 105 -223482 67162 96699 13 -87478 9110 95677 120 -370249 65915 104617 131 -338216 55414 108776 103 -90448 25756 51330 32 -318949 60346 96173 10 -165201 40876 96173 68 -217502 25098 67939 8 -92663 39682 67939 122 -333857 94682 91018 37 -150462 38881 99382 57 -314812 29782 82535 8 -167470 53472 82535 92 -183653 59280 53844 8 -132751 17867 53844 39 -80500 52941 17397 52 -48380 64429 17397 11 -356324 29975 95557 166 -300357 66237 95557 8 -331185 38881 97745 57 -179450 29426 97745 8 -57698 5739 92724 96 -348134 5739 93984 96 -301114 71869 93984 11 -374189 18857 37523 67 -368493 25968 66666 62 -118243 18344 92662 85 -359297 93597 101798 20 -317361 48248 101798 9 -260098 50052 95096 10 -60084 20685 95096 131 -373797 14383 25069 41 -363715 56030 33223 11 -6507 92872 33223 11 -164906 39341 89535 47 -97934 70859 80836 118 -369294 39341 79453 46 -351624 70859 100953 118 -74785 19822 74405 168 -346134 89713 74377 41 -73365 11656 75032 44 -222142 56753 97676 11 -168890 61304 97676 40 -342065 11656 80796 44 -344598 54130 93892 192 -215997 16913 93892 12 -123008 45800 80710 87 -155654 71212 104084 84 -165828 44316 99004 87 -62818 36502 101462 86 -376294 58298 95308 87 -103690 17875 81294 42 -68324 69735 93259 38 -376708 69735 96498 39 -73284 11252 97792 43 -152397 49678 81254 41 -373987 16693 90574 176 -134382 27023 97901 124 -329281 11252 85594 44 -361367 13964 97232 42 -370206 64547 101100 125 -365397 92554 94549 115 -375183 33238 100594 42 -161103 16693 98043 175 -161458 18448 46826 165 -329083 7546 89825 9 -90355 25355 102756 103 -331597 49678 98970 41 -349145 19734 80840 169 -363344 46252 107770 9 -369578 47524 106507 38 -79578 47524 90102 40 -330201 22694 9538 40 -349597 25635 92996 181 -376187 55468 80799 162 -220112 40661 34473 10 -75371 22694 34473 40 -145650 8903 22335 101 -370272 66481 93040 40 -97341 66481 101119 42 -350700 47457 19647 42 -320268 69885 19647 6 -313131 20493 101150 12 -131479 9992 101150 170 -93844 45910 102639 172 -318226 54359 66078 10 -145901 10887 66078 51 -59190 15752 99874 134 -357151 48366 97169 43 -179613 30670 97169 11 -345048 66405 92498 51 -201386 46065 92498 11 -166599 48366 108808 41 -119716 26357 81949 146 -329831 17933 100658 40 -373409 9110 85595 123 -258839 39633 99679 10 -103701 17933 99679 40 -369484 44157 72805 52 -255187 18137 72805 6 -361514 15752 93354 136 -75949 25635 61507 177 -374793 26357 91465 150 -153322 55468 69560 159 -112287 69940 39930 48 -346268 91075 90448 49 -135129 31134 5337 26 -126161 64357 100043 85 -348837 16190 95533 41 -150813 40797 98987 34 -260722 54843 32851 9 -68769 72552 32851 38 -342370 15189 101041 106 -242287 63564 101041 11 -364045 66356 100066 83 -241856 60300 100066 11 -237890 30550 9580 10 -163089 27494 9580 84 -364144 69538 106509 111 -242072 61894 106509 8 -362458 27494 38220 84 -111849 66356 97230 83 -345061 67055 93782 37 -240073 46066 93782 7 -82771 67055 32663 36 -78396 41343 100321 26 -82192 62923 95702 35 -341054 102887 89758 21 -315140 32484 33385 9 -87202 7008 33385 110 -356894 40553 95282 163 -278712 45102 95282 11 -314917 30820 93778 11 -90865 28122 93778 16 -348714 14843 97884 42 -204744 71686 94123 9 -146557 14843 94123 40 -336165 18049 21327 46 -257496 31617 21327 11 -350371 39342 82000 68 -216695 20246 80085 11 -63236 39342 80085 67 -335399 7272 16885 68 -319502 64176 16885 12 -257212 28957 80607 12 -145452 7272 80607 70 -339035 78992 79773 53 -345862 85766 88561 39 -192625 110018 88561 14 -350465 41425 93474 69 -238564 35016 93474 12 -328914 2861 33323 92 -165509 42563 82021 33 -378116 93659 34265 44 -260801 55604 34265 10 -261733 62699 99360 11 -76369 28111 99360 89 -332136 64357 94851 84 -314732 29178 94851 8 -314934 30941 100433 10 -73953 15189 100433 106 -95637 56087 79972 89 -329632 15592 95691 67 -300594 67902 98961 11 -74014 15592 98961 67 -361104 10426 108549 21 -335255 2866 98084 40 -262035 64833 80675 7 -134234 26218 80675 67 -362968 36070 100296 65 -258995 40872 100296 8 -137548 46617 93996 31 -298592 51825 90908 9 -103828 18713 90908 66 -362353 26218 96147 69 -218579 31216 96147 11 -121286 36070 74593 65 -257105 28209 80700 7 -139899 60611 80700 58 -368886 32847 80202 38 -310928 9710 80202 9 -342750 19493 16158 54 -365276 91464 91471 97 -134470 27476 33322 30 -282156 72624 95300 9 -59860 19493 95300 54 -353752 100831 82005 27 -107658 41588 93055 17 -362075 22944 102341 53 -217200 23203 100694 9 -60527 22944 100694 52 -353324 97132 93913 31 -200012 34818 93913 9 -80330 51930 100808 11 -136513 40935 95198 38 -364615 81859 95268 66 -331734 53272 19625 153 -78299 40692 95754 31 -365683 95440 104090 40 -237953 31101 104090 10 -374813 26539 97583 67 -90568 26539 102352 66 -354583 5575 95436 68 -257495 31607 95436 11 -371599 92681 94314 54 -202250 52697 94314 8 -120241 29119 90699 37 -160147 10322 92353 48 -141694 72804 99189 133 -76419 28346 92529 132 -131676 11480 98713 133 -376839 72804 90734 132 -295652 31167 101063 7 -167437 53272 101063 153 -374617 24393 95780 43 -371915 95616 88865 43 -339120 80392 81365 22 -276632 30105 81365 10 -332835 82007 37796 23 -280294 57814 37796 10 -313597 23060 30018 11 -112522 71125 30018 27 -90150 24393 81300 43 -337007 28346 90993 133 -241522 57280 90993 8 -362093 23139 81273 42 -162265 23139 98860 42 -342054 11480 76841 132 -261368 60104 76841 7 -95703 56497 82283 58 -361163 11333 95851 10 -239926 44709 95851 7 -87152 6687 82449 68 -348913 17011 100929 35 -202039 50852 100929 11 -362044 22432 91996 71 -319727 65888 91996 11 -65626 52374 95170 57 -363366 46889 71190 68 -243301 70953 71190 10 -69295 76746 100662 69 -356404 32272 93370 68 -200835 40514 93370 9 -263072 72620 90372 9 -77237 32272 90372 68 -110084 55865 82070 38 -378907 101028 95887 25 -127103 71124 102285 46 -379052 102921 95501 35 -201423 46363 95501 11 -91322 30463 80319 29 -363040 37582 82770 51 -243543 72816 91301 8 -74794 19875 91301 68 -369279 39188 90347 4 -219965 39425 90347 8 -260681 54467 89605 10 -154126 60784 89605 36 -221769 53941 82366 7 -83595 72745 82366 67 -371339 89925 93440 43 -342777 19777 82931 67 -219253 34948 82931 7 -148623 26631 90928 70 -364632 82018 99469 41 -364273 72745 89593 69 -262447 67951 89593 10 -218586 31318 90103 9 -161707 19777 90103 67 -336231 18713 33430 68 -374823 26631 94728 71 -237843 30052 94728 10 -201817 49297 30181 11 -153681 58170 30181 27 -239333 39861 89926 11 -165902 44669 89926 45 -334380 99667 37687 21 -119648 25959 95355 68 -359831 99098 96331 147 -108620 46889 95685 65 -368357 24284 98202 89 -331109 37109 100856 63 -201041 42330 100856 9 -341945 9426 76836 37 -152553 50661 82801 72 -330095 21198 82272 67 -350984 53857 86151 9 -299816 62041 98636 10 -147650 21198 98636 67 -349392 23009 82819 60 -316976 44845 82819 9 -355853 23186 104108 69 -242378 64096 75255 10 -161649 19451 75255 67 -335361 6687 80911 66 -200828 40440 80911 9 -361832 19451 80412 67 -260791 55484 80412 12 -89923 23186 87356 70 -160076 9885 9091 142 -162169 22590 97507 144 -340760 99668 101692 33 -162700 25442 26459 43 -333583 92001 104285 32 -90299 25110 81047 99 -330383 25110 82749 99 -235054 15307 27791 6 -116404 6253 27791 49 -373464 9885 36320 143 -330194 22590 90746 144 -358407 81323 26026 16 -371807 94393 92821 23 -131237 8293 55578 13 -130806 3362 96566 12 -150286 37747 104993 19 -107606 41253 99316 92 -373263 6392 63615 13 -370289 66978 62416 92 -373181 3962 99096 12 -239460 40759 99096 9 -357235 50347 82259 88 -166935 50612 8394 47 -336135 17658 98145 47 -360938 7394 54393 15 -219416 36030 54393 11 -335539 9456 96482 86 -329872 18325 100216 85 -371970 96183 94127 72 -359088 91518 99884 26 -66853 59972 16403 65 -126883 69953 107017 25 -102143 8621 112739 145 -147826 22159 108861 51 -173672 115920 88259 51 -338229 55704 102656 39 -167895 55704 80584 38 -141194 69756 8830 16 -360620 115920 88866 52 -343748 34328 97706 23 -221054 48553 97706 7 -377988 92488 98618 128 -354746 8621 98790 146 -369265 39003 90545 55 -348846 16289 92992 3 -363302 45095 32526 43 -349680 26508 91919 37 -183894 61426 102301 9 -105794 29388 102301 37 -67010 60814 45384 69 -340193 94153 90146 52 -135341 32165 100417 23 -153148 54444 101178 68 -130175 113621 86761 46 -148930 28204 93182 49 -289855 115603 112740 7 -331619 50173 89781 78 -80712 54268 14859 58 -357604 60580 95309 7 -279895 54447 95309 5 -57986 8471 100720 47 -330641 28376 108628 46 -331916 58318 95421 24 -141102 69045 89708 51 -140115 62085 37263 61 -153958 59774 81282 114 -166868 50300 73254 60 -126885 69954 93158 6 -89261 19612 94177 9 -141186 69710 96925 45 -156388 78925 102531 34 -375941 49490 10902 50 -220568 44730 10902 7 -350072 33482 94118 29 -136219 39298 99204 45 -317410 48538 81620 8 -63379 40075 81620 48 -356849 39298 79945 45 -106065 30807 92352 17 -61012 25514 98134 48 -367491 12941 94899 47 -65880 53854 96855 48 -363827 59404 90055 48 -362284 25514 97191 47 -298260 49253 97191 8 -359379 94476 90683 92 -200907 41082 90683 7 -335669 11660 97452 73 -151676 45455 100639 27 -111385 63268 100776 131 -65774 53219 97413 19 -334092 96839 99140 14 -352644 90332 38695 88 -131710 11660 97408 72 -97644 69031 82608 59 -73652 13384 90740 36 -360165 102691 16884 79 -64998 48475 98750 57 -361383 14128 18942 41 -355000 12168 95813 77 -343800 35073 94347 78 -295589 30495 79278 8 -102834 13130 79278 40 -357459 56539 99563 39 -110831 60075 102441 112 -220462 43813 99138 9 -165938 44813 99138 21 -214510 10020 34132 9 -164270 34795 34132 21 -336951 27393 34192 21 -260666 54364 34192 9 -360031 100768 91645 23 -316553 41185 91645 9 -121875 39804 34547 73 -343825 35761 81285 50 -319371 63365 94293 14 -60765 24202 94293 77 -145285 5790 102556 54 -345181 70373 95517 49 -236142 20640 97493 11 -132232 14965 97493 48 -184024 62366 95566 11 -130762 2278 95566 49 -378092 93487 80142 33 -220076 40386 80142 11 -330052 20414 99860 73 -279556 51703 66775 10 -133328 21255 66775 30 -374615 24374 76704 58 -117315 12429 90113 79 -89446 20623 91499 49 -332481 73533 90719 48 -374428 21672 92374 133 -112962 73533 28682 49 -361414 14466 95688 48 -363565 51481 76687 138 -278438 42442 100888 11 -88281 14466 100888 49 -133232 20607 94599 139 -367875 17600 80662 48 -299546 59621 93580 9 -126516 67160 93580 137 -315618 34870 80636 8 -88871 17600 80636 50 -374508 22933 86762 131 -357720 63268 61840 131 -77513 34880 80486 13 -192184 107019 91357 5 -74642 19019 91357 54 -112817 72751 39378 32 -346507 93364 92679 26 -161177 17045 102769 52 -363288 44764 96420 52 -221337 50410 96420 11 -367930 18304 80436 110 -168189 57382 96903 64 -183483 58179 90091 8 -108174 44764 90091 50 -359711 97932 100458 29 -339009 77634 44599 109 -133828 24000 24135 110 -330012 19953 95638 134 -288707 106925 86452 11 -115772 114843 86452 22 -367123 6874 54507 21 -180293 34626 54507 11 -327283 106732 58582 12 -131056 6875 58582 22 -370534 74080 40323 16 -296964 38922 40323 11 -320010 68080 79495 10 -118233 18304 79495 111 -101621 2166 98291 51 -370696 80466 33282 18 -6409 80957 33282 11 -236659 23429 90431 13 -161748 19953 90431 134 -261264 59132 15010 12 -125427 60061 15010 50 -360879 6303 81924 49 -183579 58808 81924 11 -336074 16980 9508 134 -202022 50743 9508 11 -200026 35015 96214 9 -130999 6303 96214 49 -329476 13475 81259 48 -140563 64898 94741 120 -73671 13475 91307 49 -330515 26581 54610 135 -339720 89711 89894 11 -95257 53982 95109 18 -82197 62996 91248 10 -339840 90763 91309 33 -106078 30854 99513 38 -366221 100624 90020 27 -372124 97727 97380 21 -74949 20595 100538 66 -329067 7147 80649 60 -202534 55194 33830 12 -126859 69814 33830 113 -170978 76040 93863 21 -20801 92954 93863 9 -59371 16670 98037 51 -338418 60061 96097 49 -126986 70490 98113 44 -160201 10969 95111 15 -339715 89622 74404 16 -319201 62126 74404 13 -365202 90668 82485 52 -240767 51201 100089 12 -146682 15612 100089 191 -83968 76355 92320 92 -370802 81392 80643 16 -366163 100086 16492 88 -116452 6716 97282 19 -356236 28095 80916 47 -318930 60169 91413 9 -163210 28095 91413 46 -259481 45118 91847 10 -122551 43431 91847 49 -368556 26584 102564 46 -342615 17914 91369 128 -276636 30138 91369 9 -361601 16633 97288 49 -148619 26584 10183 46 -123986 51420 102494 47 -146836 16633 94445 50 -343461 29668 92013 47 -333493 91311 91259 66 -75252 22169 99184 44 -120334 29668 90636 48 -370245 65828 95985 53 -295655 31177 95985 11 -343035 24000 6643 111 -281040 64133 92833 9 -59579 17914 92833 128 -373648 12698 92510 111 -181155 40385 92510 9 -370423 70610 33140 44 -313589 22990 33140 9 -62243 31921 104096 88 -339916 91377 100282 94 -278270 41177 92672 8 -97889 70610 92672 44 -361346 13688 102637 44 -243087 69478 98447 8 -121451 37239 98447 89 -338848 72155 20073 116 -86813 1544 98606 44 -343223 26385 100902 43 -184815 68071 96116 8 -148863 27891 96116 89 -105227 26385 90298 43 -350265 37239 99337 89 -346797 95946 99752 84 -341656 4046 55112 91 -202593 55633 55112 9 -298962 54962 55298 8 -93330 43381 55298 49 -145017 1510 102190 43 -375464 37437 38625 25 -280038 55834 38625 9 -260668 54387 38733 8 -335815 13679 98410 43 -378426 96469 96383 26 -199258 30560 96383 8 -132932 18951 92507 89 -146367 13679 82725 43 -345226 71347 79851 43 -358173 76811 99935 66 -112567 71347 92901 44 -90987 28726 91779 23 -334054 96522 100740 70 -352861 92383 69476 90 -344953 62940 34472 51 -109428 51902 92191 19 -120309 29524 93767 48 -345321 73787 54451 50 -279958 55159 54451 8 -299635 60564 55282 8 -109715 53612 55282 26 -318878 59691 54944 7 -291869 9990 90921 9 -138461 52059 90921 133 -378457 96774 80070 26 -278641 44471 80070 8 -184592 66624 91650 8 -150097 36140 91650 52 -365794 96578 102205 27 -276702 30753 102205 7 -74686 19243 34038 137 -339082 80072 73392 28 -374065 17598 98263 54 -243300 70941 98263 8 -276467 28999 95344 9 -62582 34835 95344 68 -297950 46885 90749 8 -155636 71121 90749 28 -345762 82624 93741 25 -310970 10009 93741 8 -378708 98972 98104 60 -281610 68548 98104 7 -116654 8366 104057 90 -73667 13444 51351 47 -342875 21450 102610 47 -365878 97289 79174 47 -330099 21249 92934 130 -263078 72692 92934 8 -73245 10992 95872 124 -76981 31063 81970 48 -343957 37978 95567 44 -276720 30969 95567 11 -328943 4119 75068 132 -295586 30473 34108 10 -146296 13176 34108 133 -121550 37978 81170 45 -301177 72429 90737 8 -160031 9654 90737 43 -347992 1425 104994 90 -297195 40546 104994 8 -281187 65294 100147 8 -152735 51857 100147 131 -373450 9654 102836 44 -182017 47270 102836 7 -313490 22556 93755 7 -57663 5499 93755 44 -368767 30201 45957 88 -217820 26511 45957 6 -224320 73424 81374 9 -124158 52367 81374 132 -360840 5499 102360 45 -200177 35998 102360 8 -221940 55373 98866 8 -80555 53317 98866 44 -331264 40630 98511 90 -243555 72972 98511 7 -318254 54621 81766 8 -133326 21249 81766 131 -363613 53317 100212 45 -298118 48309 100212 7 -276747 31234 102436 7 -60602 23349 102436 44 -348847 16300 15255 88 -181631 44237 15255 6 -329382 12449 92486 43 -220500 44070 92486 9 -222930 62575 92413 9 -57566 4119 92413 132 -349418 23349 79724 44 -183267 56658 79724 8 -279376 50245 35702 8 -81585 59374 35702 44 -237760 29264 89866 8 -163635 30201 89866 89 -360869 5927 90884 90 -301552 75437 90884 7 -220040 40043 102839 7 -160462 12449 102839 44 -337155 31479 93369 44 -203958 65951 93369 7 -329916 18816 27322 88 -293200 16834 27322 5 -197800 22205 89784 7 -159803 8059 89784 131 -357572 59374 91697 45 -255879 21866 91697 7 -241815 59974 90251 7 -78868 43834 90251 44 -218528 30794 104623 9 -165137 40630 104623 91 -253463 9907 98188 7 -163886 31479 98188 45 -354562 5129 12731 88 -310869 9355 12731 6 -330433 25627 28040 44 -217080 22628 28040 8 -338732 69255 80360 90 -316870 43784 80360 7 -220006 39785 55835 9 -331357 43834 61014 45 -319098 61329 61014 8 -279962 55185 55508 8 -141843 73787 55508 48 -184193 63849 99115 8 -103405 16300 99115 89 -364388 77251 55980 90 -299694 61015 55980 7 -178710 25298 18249 7 -134108 25627 18249 45 -356240 28129 81318 44 -315070 32043 81318 6 -367255 9270 61358 89 -292177 11597 61358 6 -260496 53141 91752 10 -116372 5927 91752 91 -239958 45116 66118 8 -105545 28129 66118 45 -369817 53304 99625 44 -220633 45387 99625 8 -335816 13681 97502 93 -261772 63122 97502 7 -237593 28059 94105 8 -72541 5129 94105 89 -220934 47751 68997 6 -65788 53304 68997 45 -370887 82193 95900 43 -220751 46358 95900 6 -97676 69255 79125 90 -367986 18951 36870 88 -234366 11997 36870 5 -221829 54412 61223 9 -222005 55894 61128 9 -142299 82193 61128 45 -203618 63215 97895 7 -87493 9270 97895 90 -331344 43381 55186 48 -296994 39125 55186 8 -373496 10529 39287 90 -241998 61341 39287 7 -297647 43909 95908 7 -130772 2406 95908 50 -366952 1510 37429 43 -263614 76477 37429 7 -346852 96396 89675 37 -219367 35695 89675 6 -74411 17878 99026 132 -335474 8523 80156 44 -348264 8059 92515 131 -201084 42810 82271 11 -87398 8523 82271 44 -329204 9719 89965 48 -346344 91834 97301 133 -257437 30981 97301 11 -116852 9719 101407 49 -363449 48980 98510 50 -278331 41610 98434 10 -89648 21672 98434 134 -221186 49316 91045 9 -123554 48980 91045 50 -335749 12750 93227 49 -263005 72119 93227 8 -350932 52059 98472 133 -195457 10307 98472 8 -160519 12750 89985 50 -367665 15120 91372 49 -103163 15120 93702 51 -356351 30878 90283 44 -317638 49941 93027 9 -148176 24075 93027 131 -319167 61849 99515 9 -76937 30878 99515 45 -355619 19532 98823 45 -220578 44881 98823 9 -344531 51857 104054 130 -278114 39599 104054 8 -280507 59471 81685 10 -161661 19532 81685 45 -350014 32734 81994 45 -242178 62705 81994 10 -338118 52367 93495 133 -298523 51317 93495 10 -358059 72546 82258 45 -132910 18816 32534 89 -319028 60961 92376 10 -57473 1425 92376 91 -357726 63436 100933 89 -201447 46486 100933 7 -218339 29164 69713 8 -103502 16918 69713 131 -154536 63436 92830 91 -78379 41195 100093 47 -353883 102462 99402 57 -148952 28316 100989 46 -334236 98369 98218 47 -218208 28504 102701 9 -131229 8206 102701 133 -362156 24163 95789 47 -218070 27735 95789 8 -333872 94874 91995 36 -311010 10336 91995 8 -362321 25914 14990 88 -195379 9871 14990 6 -137315 45164 81789 45 -367292 9950 64635 43 -179277 28200 97859 8 -119641 25914 97859 89 -239044 38003 57816 6 -73096 9950 57816 45 -348701 14716 9485 43 -223081 63681 9485 6 -358905 89567 19361 92 -199221 30126 19361 5 -181164 40457 52118 8 -117633 14716 52118 45 -265240 85168 75744 6 -10127 34794 113267 14 -239672 42492 2623 9 -202419 54258 77977 10 -285700 91964 61302 10 -200591 38633 46610 10 -320235 69621 24506 8 -266787 92391 56900 9 -76534 28966 56900 9 -61390 27629 19122 30 -33937 61087 19122 35 -75124 21537 24360 9 -13248 71869 24360 10 -355489 17971 18000 5 -253712 11386 18000 6 -361320 13420 71976 8 -217423 24687 71976 9 -344506 51167 28768 8 -45523 30106 28768 7 -318280 54970 99777 33 -108951 48883 99777 52 -32104 41299 57334 8 -30136 20597 10576 24 -203021 58471 82121 9 -106417 32734 82121 45 -337445 35850 82761 123 -182649 51623 82761 8 -151915 46804 94831 131 -363023 37291 92547 132 -223585 67844 100414 10 -112192 69414 100414 49 -355126 13611 33026 49 -261108 57779 33026 9 -347264 100514 97322 134 -281968 71179 97322 11 -317316 47870 79580 10 -102907 13611 79580 50 -338188 54696 90271 54 -253615 10848 90271 10 -276764 31368 98864 9 -220486 43945 98251 10 -116123 346 98251 15 -237911 30714 90340 9 -139432 57935 90340 48 -351454 66678 101684 47 -319033 61023 101684 9 -365615 94843 94295 14 -222904 62398 94295 9 -164594 37291 82364 132 -367886 17878 20788 131 -112904 73129 96189 24 -344495 50816 98555 133 -359713 97951 16459 24 -314899 30639 16459 11 -361936 20623 95761 48 -298807 53630 95761 10 -376961 77133 98663 130 -202463 54631 102452 11 -162556 24589 102452 133 -374696 25285 95231 133 -298048 47808 95231 11 -348494 11875 101114 131 -240102 46373 76840 10 -145038 1915 76840 134 -361303 13211 82213 138 -242279 63472 82213 10 -238563 35006 96164 12 -101860 6072 96164 133 -316874 43826 100965 11 -159386 4729 100965 57 -132958 19050 89539 132 -354868 10507 33020 44 -236346 21801 33020 10 -369593 47895 81144 133 -317974 52312 81144 9 -374555 23489 93554 131 -182962 54200 100143 12 -113356 77133 100143 130 -73202 10507 95233 46 -366986 2563 81107 44 -278876 46665 81107 9 -335962 15552 89710 130 -224013 70987 89710 8 -259765 47602 100779 11 -119517 25285 100779 133 -260686 54535 16560 10 -145070 2563 16560 45 -357089 46792 99520 44 -277959 38653 99520 10 -350307 38036 81707 132 -295559 30252 81707 9 -146067 11875 9537 131 -329379 12423 6492 131 -116997 10517 99373 44 -332035 61738 82150 133 -256017 22810 82150 9 -261480 60966 93582 10 -119197 23489 93582 132 -241888 60597 99506 9 -102897 13538 99506 50 -333314 89755 81634 29 -220445 43625 81634 9 -355938 24075 90311 130 -241625 58213 90311 8 -79240 45668 68180 133 -131606 10927 81737 20 -368549 26490 99030 47 -362565 29130 97738 132 -299149 56532 69276 12 -92378 38036 69276 134 -296868 38215 99493 10 -134279 26419 99493 45 -351489 67920 99352 44 -318911 60012 99352 10 -341858 8206 99157 133 -277723 37147 99157 9 -336260 19044 23777 129 -316981 44890 80960 10 -146160 12423 80960 132 -111997 67920 91158 45 -329284 11298 92523 44 -329747 16918 94023 131 -221582 52387 94023 8 -183535 58514 89751 12 -111102 61738 89751 134 -320594 72145 80900 10 -58431 11298 80900 44 -342211 13176 9525 133 -242108 62195 9525 10 -272841 10306 99580 10 -76562 29130 99580 134 -132955 19044 93258 131 -331930 58548 8939 133 -294142 21869 8939 9 -336262 19050 80765 131 -317980 52364 80765 7 -351562 69689 15543 133 -261229 58830 15543 10 -355611 19440 100680 131 -240029 45711 100680 9 -330375 25000 90777 28 -180985 39173 90777 8 -350669 46804 95847 130 -97742 69689 33608 132 -331418 45668 93729 132 -89221 19440 96141 132 -241840 60130 81769 10 -94434 49104 81769 111 -318744 58472 32646 9 -93476 44260 32646 49 -365863 97153 70380 10 -317013 45238 70380 9 -164997 39962 95142 67 -332055 62293 82186 39 -335510 9171 82029 136 -216970 21890 103712 11 -155065 66932 103712 137 -350353 39078 100879 132 -319127 61616 100879 10 -351511 68312 64627 27 -204646 71000 95649 10 -62505 33798 95649 60 -366073 99239 99119 23 -299918 62869 99119 9 -261694 62446 35899 9 -78329 40909 35899 22 -335747 12718 95993 133 -221927 55209 95993 9 -331858 56772 67725 130 -240851 51786 100867 11 -136196 39078 100867 133 -355814 22610 98154 48 -218589 31377 91083 12 -133501 22187 91083 48 -368378 24589 33589 132 -271718 3718 33589 11 -359752 98304 91119 115 -204859 72474 97303 11 -58693 12718 97303 135 -341729 6072 92688 132 -201239 44533 92688 10 -153507 56772 94104 132 -360753 2088 81420 68 -364070 67214 38189 42 -178146 22303 89850 11 -66183 55499 89850 70 -278601 43939 96736 11 -94216 47895 96736 134 -179347 28634 80926 10 -147777 21887 80926 43 -330275 23767 89852 45 -181163 40454 89852 11 -373716 13508 96675 133 -259085 41448 96675 10 -185180 70749 91450 12 -74006 15552 91450 132 -259722 47223 33832 8 -133786 23767 33832 45 -362367 26419 65176 45 -279303 49845 65176 9 -330023 20105 90585 130 -185154 70581 90585 8 -102893 13508 93746 132 -133125 20105 96069 131 -77137 31773 97899 73 -104956 24828 82214 63 -134798 29299 82462 42 -362230 25010 18285 41 -361766 18824 81592 63 -260708 54728 33842 10 -140430 64062 33842 64 -330189 22548 95183 130 -179755 31992 95183 7 -119462 25010 93033 42 -375526 38710 102382 41 -184691 67312 81130 11 -134454 27423 81130 65 -375079 31490 68466 133 -294318 22993 68466 10 -297330 41529 81221 9 -103846 18824 81221 64 -336644 23966 93021 130 -202418 54252 93021 8 -345329 74217 81036 69 -379027 102676 97782 109 -314773 29593 97782 10 -201573 47636 32719 9 -137823 48114 32719 64 -337200 32442 94122 130 -280159 56872 94122 8 -298208 49003 102107 10 -89804 22548 102107 131 -199226 30170 92437 9 -126937 70227 92437 28 -373841 14892 93469 43 -316420 39722 93469 8 -62135 31490 94684 133 -180888 38575 100950 11 -73891 14892 100950 45 -183026 54842 89555 9 -90068 23966 89555 132 -317552 49386 34024 8 -89061 18719 34024 49 -359070 91296 90439 27 -183072 55227 90439 8 -216910 21560 81646 10 -57776 6717 81646 30 -221314 50265 33907 10 -78865 43829 33907 23 -359057 91071 96947 20 -256973 27566 96947 9 -164036 32442 90179 131 -318390 56004 57864 10 -200896 40988 53171 11 -149713 32530 53171 49 -375702 43208 41396 36 -182997 54521 41396 10 -68527 71105 100327 18 -259451 44828 93737 7 -133581 22692 93737 42 -81748 60208 80372 22 -117656 14901 33366 28 -329477 13479 97962 48 -260577 53646 97962 13 -343680 33474 92029 18 -93545 44588 92174 57 -319179 61978 98420 8 -63850 42753 98420 49 -318628 57634 41158 11 -242316 63769 32660 7 -92486 38710 32660 42 -367356 11196 91198 43 -180914 38689 91198 7 -337897 48114 81359 63 -278801 45892 81359 6 -117067 11196 80511 43 -330514 26571 72082 45 -134313 26571 44925 46 -345327 74183 80951 55 -370138 62523 90811 53 -73065 9801 80164 67 -62313 32245 94167 57 -367973 18774 58882 62 -88424 15188 102868 46 -356303 29479 34585 65 -125886 62694 52214 35 -368392 24828 80888 62 -204806 72118 97069 7 -161527 18774 97069 63 -97415 67214 92711 43 -373908 15727 100194 42 -181648 44373 100194 7 -351372 64062 95857 64 -220874 47389 89971 10 -61748 29479 89971 66 -103284 15727 81855 43 -349875 29299 93675 41 -299552 59708 93675 9 -368632 27423 57012 65 -182091 47885 57012 8 -91445 31165 85597 33 -347161 99412 93954 35 -377352 85284 86765 79 -363578 51845 35900 46 -346459 92818 94815 140 -336554 22692 98716 43 -357510 57579 70970 61 -319854 66967 96874 12 -152474 50171 96874 99 -73039 9678 100928 44 -149223 29711 87664 54 -370794 81329 100114 47 -361597 16618 90511 6 -83145 70078 101395 49 -66426 57199 37544 32 -59839 19368 96316 141 -42185 75451 96316 7 -337917 48461 80387 43 -331470 46890 75451 7 -42384 96316 75451 7 -364163 70022 89167 11 -167722 54831 97839 118 -378547 97568 94534 21 -106890 36850 90276 34 -332012 61002 81211 111 -361773 18933 82083 23 -220864 47256 112230 12 -146428 14067 112230 122 -371646 93062 33316 17 -202999 58323 96480 12 -65769 53206 96480 60 -345037 66127 79745 220 -91328 30499 93756 73 -199606 32991 51167 7 -331941 58820 35804 52 -331906 58125 86458 35 -373135 2526 108876 39 -349614 25766 102782 8 -309753 3086 92180 13 -52326 27793 18841 38 -232322 343 71162 60 -42131 74526 112208 14 -360569 114318 86459 4 -290293 965 77270 144 -279880 54395 86767 100 -156148 74932 86767 185 -206791 84150 76533 68 -308426 111764 116596 57 -51942 24265 116095 7 -322704 84929 84928 42 -71336 109766 84928 66 -244008 76045 4934 34 -28761 117221 49124 11 -335854 14137 42085 10 -292761 14596 42085 10 -203350 61123 14137 9 -78731 43092 14137 10 -171013 76381 100372 9 -81382 58259 80957 11 -2769 33282 80957 11 -363129 39573 90765 12 -240847 51754 90765 11 -373144 2816 93133 53 -72651 6227 92954 9 -20809 93863 92954 9 -317759 50936 102873 9 -73781 14263 102873 10 -131086 7147 97861 61 -258745 39014 109686 12 -69523 82899 109686 17 -222302 57865 109685 12 -171348 84515 109685 24 -341775 6777 112214 22 -284602 86784 112214 11 -42763 112214 117664 9 -290717 3296 78983 72 -315982 37164 78081 57 -290851 4165 79322 28 -284768 87692 112207 26 -174293 2119 97441 22 -194408 4332 74989 37 -320057 68382 37203 125 -184408 65434 77523 19 -102450 10457 103374 93 -232692 2501 2757 28 -266106 89212 117662 11 -285204 89833 43766 9 -163499 29585 43766 10 -152556 50675 20477 49 -26980 63516 20477 47 -227186 89641 9462 10 -116175 2178 9462 11 -292827 14951 36322 45 -92343 37810 36322 11 -302872 82458 46394 11 -57649 5394 46394 11 -139792 60085 55842 48 -32733 47808 55842 49 -225828 82160 52573 12 -144980 208 52573 11 -120688 31683 5362 67 -25202 44533 5362 54 -298529 51334 24100 9 -127261 72121 24100 33 -360802 4221 40610 52 -268186 98777 40610 7 -219853 38607 114962 8 -56817 108830 76697 42 -184199 63941 111661 10 -252275 3385 37204 8 -318536 56997 88565 6 -180057 33537 104364 6 -348445 11302 63786 37 -248403 97483 63786 7 -337389 34510 111079 32 -311320 11964 33758 13 -121731 39088 33758 13 -219270 35111 75901 16 -122208 41464 75901 24 -345457 79569 65524 9 -231502 112318 65524 7 -109234 50749 95121 10 -267395 95144 65987 10 -285622 91571 66199 56 -2878 35551 66817 11 -367547 13656 91236 8 -200013 34833 91236 5 -353280 96692 60675 28 -317631 49906 60675 5 -369943 56785 102707 7 -358193 77326 73245 16 -360815 4807 100000 6 -360791 3559 9166 10 -202517 55047 9166 6 -117435 13134 9981 48 -221850 54565 35106 4 -345270 72605 56402 64 -297364 41817 89179 4 -348057 2858 39956 6 -350775 48936 98797 6 -121850 39679 96898 69 -170959 75795 82177 12 -351806 75455 87956 11 -346826 96178 91846 40 -367017 3614 82987 10 -152362 49490 42534 49 -369046 34634 102727 14 -108533 46485 91406 30 -330522 26673 81355 10 -73125 10039 97422 9 -170709 73217 88878 22 -71639 111983 88879 11 -369020 34348 88574 11 -350146 34349 89492 13 -376869 74010 112215 7 -352541 89292 113807 11 -180389 35396 113807 5 -338161 53655 56309 10 -163827 31207 99655 24 -362758 33155 33244 14 -237770 29307 33244 5 -127552 74024 57163 12 -164971 39845 55259 49 -339387 84423 56450 11 -287877 101562 56450 11 -93322 43356 40200 13 -49245 85891 40200 13 -374059 17529 108588 9 -160749 14547 82077 12 -165080 40387 108730 11 -332846 82098 96232 31 -261552 61447 96232 10 -282231 73356 91181 11 -131301 8747 91181 91 -255791 21406 81972 11 -62070 31157 81972 20 -333846 94589 82353 11 -317074 45736 82353 10 -349413 23276 94507 10 -220866 47301 94507 9 -354621 6329 96537 9 -49306 92438 96537 9 -366066 99173 92438 26 -49331 96537 92438 9 -348670 14184 75315 90 -297479 42489 75315 11 -91441 31156 81313 46 -88971 18201 96890 111 -75914 25460 52212 12 -109309 51188 104284 23 -349886 29524 79179 47 -375442 36947 55564 9 -221867 54697 55564 9 -165678 43550 39011 11 -17699 41027 39011 11 -357865 67589 41027 91 -17491 39011 41027 11 -351194 59609 88313 8 -202423 54335 88313 8 -203476 62055 61012 4 -332592 78888 61857 7 -221914 55110 61857 7 -349737 27136 81500 6 -49293 89801 81500 6 -280842 62359 38955 7 -67767 65732 38955 57 -361164 11341 97012 7 -42364 90514 97012 7 -346006 87892 85612 11 -35119 85157 85612 10 -333217 88472 85157 46 -35122 85612 85157 10 -101961 6895 90915 9 -98726 78610 81134 33 -351424 65732 43426 56 -358689 86593 88582 12 -376981 78610 89183 33 -358831 88619 87961 9 -260680 54466 92242 8 -146100 12049 92242 9 -334254 98514 82234 20 -49308 92604 82234 10 -350544 43529 38782 30 -171264 82623 34157 10 -364739 85064 85871 9 -238707 36041 85871 4 -92397 38107 59402 24 -57919 8004 38535 49 -352332 86278 85614 30 -251271 114491 85614 4 -337323 33894 88583 8 -212023 111743 88583 8 -339466 86081 38565 15 -38868 35335 38565 7 -371141 87307 87962 10 -174139 1342 113275 10 -345951 87277 38566 13 -333230 88702 35335 8 -289134 110080 35335 5 -341904 8903 104083 103 -241218 54796 104083 8 -166802 49847 86774 101 -354529 3849 92580 44 -115770 114835 38567 17 -7003 113276 38567 10 -345838 85435 86775 12 -370596 76702 113276 10 -177865 20610 113276 10 -334318 99063 93824 22 -330721 30099 18443 7 -216383 18777 68374 7 -345047 66381 108818 13 -252721 5902 108818 8 -318239 54504 35461 8 -359043 90965 37485 10 -363619 53456 81649 7 -295521 29922 81649 10 -116972 10329 97099 7 -83856 75178 75125 5 -337956 49108 107192 10 -124813 56308 58446 8 -358673 86379 87963 14 -107060 38244 108858 59 -360769 2697 108627 9 -239600 41859 108627 9 -364852 86315 39441 46 -348143 5951 87079 47 -342376 15238 91426 11 -74956 20624 93273 22 -166831 50081 80192 10 -134945 30215 108907 9 -178438 23903 93916 11 -60974 25343 93916 11 -368036 19551 99396 14 -300789 69428 99396 16 -344753 57722 90291 15 -291922 10355 90291 14 -221216 49507 80441 12 -111186 62138 80441 12 -339683 89372 111666 19 -102791 12813 82297 123 -200897 41002 80619 10 -122228 41560 80619 81 -235042 15250 51646 4 -370991 85317 87680 12 -221957 55511 87680 11 -344121 41519 54571 12 -232174 117198 54571 11 -298950 54829 87080 11 -117033 11055 87080 11 -122257 41765 33084 8 -93505 44362 96227 92 -257033 27886 80296 8 -109301 51165 80296 21 -261623 61942 90160 8 -135518 33325 90160 133 -330691 29665 95659 52 -240539 49354 95659 9 -360147 102470 104223 63 -184456 65744 104223 10 -352801 91883 92371 64 -221986 55739 92371 8 -219722 37856 90377 8 -61781 29665 90377 51 -221974 55620 100315 9 -76964 31009 100315 22 -377839 91218 99151 33 -272846 10397 99151 8 -237969 31299 69527 7 -164531 36663 69527 52 -277831 37858 80814 6 -88726 16853 80814 34 -329760 17067 94287 61 -371627 92892 81050 16 -319110 61446 81050 7 -375374 35813 99031 20 -281718 69248 99031 8 -355832 22830 23692 49 -363004 36663 98327 54 -222536 59561 98327 7 -220485 43941 95952 7 -147944 22830 95952 50 -234018 10033 90972 7 -134618 28273 90972 61 -329014 6228 92962 30 -295594 30532 92962 6 -116401 6228 97545 31 -159025 116065 87081 50 -70449 101602 63167 6 -90370 25425 93606 9 -13538 80596 93606 9 -336067 16849 33520 7 -316563 41281 33520 7 -378521 97368 100454 8 -199280 30704 100454 8 -91485 31332 89706 25 -357249 50645 96670 137 -295278 28166 96670 9 -199337 31183 82924 8 -148239 24482 82924 53 -300041 63901 41688 7 -161341 17761 41688 11 -280716 61337 41891 8 -92209 36584 41891 8 -374672 24980 35613 10 -184607 66778 35613 11 -330312 24208 80547 9 -378607 98071 97180 18 -298869 54064 97180 9 -364428 79308 102403 14 -203233 60160 102403 11 -358148 75211 81637 17 -198302 24914 81637 11 -278673 44747 95074 9 -80542 53198 95074 48 -63238 39345 12979 23 -362055 22637 39464 28 -335797 13340 93876 8 -354603 5833 89705 9 -57479 1588 96399 10 -160588 13332 97340 9 -341601 2278 99174 47 -363751 57151 72293 69 -83957 76250 94398 23 -376203 55959 21394 46 -259852 48318 90033 9 -58821 13559 90033 9 -240768 51222 97620 9 -79527 47231 97620 9 -356850 39301 94790 7 -182933 53938 94790 7 -329895 18606 97811 7 -219724 37860 97811 7 -378133 93794 94559 8 -276862 32198 94559 7 -117396 12941 75324 48 -363248 43265 54321 9 -182975 54291 54321 9 -260940 56711 39048 10 -156042 73878 39048 10 -280380 58387 106725 11 -78767 43281 106725 11 -345323 74044 58976 11 -300769 69306 90894 10 -63655 41640 90894 22 -340035 92586 96425 20 -350582 44362 41752 91 -259431 44677 73946 10 -88750 16980 73946 133 -356496 33325 90506 133 -347017 97993 9420 18 -355040 12591 101173 10 -316499 40643 101173 11 -335982 15861 91137 9 -181510 43217 91137 9 -239713 42812 101626 9 -57450 164 101626 9 -183446 57955 92544 10 -94693 50688 92544 10 -110640 59111 101194 25 -375137 32572 43025 62 -342505 16670 96955 49 -239212 39025 96955 8 -260535 53375 90698 9 -73647 13371 90698 132 -85877 109723 101634 8 -115184 109722 107708 4 -158230 109724 106420 5 -139570 58766 62121 10 -63320 39786 57164 8 -195341 9637 113277 2 -261973 64342 64335 10 -147959 22888 64335 13 -313746 23849 80593 10 -156214 75816 80593 17 -80834 54966 99234 51 -371830 94692 93719 27 -361379 14096 93257 11 -241179 54548 93257 10 -348789 15653 82693 11 -263071 72617 82693 11 -328419 115037 86469 11 -127442 73131 86469 10 -376972 77983 87681 10 -199414 31744 87681 10 -179422 29156 32979 13 -117494 13566 32979 14 -63621 41481 90671 13 -378710 99002 91692 24 -202043 50903 91692 11 -343368 28128 101295 7 -117701 15186 24459 7 -354637 6533 30574 7 -72384 1589 29547 53 -162464 24189 89737 15 -153271 55138 54680 3 -153653 57921 106585 5 -320648 72530 101268 9 -107626 41425 101268 68 -357440 56087 33216 89 -236080 20200 33216 8 -220544 44488 34226 7 -66493 57579 34226 62 -370730 80713 98874 34 -35095 81343 98874 6 -160283 11489 81343 6 -35194 98874 81343 6 -112747 72258 100205 43 -105372 27212 51427 10 -54135 47953 51427 6 -89350 20151 41347 87 -9442 27194 41347 8 -349639 26091 27194 9 -201330 45532 27194 6 -379416 113558 45776 113 -256296 24265 45776 7 -361093 10145 97083 7 -59937 19870 46330 191 -60330 22008 98813 10 -376065 51943 94545 9 -353005 93809 91651 55 -150397 38572 54794 8 -364908 87127 86471 10 -210698 102152 106869 27 -154188 61276 106869 24 -353558 99229 95884 24 -182948 54080 95884 10 -156263 76396 98277 12 -366423 102958 93230 17 -362059 22673 92872 98 -2766 33223 92872 11 -336919 27107 98366 37 -102041 7454 89423 11 -146919 17137 80706 10 -90110 24222 91221 13 -42381 94932 91221 12 -363066 38331 66361 14 -179584 30400 66361 13 -340434 96362 94932 24 -42367 91221 94932 12 -258847 39692 80506 18 -80871 55175 80506 19 -101459 117078 87685 21 -338558 64078 34255 38 -315716 35723 34255 11 -147571 20838 75107 9 -163237 28241 98135 11 -207756 89217 67837 3 -89025 18430 96548 7 -59542 17712 81263 73 -132865 18577 91649 7 -73436 12065 94598 40 -364260 72272 37498 4 -115073 108641 55018 2 -135592 34417 108640 3 -65864 53772 5202 12 -57486 1996 93789 13 -93463 44151 99393 20 -148526 26156 91963 62 -320352 70366 97616 9 -127797 76493 97616 34 -159268 1287 95448 7 -159234 57 95764 8 -6512 94718 95764 8 -363900 61869 94718 67 -6517 95764 94718 8 -66579 58210 70328 6 -124494 54386 54356 8 -363703 55685 116099 13 -235172 15791 6428 5 -118518 20041 102643 56 -349672 26390 96422 56 -221654 52992 96422 8 -278660 44626 25767 9 -150214 37144 25767 39 -100197 105967 87083 55 -357184 49073 36019 21 -176911 15955 47892 2 -373094 1360 20233 6 -298673 52527 42090 3 -183799 60754 95694 8 -337959 49196 90788 56 -221283 49919 90788 8 -353817 101423 97516 102 -183633 59115 97516 8 -241266 55398 93700 8 -160362 11975 93700 53 -103885 19017 102325 8 -260131 50320 80158 8 -351642 71257 100159 9 -279541 51575 100159 9 -342532 16898 75166 9 -293825 20089 75166 9 -159183 117423 108910 46 -345063 67259 85621 9 -85269 103446 103449 4 -153944 59725 106362 8 -129528 107771 60368 6 -376278 57817 31834 10 -343161 25700 94030 10 -374198 18943 82472 10 -342258 13749 12641 13 -174891 5521 12641 4 -108570 46651 80534 7 -163945 31889 97983 7 -65470 51388 92723 8 -136942 43346 94991 50 -72145 115942 89508 26 -248425 97579 72962 8 -69765 87979 108750 5 -109632 53172 101647 2 -262785 70344 69207 5 -168911 61401 69207 4 -129062 103135 105825 3 -365238 91022 9350 5 -354515 3417 97168 9 -333610 92316 108701 46 -364311 74356 94382 24 -133093 19927 99812 10 -376077 52225 95156 11 -355727 21105 74402 4 -357380 54126 97710 14 -356859 39570 80634 18 -172852 108738 59576 7 -370537 74195 54986 11 -103637 17689 92426 10 -367325 10611 89761 11 -328901 2679 107946 10 -362087 23085 73066 9 -184185 63777 73066 9 -156910 91383 52409 7 -15307 15761 52409 6 -332472 73296 34562 11 -213743 5777 34562 11 -331007 34562 73296 11 -187557 85111 73296 36 -229018 97433 56547 22 -172234 102307 56547 9 -127887 79029 60892 10 -12228 58548 60892 133 -249039 100141 56667 22 -128482 92300 56667 9 -309566 1915 55100 133 -99443 94939 55100 8 -175119 6715 111086 24 -112020 68091 104371 5 -264664 81866 42168 24 -218211 28507 51940 12 -98370 73677 117675 7 -233522 7413 35675 46 -142465 86117 35675 13 -265272 85325 117676 45 -129406 106404 112754 9 -205641 78048 117677 41 -263971 78698 73279 10 -130259 114374 78339 8 -366788 113815 42902 8 -315323 33512 42902 13 -226425 85689 77184 12 -303302 85238 11377 17 -296208 34359 113815 8 -144701 115558 113815 7 -366860 115995 114974 8 -205573 77635 114974 34 -366840 114974 115995 8 -214647 10952 115995 8 -99128 88600 105014 7 -224840 77159 104372 12 -295899 32893 40724 9 -161011 16167 40724 8 -240892 52101 112755 13 -154724 64762 51399 5 -363850 60242 29672 12 -209561 96930 29672 34 -362594 29672 60242 12 -40734 56252 60242 12 -71124 107750 60361 7 -252626 5389 116003 41 -100367 107747 116003 11 -186115 77397 59138 67 -149864 34017 59138 10 -129392 106275 83108 7 -323013 86357 111673 34 -240431 48828 104373 9 -84126 81089 35137 5 -246712 89909 52019 31 -71225 108650 52019 10 -244635 79902 71936 21 -73458 12241 54509 4 -233196 5648 33041 22 -63029 38302 55078 9 -144123 110708 112756 6 -265193 85016 60366 45 -99122 88530 60366 12 -188121 87605 111087 45 -207206 86643 112757 11 -296686 37137 113818 48 -250426 108575 106700 7 -129020 102387 27892 11 -24214 31361 27892 42 -219905 38949 45362 20 -174057 920 109702 23 -194225 3141 23485 21 -94861 51652 23485 13 -271611 2944 75184 23 -100374 107829 42274 9 -190425 97636 54987 17 -279885 54418 31485 11 -248230 96672 11378 22 -62915 37507 28811 4 -296029 33575 64393 28 -172155 101283 64393 12 -168562 59536 35676 6 -376360 60214 60243 11 -296762 37513 60243 11 -376362 60243 60214 11 -307113 102695 60214 40 -336037 16436 6758 6 -198831 27455 6758 6 -36492 9945 26195 15 -126832 69698 46348 4 -311097 10765 107703 6 -40580 54635 46053 8 -74362 17616 66748 3 -258610 38096 60185 6 -162568 24642 22767 4 -315413 33951 54194 22 -171764 93671 54194 7 -29534 13893 51556 112 -269717 107479 69269 215 -205734 78584 68139 89 -30864 27341 23509 35 -208884 93994 105015 28 -128205 86425 105015 7 -303722 87117 83165 53 -256925 27341 62972 36 -70004 92253 62972 11 -128624 95163 60369 12 -53986 46575 60369 54 -114105 94958 24141 8 -57141 114180 24141 54 -253173 8414 62526 60 -114386 101254 62526 12 -270740 115066 38315 92 -305796 96608 47461 25 -301280 73303 83297 63 -224174 72372 86170 13 -187218 83043 88589 74 -32292 43599 6733 21 -231564 112703 77671 11 -371341 89947 70318 9 -179163 27437 70318 90 -374257 19710 25279 12 -4787 56030 25279 11 -371866 95124 22518 10 -292843 15047 22518 7 -353615 99701 28236 11 -224123 71917 28236 10 -351760 74401 14774 8 -296623 36793 14774 8 -353704 100424 23453 11 -179442 29371 23453 10 -332889 82451 27690 8 -314856 30162 27690 7 -359653 97214 18505 11 -204566 70460 18505 10 -338256 56318 62660 11 -320707 73017 62660 10 -235486 17309 29624 48 -155366 69332 29624 48 -372392 100522 36527 11 -222232 57367 36527 10 -339155 80759 534 11 -215068 12900 534 11 -372115 97606 44912 9 -11785 53776 44912 10 -182100 47993 73398 24 -269029 102702 1682 33 -377890 91614 17571 12 -752 13918 17571 9 -364509 80661 38165 10 -38816 34532 38165 22 -246034 86857 104366 121 -205268 75549 79502 335 -360206 103244 64262 11 -25903 51620 64262 13 -295271 28106 50589 45 -138594 52714 50589 44 -345562 80731 14694 13 -294045 21297 14694 12 -257651 32611 70317 11 -113103 74833 70317 11 -346075 88911 13577 27 -295882 32829 13577 27 -307496 105217 94524 165 -93612 44841 94524 157 -330816 32487 41809 11 -22152 10899 41809 11 -221928 55221 88588 24 -150081 36030 88588 19 -290203 442 77677 284 -289866 115751 58193 138 -174869 5391 77610 338 -280252 57554 37208 179 -250884 111916 78082 139 -43138 117606 38668 3 -312401 16989 2141 10 -199476 32186 99533 84 -132586 16869 21430 5 -366069 99197 95763 14 -318133 53609 95763 14 -327121 105232 60833 35 -70286 98536 60833 48 -224858 77267 74293 109 -175817 10541 18151 42 -191042 100240 60976 15 -128306 88838 60976 35 -378762 99569 12372 9 -256537 25460 12372 11 -175619 9393 36035 12 -337270 33424 24491 12 -30362 22543 24491 11 -284056 84406 87972 16 -204593 70641 80918 57 -253024 7569 89193 44 -200463 37774 102348 94 -22932 19112 2362 9 -273678 14394 14293 12 -180807 38042 58055 10 -215421 14434 5813 8 -198017 23529 76045 12 -174999 6121 7804 34 -205061 74113 74101 13 -113964 92321 74101 117 -194235 3190 77829 122 -98427 74083 10245 46 -4004 47373 10245 26 -262228 66459 74058 17 -95064 52882 74058 20 -66136 55260 43179 9 -186061 77085 438 77 -377906 91761 34346 43 -242635 66139 34346 46 -322412 83020 83298 27 -98909 83502 83298 21 -252048 1964 439 30 -322536 83900 4568 37 -302002 78274 81440 43 -301131 71959 98189 36 -110783 59834 98189 30 -282800 77426 102458 81 -46064 38030 3187 58 -359022 90729 92292 38 -278521 43215 43486 11 -107059 38218 43486 22 -34620 70348 69616 144 -9377 26527 3730 74 -326481 101217 1227 30 -318877 59679 89196 67 -158900 115062 89196 37 -327998 111902 79325 33 -112944 73321 39553 24 -17074 32306 39553 59 -297564 43138 37841 29 -121585 38249 37841 30 -201135 43175 100104 36 -155430 69902 100104 9 -289875 115818 85616 10 -311059 10599 78083 48 -214397 9302 1400 59 -290292 960 725 31 -305330 94463 67899 138 -140581 65022 67899 34 -123098 46371 38579 16 -9755 30232 38579 18 -247565 93522 44576 22 -122528 43289 44576 14 -299249 57192 81552 18 -73070 9822 81552 13 -180347 35129 48986 12 -219916 39063 27623 100 -66690 58885 27623 19 -316291 39088 70951 16 -90213 24698 70951 14 -181511 43238 93798 19 -106661 35111 93798 22 -216382 18773 29084 30 -164949 39695 29084 16 -316028 37454 43351 15 -141876 74069 43351 12 -296129 34054 34954 34 -139686 59441 34954 24 -182771 52566 53610 18 -91909 34054 53610 16 -215136 13186 69014 10 -243977 75821 60834 25 -305054 93292 54970 34 -172070 99777 54970 33 -255090 17689 1496 15 -181549 43531 102276 29 -206929 85133 111083 22 -245496 84147 95360 81 -192764 111008 82918 26 -138699 53480 58366 40 -18842 52926 58366 40 -320575 71984 48549 123 -163358 28901 48549 157 -70624 103427 74523 24 -54190 48549 74523 72 -375886 48549 54232 122 -302385 80442 54232 87 -224933 77766 91728 68 -365775 96370 24754 8 -311940 14689 24754 8 -297154 40294 43446 54 -70320 99180 43446 42 -222237 57430 58119 12 -11570 51307 61016 41 -372535 102370 17961 18 -317176 46635 91960 103 -110403 57794 91960 74 -113000 73804 64324 64 -9143 24173 64324 104 -320798 73804 74094 20 -167315 52512 74094 30 -296343 35167 88590 31 -277496 35543 87683 19 -250852 111634 117133 6 -277380 34597 66819 15 -290065 117404 110006 20 -246128 87423 65039 67 -184333 64905 62993 33 -98356 73516 62993 20 -181548 43525 59685 68 -346188 90324 21116 8 -16999 31636 21116 10 -345545 80633 32951 14 -317501 49088 32951 12 -366183 100259 19797 13 -29282 11195 19797 12 -378091 93482 47913 12 -4697 55022 47913 11 -239974 45302 74112 42 -143092 99600 74112 52 -353853 102092 19432 11 -28976 6828 19432 12 -185724 74962 22650 103 -74874 20200 22650 55 -379014 102518 15907 8 -18823 52692 15907 9 -378197 94505 7426 9 -18695 51124 7426 66 -370760 80969 26269 13 -1104 17593 26269 61 -99669 99010 39282 7 -47323 51598 39282 7 -136169 38955 62359 7 -15671 19322 62359 7 -345360 74951 22644 10 -176832 15606 22644 8 -353227 96171 20725 10 -44757 22622 20725 12 -5282 61766 343 57 -58962 14471 11790 6 -23740 27119 11790 9 -294895 26146 53479 90 -99589 97570 53479 68 -82412 64415 65379 41 -3251 40132 65379 58 -106677 35163 2391 56 -42996 115542 2391 108 -181420 42398 59884 85 -143381 103780 59884 33 -130560 116670 85161 18 -42333 87013 85618 10 -184514 66117 78768 25 -224158 72199 62472 39 -126115 64108 62472 22 -317353 48134 6218 20 -161212 17191 6218 12 -18540 49570 39676 39 -374969 28931 44562 8 -282515 75336 44562 78 -228502 95407 59209 26 -156083 74360 59209 8 -183752 60454 55236 9 -113530 82863 55236 9 -375740 44562 28931 8 -312271 16356 28931 8 -262975 71922 20424 7 -312109 15510 59035 8 -253249 8747 56284 90 -261409 60541 41281 90 -164168 33520 41281 7 -367282 9688 62664 7 -4255 49785 62664 89 -370143 62664 9688 7 -298449 50627 9688 7 -218732 32426 10330 48 -99616 98010 10330 9 -253161 8366 59101 89 -36092 271 47004 8 -215203 13541 59130 46 -224127 71920 66264 7 -43929 14184 40089 89 -232729 2705 46022 11 -114383 101193 46022 11 -351189 59451 44276 9 -19709 62261 44276 62 -358012 71317 71134 10 -46439 41864 71134 46 -190247 96766 44941 36 -70291 98633 44941 10 -128382 90490 54957 12 -15183 14394 54957 12 -358001 71134 71317 10 -281479 67628 71317 10 -86368 114375 117138 12 -266157 89414 111677 12 -157981 107181 111677 13 -244163 77070 2418 12 -172787 108014 2418 10 -246275 88159 84121 14 -343805 35259 111099 12 -226737 87458 111099 12 -347730 111099 35259 12 -213278 2772 35259 40 -239488 40893 66967 13 -171917 96874 66967 12 -329569 14767 35425 6 -292586 13762 19232 16 -119986 27859 19232 9 -232765 2950 48768 13 -206260 81200 68930 17 -162535 24515 68930 9 -266632 91700 6278 13 -179691 31419 117136 18 -161037 16309 117136 10 -226956 88507 117680 4 -325585 97374 14767 14 -60660 23695 14767 8 -260750 55055 105021 20 -268892 101914 114980 18 -240678 50448 34936 12 -189432 93284 53720 67 -202060 51087 57341 11 -18392 47993 69083 12 -261358 59994 53417 9 -292612 13922 65931 10 -273057 11345 52771 10 -156381 78736 52771 7 -187839 86405 69626 6 -209111 94978 112236 15 -303432 85811 110017 15 -172178 101656 110017 9 -22470 14434 46225 9 -223625 68087 108615 7 -230519 105373 68004 9 -113696 86727 68004 8 -283902 83496 108843 23 -188038 87181 117685 10 -174451 2864 75381 14 -84503 89465 75381 14 -183531 58467 75040 11 -259862 48460 41231 25 -129619 108818 5902 8 -374035 17191 54504 10 -55394 61190 54504 22 -216052 17170 26046 7 -77759 36757 26046 4 -270712 114909 22182 5 -282919 78282 105022 16 -265388 86054 84437 9 -228500 95400 111095 11 -154845 65464 111095 3 -164178 33620 49377 4 -6307 75779 49377 19 -197204 19233 58840 9 -286900 97228 112232 36 -202674 56230 22054 12 -282346 74251 28772 15 -99384 93925 28772 14 -222874 62276 65399 9 -303255 85065 114407 28 -144041 110098 114407 5 -3742 45014 54589 8 -341025 102559 67856 10 -26568 59258 67856 17 -259603 46186 95812 128 -147452 20198 95812 79 -352202 82681 25444 12 -730 13646 25444 11 -372331 99914 21973 11 -210149 99537 21973 38 -18743 51683 73347 38 -243746 74336 42513 20 -62974 37903 42513 48 -239507 41096 81761 49 -124029 51703 81761 32 -339377 82977 28460 14 -40111 49491 28460 12 -347072 98627 25198 7 -9285 25685 25198 9 -333595 92141 25685 9 -197343 19798 25685 11 -354137 108621 21822 11 -281087 64489 21822 10 -351874 79110 7106 14 -37607 21822 7106 12 -221792 54162 93745 80 -112576 71393 93745 37 -43201 1961 68163 6 -339103 80269 57437 9 -20370 71507 57437 10 -275694 24985 56866 9 -207595 88496 49380 41 -308249 110753 110018 7 -69791 88561 110018 14 -194353 3901 75328 40 -49856 113736 116618 20 -302423 80592 66180 14 -240193 47112 68861 8 -271334 1394 16537 9 -79649 47858 9268 6 -207285 87013 9269 11 -69113 74979 9269 9 -272304 6948 69041 13 -70804 105000 107058 8 -207792 89421 114977 10 -173448 113799 114977 6 -180748 37655 104383 15 -270123 110410 54829 16 -156707 87080 54829 11 -279304 49847 71966 101 -157531 103244 38768 11 -15927 21655 38768 11 -39376 41526 69592 137 -225933 82637 22682 7 -62812 36463 22682 6 -179931 33018 60525 34 -195385 9992 61469 167 -164242 34504 61469 11 -30821 27006 74502 52 -25931 51949 61586 133 -106559 34323 63921 5 -4015 47457 63921 42 -172072 99805 76484 6 -55113 58298 76484 87 -312580 17875 41609 42 -171785 93978 41609 6 -274453 18053 32347 69 -91244 30021 32347 6 -22716 16971 32914 7 -220525 44316 72362 86 -156835 90011 72362 6 -281711 69239 71754 28 -293941 20622 62118 12 -225786 81954 43795 25 -84703 93512 43795 8 -208289 91379 48924 30 -297140 40194 72650 7 -70197 96137 30053 12 -44893 23983 30053 21 -157271 98728 47923 9 -13461 75770 47923 39 -273963 15698 47649 46 -99580 97451 47649 8 -248597 98264 46221 62 -99563 97062 46221 9 -184362 65105 53755 102 -283184 80079 45966 49 -169476 65105 45966 63 -276602 29872 107144 10 -202912 57745 57891 8 -306780 101117 22629 88 -271179 279 29379 47 -50267 5214 58716 7 -292855 15069 12908 6 -294480 23981 70738 87 -56434 76190 44267 21 -160111 10103 29750 9 -216010 16973 47078 7 -127967 81360 47078 7 -26036 53297 62896 8 -99123 88540 72351 10 -45301 28070 72351 20 -274821 19875 42702 66 -317803 51142 48218 8 -249935 104806 47025 8 -312215 16000 22240 12 -36835 14005 21808 10 -243697 74170 73750 8 -347796 112827 39012 11 -12317 59483 39012 12 -310620 8004 40137 50 -69663 85844 40137 12 -303327 85331 67535 12 -69825 89146 67535 12 -185988 76648 67562 12 -206959 85330 64206 22 -254398 14451 75322 49 -156815 89464 75322 12 -125636 61274 59005 11 -350179 35206 60203 13 -187485 84687 60203 12 -351216 60203 35206 13 -4190 49228 58350 11 -24605 37288 19278 8 -254112 13170 35008 9 -210753 102415 41433 30 -179474 29579 67897 10 -7400 3594 29274 10 -22153 10934 55616 15 -107052 38162 53077 11 -23085 20764 53077 11 -260573 53637 58794 9 -260984 57093 95634 10 -321407 78049 63646 7 -267430 95289 71419 39 -128655 95815 40192 11 -14644 7465 40192 11 -272093 5751 46029 9 -110097 55962 23759 10 -12276 59086 23759 10 -344652 55768 7210 11 -44164 16702 7210 37 -349443 23759 8607 12 -237356 26838 8607 12 -344443 49567 55768 9 -22434 14015 55768 10 -341799 7210 49567 8 -52218 26838 49567 8 -289180 110442 59851 5 -352430 87977 87383 10 -27947 84072 87383 7 -141998 75326 86778 6 -14682 8067 86778 6 -193782 200 87977 9 -115984 116671 87977 8 -234265 11558 10359 8 -195138 8572 56712 9 -284229 85448 73269 53 -265146 84709 54244 36 -66791 59601 54244 19 -250779 110990 63647 86 -128184 86181 63647 6 -265348 85806 105029 16 -231910 115372 37763 47 -322838 85534 49639 6 -265288 85462 73342 10 -156692 86790 73342 10 -172303 103212 113829 3 -354216 111683 16782 15 -245914 86230 16782 15 -348888 16782 111683 15 -35874 115161 111683 51 -125395 59887 111684 5 -193354 114962 16783 10 -212191 112990 104398 9 -69627 85151 104398 9 -147150 18540 114985 7 -348430 11110 112775 9 -187992 87012 112775 25 -246222 87890 114989 22 -66943 60483 113290 5 -188511 89374 104389 9 -65322 50552 104389 6 -304209 89399 28812 16 -354249 112775 11110 9 -221245 49681 11110 9 -266604 91569 67935 20 -156161 75076 67935 7 -285171 89668 13447 15 -240336 48224 12084 9 -79650 47859 12084 6 -247630 93828 5767 17 -345046 66353 50073 5 -251580 116737 50073 4 -344465 50073 66353 5 -251367 115219 66353 5 -286598 95929 74554 44 -187748 85921 111097 13 -315238 33113 75041 4 -151954 46987 22672 9 -10282 37320 22672 9 -280677 60982 60802 8 -341367 112826 105032 10 -187759 85963 105032 10 -180698 37298 110025 19 -78037 39205 110025 5 -302869 82420 13448 19 -308271 110831 20330 7 -148309 24768 63947 7 -263548 76116 43301 50 -128870 99916 43301 11 -96610 61857 55110 7 -56629 102289 55110 60 -232631 2186 68804 9 -306996 102289 68734 60 -142289 81900 39288 8 -6515 95312 39288 9 -279186 49131 45782 8 -6188 73108 113291 8 -302691 81696 30867 17 -304061 88771 6305 16 -128956 101632 6305 8 -323658 89406 9061 18 -79796 48741 9061 8 -372643 104390 111098 8 -257944 33931 111098 18 -290063 117375 104390 7 -147755 21786 104390 9 -323640 89313 69935 19 -17682 40895 39343 32 -183497 58270 58048 8 -216165 17745 51853 6 -172258 102759 51853 6 -379033 102759 110026 26 -327280 106719 110026 25 -91818 33392 50671 8 -39996 48032 50671 8 -19799 63105 15456 7 -4294 50173 14871 77 -251879 888 55576 22 -24555 36470 31230 9 -277006 32876 43295 7 -280117 56493 38702 9 -128960 101686 38702 9 -184702 67367 54837 9 -127992 81852 54837 9 -351027 55092 58203 7 -184570 66490 58203 7 -351143 58203 55092 7 -222262 57547 55092 22 -98856 82172 43085 9 -97 5131 43085 34 -128480 92242 54466 8 -1470 21284 54466 21 -278519 43205 105175 18 -227131 89417 105033 20 -6555 102929 54625 32 -188157 87741 73270 11 -364282 73066 23085 9 -50834 12698 23085 110 -99524 96328 65984 12 -37497 20620 65984 11 -174266 1949 44523 11 -99264 91388 44523 11 -323963 90773 55860 24 -54677 53899 70049 30 -2166 27499 101608 51 -33603 57329 31591 29 -273151 11869 23286 46 -300323 66037 56843 11 -315198 32824 53680 9 -272502 8248 108733 9 -246152 87565 11156 11 -113714 87053 11156 11 -334956 112246 54999 12 -226299 85075 54999 12 -323390 88056 111685 38 -113638 85152 111685 9 -331780 54999 112246 12 -207634 88651 112246 37 -350685 47163 16784 14 -206667 83319 16784 94 -348889 16784 47163 14 -12459 61001 47163 10 -41460 64623 113831 10 -2685 32117 45180 6 -142660 90499 68085 9 -53155 38225 68085 40 -177081 16853 30112 35 -22389 13482 29497 9 -224261 72953 45727 11 -299553 59721 12830 13 -139685 59436 12830 11 -227125 89380 35159 10 -113784 88541 35159 11 -284144 84996 116576 40 -303309 85283 113293 29 -143972 109459 113293 9 -290641 2885 29568 54 -228548 95611 73738 17 -171865 95931 73738 18 -335594 10381 47073 14 -306044 97700 47073 22 -337854 47073 10381 14 -223675 68468 10381 13 -54729 54415 39076 6 -38611 31421 52678 48 -325295 96237 62219 64 -157205 97445 62219 7 -22461 14286 62634 12 -338067 51346 49942 9 -281817 69996 49942 10 -337994 49942 51346 9 -13472 76156 51346 22 -187450 84514 38833 81 -265004 83791 39046 8 -186346 78925 73344 34 -109904 54790 73344 10 -318875 59672 54257 11 -99067 87345 54257 11 -234123 10737 62104 49 -56440 76320 111680 21 -182290 49244 55217 6 -280814 62174 72886 8 -7998 13229 61450 8 -208293 91409 49454 15 -20565 74056 55979 30 -305132 93601 11157 14 -227214 89749 10105 26 -319388 63467 19162 7 -285894 92810 50460 95 -231014 108632 84930 27 -113628 84921 84930 52 -304488 90726 101617 20 -115781 114958 101617 6 -185150 70564 113833 12 -22335 12783 70876 4 -340744 99551 59283 9 -50203 2302 59283 9 -27858 76075 70247 20 -317120 46179 69323 8 -88932 17987 80373 4 -335364 6758 16436 6 -212876 252 16436 52 -171843 95222 63648 5 -284908 88506 38320 10 -357323 52451 44280 6 -215118 13130 44280 39 -195691 11632 17254 6 -252109 2368 30697 7 -164107 32947 30697 7 -357004 44280 52451 6 -26888 62442 52451 6 -201898 49808 113294 13 -213232 2545 40905 22 -233043 4622 108651 23 -226598 86634 110767 19 -315475 34230 35535 19 -256120 23364 50364 9 -221011 48261 55547 96 -128884 100198 55547 9 -31705 37109 42485 61 -116206 2817 6307 11 -63392 40189 16786 13 -42988 115412 16786 14 -341913 9063 86780 10 -41016 59485 86780 13 -97308 66267 9063 7 -185895 76141 107053 14 -87446 8867 107053 8 -187698 85685 105031 14 -354619 6307 49640 9 -284433 86201 49640 12 -288030 102473 51109 10 -72208 116592 51109 8 -279955 55153 117142 10 -84528 89995 117142 10 -156408 80046 64207 14 -42848 113476 64207 15 -307576 105802 74999 6 -192002 105801 75000 7 -308090 109452 109449 4 -230573 105815 105827 6 -327190 105814 105828 6 -327021 104362 109504 6 -115090 108864 109504 7 -327600 108864 108865 6 -211655 108792 108791 5 -143912 108842 108791 7 -269935 108842 89512 7 -250467 108866 108863 12 -192118 106577 106580 12 -230875 107809 109695 5 -321008 75376 101586 5 -287878 101569 86781 6 -193273 114382 101654 5 -327601 108867 108868 9 -249740 103430 103428 12 -326565 101578 75424 5 -229928 101606 101603 11 -327671 109437 103119 5 -306870 101577 101582 4 -308095 109461 109462 5 -211252 105590 109417 7 -191365 101580 101581 5 -379198 106899 108671 6 -269897 108672 108671 6 -307992 108778 108779 7 -156167 75177 108779 7 -263422 75177 109503 7 -71029 106901 109503 6 -379268 108671 106899 6 -307723 106901 106899 6 -307664 106579 106578 7 -71036 106992 106578 6 -327319 106992 106990 7 -114994 107845 106990 7 -307859 107845 107846 7 -129535 107824 107846 7 -230882 107824 107825 7 -85609 106579 107825 7 -249381 101576 101575 5 -294413 23575 48130 31 -158265 109991 48130 87 -263375 74945 80738 45 -97184 65524 80738 12 -263791 77576 91185 9 -327315 106966 38012 16 -129344 105848 38012 13 -296653 36970 106918 30 -69954 91437 106918 204 -6487 89074 106342 17 -288639 106403 106402 10 -322787 85297 105035 13 -57592 4564 111681 4 -292296 12263 106583 5 -327669 109412 109415 5 -258717 38860 104101 17 -188248 88083 12318 10 -245910 86221 34615 33 -332225 66819 107193 11 -327371 107318 107317 5 -70162 95369 39829 10 -52019 24985 39829 10 -282612 76080 38920 9 -139220 56605 38920 8 -338212 55332 39522 10 -337610 39522 55332 10 -243972 75808 55332 20 -263895 78248 58253 8 -310161 5532 38849 9 -138868 54564 38849 8 -81928 61382 55080 8 -24615 37401 55080 8 -95380 54601 55855 7 -85345 104122 39004 8 -18891 53614 39004 8 -261592 61730 74106 9 -122165 41191 74106 9 -185589 73993 54541 9 -107192 39067 54541 9 -322461 83387 38829 8 -129231 104722 38829 8 -275286 22709 21563 6 -369452 42853 10317 8 -240576 49702 10317 9 -172022 98861 45374 8 -22397 13595 45374 8 -13317 72578 31677 66 -5943 70438 21292 10 -335501 9061 77862 7 -260527 53320 42245 7 -194123 2542 88592 79 -144352 112740 115603 7 -354618 6305 35677 7 -86870 2810 82537 8 -221896 54931 39066 8 -288974 108746 108747 6 -211253 105602 107944 6 -183071 55222 55634 7 -21732 4340 20954 14 -249347 101359 115604 29 -265528 86672 58246 19 -28895 5375 38784 7 -370391 69932 87687 7 -199798 33854 54447 3 -142876 95309 54447 5 -306108 97967 50705 20 -23275 22772 54678 151 -324174 91599 107893 21 -315770 36093 47585 7 -81747 60202 47585 4 -294658 25029 8850 6 -60148 21043 8850 3 -195332 9570 48702 4 -217650 25755 67478 6 -104384 21910 67478 3 -301833 77256 85622 7 -285135 89560 49294 15 -363219 42403 7323 8 -38032 26022 7323 5 -193748 46 42403 10 -140046 61630 42403 7 -221127 48988 8877 11 -199775 33765 65812 9 -176355 13115 53013 9 -315968 37063 44709 4 -114144 95851 44709 7 -298878 54127 5906 12 -336013 16184 45027 9 -197449 20348 45027 15 -242009 61381 17522 11 -104011 19714 17522 7 -194055 2155 112777 11 -276181 27326 28743 9 -282069 71971 16184 11 -83051 69455 16184 8 -271347 1466 113295 11 -247322 92526 48815 43 -324645 93595 61763 28 -111841 66284 16609 3 -287717 100881 45037 44 -171710 92570 45037 5 -294924 26292 48512 6 -212958 744 67759 58 -213098 1664 78087 17 -290300 982 726 251 -233056 4703 84577 34 -129024 102457 84577 8 -319549 64510 83566 46 -175821 10568 73763 20 -307043 102444 48173 142 -50350 6662 27633 13 -272329 7111 35405 6 -126476 66779 35405 6 -17274 35609 45341 8 -84984 98587 63563 10 -39190 39742 63563 10 -234024 10102 71337 9 -172095 100299 71337 9 -313954 24932 30039 7 -114234 98097 30039 8 -317748 50895 48825 9 -70570 102856 48825 8 -114619 104081 52679 9 -10808 43765 52679 9 -178074 21855 27692 9 -182031 47441 48713 11 -171651 91335 48713 11 -23894 28587 29212 9 -99183 89680 60934 9 -18687 51046 60934 9 -37827 23940 116103 6 -256259 24031 53224 6 -128643 95459 41601 10 -34703 71265 41601 10 -31959 40023 72331 12 -222795 61796 42841 8 -69419 80780 42841 8 -222116 56599 59279 9 -44083 15692 20322 11 -84805 95620 58664 9 -44798 23040 58664 8 -40406 52394 47565 14 -238156 32696 48480 9 -114026 93264 48480 9 -98770 80334 73739 8 -356 9452 73739 8 -232711 2591 70982 9 -172149 101199 70982 9 -8369 17186 31653 9 -164353 35239 71783 9 -36448 9411 71783 9 -262601 69063 9219 9 -171832 94910 9219 9 -55646 64277 20238 11 -185443 72768 43105 8 -83782 74266 43105 8 -276244 27671 59277 10 -119024 22539 20860 7 -17379 37417 20860 7 -25101 43669 41225 10 -8013 13403 72391 9 -198958 28331 32314 8 -312484 17491 61831 9 -172083 100068 61831 10 -224197 72580 72505 8 -172074 99849 72505 9 -14988 11851 71749 11 -156519 82163 72004 8 -8887 22081 72004 8 -171626 90616 31286 9 -22007 9145 31286 9 -197083 18679 68429 8 -171967 97858 68429 8 -291930 10412 50031 9 -84836 96039 50031 9 -309397 779 40073 8 -171747 93420 40073 8 -179382 28860 31550 8 -114480 102373 31550 8 -99456 95122 57966 4 -29620 15082 57966 8 -157273 98767 40088 10 -36243 6159 40088 10 -297064 39452 29437 9 -70000 92176 49846 8 -23638 26112 49846 8 -128490 92496 23280 9 -8835 21645 23280 9 -142610 89695 60162 7 -25320 45580 60162 7 -77850 37803 23398 9 -16075 23075 23398 9 -294735 25432 46113 14 -318873 59665 23205 8 -258716 38850 21246 7 -171838 95123 21246 7 -128525 93171 62342 8 -10384 39143 62342 8 -23522 24934 46744 11 -142290 81911 40564 9 -14401 1931 40564 9 -295694 31491 47260 8 -157383 101015 47260 8 -143024 98477 69553 9 -54392 50877 69553 9 -143297 102897 62824 8 -31302 31565 62824 8 -4822 56445 69331 10 -258311 36061 70503 9 -99511 96146 69871 9 -33206 52664 69871 10 -274910 20303 117146 4 -121062 34698 43924 8 -5993 71077 43924 8 -175377 8072 54085 10 -275577 24466 61374 9 -127693 75349 61374 9 -37677 22478 48206 9 -295274 28143 50994 13 -276807 31831 11083 9 -142797 93804 11083 10 -84908 97121 31669 8 -44700 22097 31669 8 -193765 142 76478 10 -120946 33391 76478 10 -274917 20342 32332 6 -280172 56953 35680 9 -147035 17887 35680 9 -38822 34718 9901 7 -312487 17525 22917 9 -99321 92643 22917 9 -256654 26028 30374 10 -258432 36702 63587 10 -171737 93184 63587 10 -16135 23607 47807 8 -221667 53089 60785 9 -143164 101083 60785 9 -295955 33179 52466 8 -142704 91310 52466 8 -178393 23710 40686 8 -143064 99171 40686 8 -202931 57850 30435 10 -25724 49705 68842 6 -258732 38951 43978 11 -39325 41015 70356 13 -693 13098 49824 12 -196082 13744 51011 15 -260164 50490 32588 14 -45708 32063 27866 18 -157371 100745 40900 14 -14961 11569 40900 15 -215999 16924 24358 12 -223601 67946 46156 11 -272706 9399 32915 10 -10454 40038 72147 13 -15974 22113 28617 9 -314400 27011 73001 4 -83705 73513 73001 7 -295419 29099 18600 9 -44147 16515 42025 8 -273230 12249 32465 10 -238446 34247 61339 33 -293628 19052 52270 8 -7665 9331 52289 11 -267466 95417 44945 35 -21796 5575 38688 66 -239898 44400 36678 13 -8054 13908 57514 12 -311937 14674 47070 11 -69023 74351 47070 11 -114315 99900 52600 10 -53795 44770 52600 10 -48032 60065 42762 10 -234887 14593 64800 9 -23584 25534 15413 12 -36959 15322 30829 11 -243187 70125 59801 11 -23021 20048 75475 10 -220844 47144 47047 9 -84609 91743 47047 9 -1067 17214 46785 11 -298929 54611 49749 8 -164118 33015 49749 7 -214401 9322 23206 11 -38316 28600 22277 9 -194602 5676 64088 13 -98765 80165 64088 12 -99873 102445 51280 11 -51882 23689 51280 11 -8593 19306 30281 9 -255375 19059 28177 11 -128909 100818 65574 11 -44614 21189 65574 11 -29972 18868 28611 9 -177763 20033 49841 10 -29555 14125 63116 7 -198777 27242 59709 11 -15094 13120 61285 9 -290535 2326 50010 13 -128030 82647 50010 12 -29800 17212 69752 6 -188332 88501 104420 9 -201540 47387 60723 11 -317513 49120 34850 10 -204882 72612 54299 10 -128851 99658 54299 10 -143017 98395 61222 9 -50222 3057 61222 9 -214891 12185 22234 9 -99646 98578 22234 9 -85119 101104 42698 10 -51678 21656 42698 10 -241745 59335 30029 8 -31485 33918 65376 10 -48529 66386 30643 11 -214301 8851 28851 10 -157487 102604 28851 10 -15614 18746 43701 10 -218604 31466 41371 9 -142659 90485 41371 9 -28886 5231 51104 9 -295347 28567 54060 14 -62501 33764 58092 8 -37249 18212 58092 9 -258860 39780 21991 12 -184428 65614 34946 9 -29027 7821 600 7 -836 14979 28900 7 -198633 26653 117161 8 -38337 28761 36701 7 -261959 64273 110045 7 -32168 42050 63023 8 -18005 44476 50862 8 -236932 24906 115623 10 -51873 23609 66729 7 -41511 65490 48779 7 -237288 26535 43136 8 -32792 48471 59503 11 -320194 69285 42309 10 -142732 92139 44245 11 -32764 48188 44245 11 -241231 55024 46372 11 -233610 7844 76448 10 -313848 24415 44553 10 -33345 54443 114431 15 -184712 67416 47621 14 -52917 34786 29356 11 -1791 24147 28463 9 -9119 23975 49643 8 -37149 17132 46872 9 -18570 49967 40784 10 -181204 40679 69020 8 -228468 95247 56819 13 -280481 59217 46951 10 -241932 60878 57023 11 -276630 30104 41399 12 -239217 39087 61327 10 -98526 74951 61327 10 -113928 91481 63934 10 -22579 15606 63934 10 -196978 18183 36679 12 -207246 86848 117162 13 -125242 58919 117162 12 -128316 89163 71980 12 -28331 111522 71980 12 -25384 46158 111705 9 -176863 15738 56753 11 -99594 97676 56753 11 -274212 16760 43943 9 -18461 48650 23465 10 -291423 7508 58219 8 -273589 14066 30962 10 -171642 91011 30962 10 -297343 41626 54053 11 -114366 100758 52637 12 -50859 13047 52637 12 -182271 49118 30587 9 -22895 18771 22762 11 -171842 95212 64363 7 -45507 29905 64363 8 -255641 20608 112257 9 -69387 80092 55381 9 -9334 26116 55381 9 -214463 9715 60400 8 -28974 6819 71537 12 -217083 22646 40502 9 -164105 32939 40502 9 -297261 41124 49929 11 -33756 58999 68611 9 -220368 42854 66101 9 -300787 69423 36681 8 -128500 92675 36681 8 -114325 100087 48926 10 -22775 17545 48926 10 -299749 61489 46864 7 -171145 80276 10847 8 -23726 26957 10847 8 -278766 45602 61552 10 -48556 66853 29133 8 -196217 14589 53097 10 -98594 75536 53097 10 -255981 22622 20638 10 -84847 96171 70223 10 -10154 35088 70223 10 -157268 98680 40868 11 -50780 12071 40868 11 -142866 95124 49782 11 -29114 9073 49782 11 -199017 28630 45048 8 -99605 97818 45048 8 -142881 95432 36680 8 -9399 26701 36680 8 -179274 28170 45661 9 -69921 90905 45661 9 -15007 12011 40018 9 -114312 99798 53142 9 -26601 59517 53142 8 -280836 62295 71981 9 -659 12725 40262 12 -99756 100627 31090 8 -22960 19359 31090 8 -1350 20130 23935 9 -30024 19450 46662 10 -5544 64856 71997 11 -56331 73257 32292 10 -32160 41963 63922 9 -258390 36456 68453 11 -85198 102314 68453 11 -175709 9792 44469 12 -69365 79072 44469 11 -177617 19417 39611 10 -9993 32155 35541 9 -294283 22773 59325 8 -262778 70296 110048 13 -45455 29546 40067 10 -328295 113914 51374 18 -142310 82412 50276 10 -51115 16243 50276 10 -29527 13676 60679 12 -233077 4825 21930 10 -15088 13080 30241 10 -200259 36449 42020 12 -45717 32151 59645 7 -22979 19549 28998 7 -235595 17846 33107 11 -201009 41982 47816 10 -220939 47763 56678 11 -84551 90502 56678 11 -24905 40940 10126 11 -214103 7833 45765 6 -182926 53865 53238 12 -25018 42258 31561 11 -34052 62348 44325 11 -286572 95752 47450 9 -191253 101102 72643 16 -325980 98920 112258 9 -322498 83608 110467 12 -113771 88289 110467 12 -180163 33960 32357 10 -70841 105193 48496 9 -27461 70422 48496 10 -30250 21583 21965 10 -204726 71587 46551 7 -276139 27089 42327 14 -1043 16935 111708 7 -300143 64642 114434 13 -21891 7072 54082 9 -38115 26724 34987 11 -177604 19329 65628 14 -70554 102661 65628 12 -36862 14292 49078 11 -239914 44587 71998 13 -24718 39056 56697 13 -275764 25254 44127 11 -114184 97051 44127 11 -8982 22807 28695 9 -63402 40251 72590 8 -913 15763 72590 8 -253391 9459 47085 10 -198007 23481 53621 9 -159481 5656 61307 8 -46811 45952 61307 8 -127897 79818 43065 10 -50901 13675 43065 11 -8108 14584 30346 10 -275832 25572 116634 9 -45181 26878 70453 9 -45820 33807 32384 11 -279473 51110 61877 10 -99433 94705 61877 10 -157376 100914 70520 10 -36658 11886 70520 9 -314796 29719 57273 12 -300130 64576 28361 10 -157066 94342 28361 10 -156975 92560 21841 10 -32980 50332 21841 9 -41387 63755 59046 11 -164221 34061 72361 12 -19312 58123 72361 11 -237638 28286 43437 10 -99510 96122 43437 10 -29588 14552 76459 11 -256763 26488 72436 8 -84610 91785 72436 8 -298147 48564 70162 11 -79511 47165 70162 11 -8389 17389 63087 10 -113400 80157 42201 11 -52505 29476 42201 11 -70330 99383 41080 10 -48920 71916 41080 10 -199305 30912 66676 7 -5103 59979 20801 12 -1082 17455 116635 14 -238657 35648 20848 13 -291828 9717 53115 12 -292188 11640 71598 6 -70515 102160 71598 6 -53708 44007 30165 7 -319041 61043 23530 5 -74735 19591 23530 5 -242014 61464 30120 8 -30129 20561 54191 6 -305780 96565 73081 11 -176531 14002 68024 9 -275238 22389 70933 7 -254875 16822 54314 9 -172135 101020 54314 9 -157159 96556 50711 9 -51849 23427 50711 9 -136555 41112 44289 7 -3906 46463 44289 7 -176518 13934 42931 7 -6156 72774 47424 8 -214757 11532 62707 10 -279294 49784 47082 11 -195960 13151 27933 12 -272927 10804 70999 22 -25701 49434 40774 13 -94312 48393 30283 7 -47110 48985 30283 8 -299065 55958 112259 8 -128028 82595 42971 10 -4586 53796 42971 9 -200003 34764 69918 9 -157218 97701 69918 10 -99232 90752 59242 10 -14844 10100 59242 10 -175358 8036 60133 10 -128428 91434 60133 10 -311213 11328 67162 13 -99545 96699 67162 13 -14886 10510 68192 11 -222239 57443 58129 11 -43778 12395 65228 8 -10728 42726 41871 10 -221689 53300 46869 10 -318660 57807 49485 9 -142907 95912 49485 9 -222849 62107 60346 10 -171876 96173 60346 10 -97500 67939 25098 8 -740 13760 25098 9 -292244 11949 30137 10 -312561 17826 29426 8 -70260 97745 29426 8 -275585 24520 66237 9 -157113 95557 66237 8 -197665 21537 56458 11 -172193 101798 48248 9 -32220 42640 48248 9 -2790 33813 71581 9 -178743 25401 29782 8 -171260 82535 29782 8 -25631 48504 28278 12 -51593 20724 48118 6 -45991 36509 45972 8 -257687 32821 59280 8 -65877 53844 59280 8 -30658 25411 40286 10 -179395 28966 52725 10 -128573 94250 52725 10 -50204 2321 73009 8 -332184 65712 72711 11 -37849 24228 72711 23 -320576 72002 62007 13 -220646 45560 31386 11 -48703 69346 58994 8 -25151 44119 31086 11 -195360 9738 56593 11 -16358 25551 55101 9 -202044 50912 104422 8 -311574 13140 16913 12 -99383 93892 16913 12 -70325 99329 39600 11 -15187 14470 39600 11 -255727 21066 30322 6 -236838 24478 117720 7 -183276 56719 54796 8 -114620 104083 54796 8 -50533 9125 46379 9 -194513 5199 65251 10 -292464 13247 64431 12 -52884 33685 64001 11 -278912 46938 42074 13 -2915 36116 58231 7 -40850 57487 112794 15 -46577 43629 62976 6 -36657 11848 63085 6 -53339 40159 62886 5 -310603 7956 52588 9 -312226 16056 34891 7 -4665 54691 23660 175 -215591 15133 35000 8 -655 12706 72790 11 -45043 25453 73002 8 -195032 7959 52071 9 -983 16406 57190 10 -22902 18848 43450 12 -52772 31922 44489 7 -200031 35082 61893 10 -294281 22763 40661 11 -91928 34473 40661 10 -46630 44176 54834 7 -217068 22510 54500 7 -25444 46589 56835 6 -281093 64544 59628 11 -220724 46170 10363 9 -292040 10899 61431 10 -77829 37549 61431 9 -183004 54612 71686 9 -84734 94123 71686 9 -29743 16490 29549 7 -23840 28106 28915 9 -16815 29803 30393 10 -315276 33327 46065 12 -84647 92498 46065 11 -252562 5019 61050 11 -2030 26317 40887 8 -57121 113979 117164 12 -238011 31636 65523 9 -128185 86185 65523 9 -43672 11277 31363 8 -37945 25175 76762 11 -204302 68194 41745 9 -56398 75142 40350 10 -296886 38353 27720 11 -236921 24860 41648 12 -17833 42509 45160 12 -280880 62685 44473 7 -253962 12462 70293 11 -23773 27436 58955 6 -292850 15055 27480 8 -175146 6817 63564 10 -114375 101041 63564 11 -114323 100066 60300 11 -14488 5144 60300 11 -102275 9580 30550 10 -38933 35930 30550 10 -314117 25661 54843 9 -120890 32851 54843 9 -114052 93782 46066 7 -38012 25811 46066 7 -36379 8410 47202 10 -235663 18247 61894 8 -114866 106509 61894 8 -18292 46983 46048 6 -202689 56300 31139 7 -201285 45058 46159 10 -200786 40129 72314 8 -164155 33385 32484 9 -7517 6960 32484 9 -214182 8283 56154 10 -120918 33114 41051 12 -30225 21297 41051 11 -221801 54202 58585 13 -171167 80731 58585 14 -26423 57648 43767 9 -299113 56291 31617 11 -118775 21327 31617 11 -70240 97169 30670 11 -7604 8426 30670 11 -25120 43886 42919 9 -175932 11195 9899 11 -69372 79521 9899 11 -99733 100259 68631 14 -11475 50371 68631 14 -291287 6828 44885 9 -140274 63104 44885 5 -10012 32315 72465 10 -363474 49380 115626 11 -137922 48739 115626 14 -21088 110753 115626 7 -99365 93482 75494 12 -27563 71365 75494 12 -314822 29859 43325 11 -171828 94851 29178 8 -53061 36520 29178 9 -201278 45016 55604 10 -121033 34265 55604 10 -172100 100433 30941 10 -4979 58428 30941 9 -194792 6763 62699 11 -128841 99360 62699 11 -222211 57251 31750 13 -99241 90913 58815 10 -6178 73010 58815 11 -202511 55022 43458 12 -128497 92617 43458 12 -37293 18739 113308 14 -304591 91261 111124 32 -272223 6529 31318 9 -99203 90103 31318 9 -127937 80675 64833 7 -37739 23157 64833 7 -276350 28276 49297 10 -76781 30181 49297 11 -237240 26277 31216 11 -99512 96147 31216 11 -171142 80202 9710 9 -41385 63733 9710 9 -255551 20068 39260 12 -276610 29915 51825 9 -156881 90908 51825 9 -127939 80700 28209 7 -44982 24801 28209 7 -20212 69512 21760 11 -39674 44719 54251 9 -278053 39226 4399 12 -175611 9379 64910 9 -24760 39505 22670 7 -242506 65284 72624 9 -142875 95300 72624 9 -36630 11616 39855 11 -177727 19861 34818 9 -84725 93913 34818 9 -26183 55087 72023 5 -201110 43005 23203 9 -99761 100694 23203 9 -278941 47274 74203 8 -37562 21366 37124 8 -1830 24484 22269 9 -200647 39115 44734 10 -38263 28113 61193 9 -50484 8440 10375 9 -217004 22190 31607 11 -128640 95436 31607 11 -84747 94314 52697 8 -33478 55925 52697 8 -46050 37515 59757 7 -261748 62853 28918 9 -316514 40843 22599 10 -274681 19286 35064 10 -198291 24841 43592 11 -274317 17322 48029 11 -50527 9060 54482 8 -313185 20756 106548 6 -157387 101063 31167 7 -53177 38518 31167 7 -142261 81365 30105 10 -44451 19750 30105 9 -10351 38678 58267 8 -156494 81649 29922 10 -498 11242 29922 10 -237850 30123 57814 11 -136040 37796 57814 10 -215055 12852 57280 8 -113902 90993 57280 8 -8528 18752 44660 7 -36973 15483 104423 8 -320622 72329 60104 7 -127839 76841 60104 7 -15708 19642 54117 9 -225250 79727 67918 5 -64627 46632 33123 5 -39004 37063 33123 3 -220042 40054 50852 11 -85108 100929 50852 11 -21704 2139 59560 13 -36369 8312 116636 10 -176651 14605 70953 11 -112530 71190 70953 10 -84694 93370 40514 9 -38100 26532 40514 8 -177331 18051 31439 12 -32029 40689 48892 9 -197564 21102 31101 10 -114621 104090 31101 10 -240033 45739 72620 9 -128373 90372 72620 9 -84798 95501 46363 11 -56131 71126 46363 11 -262988 72014 32476 11 -53978 46516 61751 9 -214157 8112 57511 12 -69983 91935 39584 12 -41448 64489 39584 12 -197823 22368 39425 4 -99211 90347 39425 8 -98881 82931 34948 7 -45487 29728 34948 7 -296694 37214 66396 9 -196361 15310 72816 8 -113919 91301 72816 8 -44051 15360 45002 9 -98863 82366 53941 7 -19449 59458 53941 7 -300342 66107 54467 10 -128333 89605 54467 10 -37079 16508 75505 10 -37392 19798 9564 9 -315383 33791 30052 10 -114095 94728 30052 10 -172007 98627 42065 8 -12376 60074 42065 8 -128886 100296 40872 8 -52256 27227 40872 8 -294359 23277 64585 8 -321674 79726 50903 12 -84606 91692 50903 11 -113853 89926 39861 11 -146 6245 39861 12 -257482 31448 35048 12 -30867 27350 69335 9 -233679 8284 46122 11 -85102 100856 42330 9 -44306 18242 42330 9 -869 15375 46628 6 -15691 19499 29850 9 -291297 6865 30478 10 -593 12087 59540 10 -221182 49291 112261 11 -298110 48232 44845 9 -171269 82819 44845 9 -84114 80911 40440 9 -26076 53725 40440 9 -34718 71442 30206 12 -314046 25354 62041 10 -157266 98636 62041 10 -113147 75255 64096 10 -8144 14970 64096 10 -171687 91996 65888 11 -38315 28594 65888 11 -218712 32285 55484 12 -127925 80412 55484 12 -30883 27603 64803 9 -312986 19804 30662 7 -314982 31307 70769 6 -13435 75221 40854 7 -314862 30222 52120 5 -4047 47711 40367 8 -214162 8142 68780 5 -105482 27791 15307 6 -3219 39848 15307 6 -260908 56430 110052 6 -52085 25643 71836 9 -949 16090 40122 7 -30569 24473 63754 8 -47130 49411 69704 8 -282633 76212 88963 7 -271886 4658 44444 8 -297875 46217 35109 7 -241687 58677 23159 8 -111099 61713 55394 8 -56517 84675 55394 9 -114279 99096 40759 9 -44918 24260 40759 9 -55536 63072 68614 8 -310639 8073 32679 7 -10642 41879 42886 8 -42321 86323 108715 14 -271739 3882 39139 10 -7543 7300 54973 10 -1623 22492 72582 8 -45252 27657 60016 5 -29518 13590 51436 10 -177762 20015 43237 10 -258290 35956 114437 6 -242763 67059 63217 10 -295942 33142 29644 7 -310819 9081 117722 12 -8840 21677 42518 7 -316269 38913 29236 9 -276302 28001 52157 5 -99597 97706 48553 7 -29247 10503 48553 7 -17373 37360 31623 6 -55030 57299 69775 7 -35080 78474 68632 7 -47868 58398 28189 6 -22953 19292 43626 8 -36897 14764 62241 8 -24673 38494 66597 9 -236118 20436 23060 10 -163594 30018 23060 11 -179415 29108 46567 10 -10049 32753 63912 7 -275365 23183 52092 16 -298106 48171 50571 7 -269719 107485 113309 8 -298601 51917 50694 6 -253302 8994 110051 7 -123670 49819 110051 6 -5821 69118 45961 8 -196927 17929 49070 7 -120343 29742 68975 4 -31483 33854 68975 2 -182173 48383 76728 6 -4840 56688 29313 7 -3030 38039 37997 7 -272531 8427 110053 8 -275563 24401 54823 6 -297191 40536 51358 8 -312547 17794 45980 6 -257113 28273 18341 59 -228136 93850 10303 25 -280105 56315 60194 8 -297663 44098 38621 7 -54199 48682 24385 7 -171210 81620 48538 8 -26449 57941 48538 8 -279947 54964 44730 8 -87730 10902 44730 7 -184189 63824 43728 9 -30064 19772 10134 8 -309661 2498 16354 5 -240224 47373 57388 12 -176062 11747 44125 7 -44098 15807 56106 7 -178722 25362 58743 11 -40034 48352 10054 9 -157027 93580 59621 9 -37819 23866 59621 10 -157189 97191 49253 8 -31409 32516 49253 8 -9066 23529 41040 9 -299970 63305 40133 5 -240804 51516 42851 9 -177738 19898 29000 8 -174 6739 59850 9 -22408 13738 62782 9 -274072 16221 46017 8 -217753 26229 61871 7 -197700 21705 53275 9 -29594 14682 38760 5 -179874 32825 42469 9 -41118 60489 41070 9 -33310 53967 31540 9 -17141 33376 28791 10 -232648 2302 40147 8 -28824 2143 40316 9 -237137 25809 29326 7 -311194 11240 10020 9 -91912 34132 10020 9 -314006 25196 41185 9 -171668 91645 41185 9 -99674 99138 43813 9 -8241 15901 43813 9 -121030 34192 54364 9 -32162 41999 54364 9 -260838 55923 42442 11 -143144 100888 42442 11 -14885 10505 64117 12 -181857 46182 29849 12 -290180 307 66403 11 -171802 94293 63365 14 -19589 60964 63365 14 -281850 70156 62366 11 -70172 95566 62366 11 -273552 13940 55699 10 -114205 97493 20640 11 -50195 1896 20640 11 -98763 80142 40386 11 -44 3045 40386 11 -273782 14919 49631 8 -98789 80638 56355 9 -52554 29900 56355 10 -255095 17713 50766 11 -214474 9789 64421 10 -4994 58621 47788 11 -52229 26939 28885 11 -241393 56454 43013 10 -41317 62979 71629 12 -37917 24968 59761 10 -215122 13142 46548 10 -282334 74176 59073 10 -44739 22499 30377 9 -260139 50328 34870 9 -171163 80636 34870 8 -223292 65512 41082 7 -84558 90683 41082 7 -56699 104639 113854 9 -33052 51088 48683 9 -198766 27195 47991 8 -202077 51261 67360 9 -58971 14568 67360 5 -237231 26246 64048 10 -18400 48050 66550 9 -313629 23218 56415 10 -142766 92833 64133 9 -37622 21977 64133 9 -99530 96420 50410 11 -44041 15287 50410 10 -311012 10413 58179 9 -69876 90091 58179 8 -240367 48449 43693 8 -32298 43644 43044 8 -10374 39009 63344 8 -281617 68622 39481 12 -488 11170 70121 12 -246103 87308 34626 11 -65997 54507 34626 11 -150737 40323 38922 11 -43296 5518 38922 12 -283900 83495 106925 11 -142484 86452 106925 11 -168385 58582 106732 12 -47516 54056 106732 12 -261185 58443 69395 9 -232713 2594 68080 11 -171116 79495 68080 10 -47890 58577 46903 10 -313524 22718 59132 12 -117673 15010 59132 12 -254149 13352 50743 11 -73016 9508 50743 11 -113875 90431 23429 13 -36109 1636 23429 13 -69460 81924 58808 11 -11290 48234 58808 11 -273545 13918 55229 10 -98806 81011 55229 10 -2752 32897 112263 9 -276853 32116 59799 8 -198871 27670 43863 5 -4736 55451 39719 10 -9076 23601 30046 11 -224156 72173 40359 7 -195859 12636 23236 10 -8201 15532 21039 10 -236523 22711 10402 9 -37837 24089 10332 9 -44042 15298 54746 12 -193838 532 59148 11 -2499 30458 64190 9 -376199 55812 64827 12 -252696 5775 64827 12 -311277 11728 55194 12 -77420 33830 55194 12 -176452 13646 38407 10 -84669 92940 38407 10 -12725 64339 53411 12 -261613 61909 30279 13 -313066 20170 72151 13 -10312 38029 10321 13 -170820 74404 62126 13 -36246 6193 62126 12 -294655 25018 69298 14 -199102 29346 51037 15 -114326 100089 51201 12 -47226 50469 51201 11 -36188 5123 23506 13 -252064 2019 54397 15 -30876 27523 30803 11 -317755 50926 30138 9 -142709 91369 30138 9 -253413 9588 60169 9 -171656 91413 60169 9 -43663 11206 22320 12 -15370 16344 65274 9 -128453 91847 45118 10 -39040 37587 45118 9 -298573 51683 52128 9 -256859 26975 64909 10 -297004 39183 29408 7 -19848 63774 68687 11 -1407 20652 52586 7 -195614 11332 69180 12 -256129 23420 29948 11 -44056 15397 60902 11 -157137 95985 31177 11 -14711 8451 31177 10 -182629 51514 72492 8 -50318 6201 43233 7 -70018 92510 40385 9 -43906 13880 40385 8 -175876 10898 22990 9 -164130 33140 22990 9 -142755 92672 41177 8 -12561 62323 41177 8 -215361 14201 69478 8 -114252 98447 69478 8 -36235 6032 50222 9 -255553 20091 50315 8 -8643 19851 59477 9 -224237 72832 68071 8 -70196 96116 68071 8 -14378 206 68330 9 -294028 21177 34973 8 -234804 14148 31068 8 -153294 55298 54962 8 -221719 53496 54387 7 -121663 38733 54387 8 -301135 72058 30560 8 -84865 96383 30560 8 -80858 55112 55633 9 -56352 73938 55633 9 -232539 1675 55834 9 -136126 38625 55834 9 -7395 3440 71096 9 -50226 3496 23044 9 -279347 50125 31411 7 -299696 61019 59032 6 -15100 13219 20740 7 -34515 69089 65692 6 -214641 10891 61310 8 -234710 13666 47629 7 -217821 26515 44597 10 -20170 68895 58183 10 -174367 2515 60651 8 -237802 29691 31879 9 -261685 62395 31227 10 -167741 54944 59691 7 -17896 43290 59691 7 -238988 37638 62057 10 -92478 38633 62057 10 -204109 66876 60564 8 -153292 55282 60564 8 -281513 67822 44471 8 -142208 80070 44471 8 -143247 102205 30753 7 -53049 36421 30753 7 -297102 39852 9990 9 -156884 90921 9990 9 -69967 91650 66624 8 -36294 7263 66624 8 -199300 30885 35999 9 -12895 66852 30158 8 -150974 41688 63901 7 -50996 14995 63901 7 -177343 18119 46885 9 -156872 90749 46885 8 -299563 59815 68548 7 -143003 98104 68548 7 -142878 95344 28999 9 -15509 17694 28999 9 -171767 93741 10009 8 -52395 28461 10009 8 -257127 28374 44482 8 -203849 65067 72772 8 -15123 13565 41945 9 -36682 12204 51469 8 -1382 20415 43656 9 -202282 53015 30487 11 -199146 29649 31127 11 -16236 24535 45730 11 -142887 95567 30969 11 -71 4496 30969 11 -297964 46982 45523 9 -148297 24687 45523 9 -254047 12788 50430 8 -310460 7276 30473 10 -149871 34108 30473 10 -156870 90737 72429 8 -22385 13420 72429 8 -293105 16270 47270 7 -70569 102836 47270 7 -93859 45957 26511 6 -50345 6563 26511 6 -176746 15151 65294 7 -143114 100147 65294 8 -171770 93755 22556 7 -45608 30999 22556 7 -254425 14618 35998 8 -85200 102360 35998 8 -114253 98511 72972 7 -37899 24732 72972 7 -198760 27179 73424 9 -98814 81374 73424 9 -99661 98866 55373 8 -1275 19351 55373 8 -276860 32195 48309 7 -157347 100212 48309 7 -59095 15255 44237 6 -40477 53293 44237 6 -177640 19519 54621 8 -171220 81766 54621 8 -143268 102436 31234 7 -22814 17898 31234 6 -171703 92376 60961 10 -4024 47535 60961 10 -176392 13325 56658 9 -69376 79724 56658 8 -156876 90884 75437 7 -24883 40709 75437 7 -198280 24789 62575 9 -99310 92413 62575 9 -316196 38528 40043 7 -99893 102839 40043 7 -135772 35702 50245 8 -38031 26021 50245 8 -314776 29627 16834 6 -148753 27322 16834 5 -113849 89866 29264 8 -10780 43362 29264 8 -84693 93369 65951 7 -2117 27066 65951 7 -312978 19752 21866 7 -128438 91697 21866 7 -160514 12731 9355 6 -31849 39144 9355 6 -198064 23761 22205 7 -84516 89784 22205 7 -318196 54147 9907 8 -128787 98188 9907 7 -319315 62990 43784 7 -171149 80360 43784 7 -113865 90251 59974 7 -30425 23248 59974 7 -100044 104623 30794 9 -5475 64023 30794 9 -90852 28040 22628 8 -10636 41839 22628 8 -264153 79737 61329 8 -168834 61014 61329 8 -153391 55980 61015 7 -3006 37657 61015 7 -277844 37963 39785 9 -95588 55835 39785 9 -243476 72290 25298 7 -59631 18249 25298 7 -139024 55508 55185 8 -275029 20971 11597 6 -154206 61358 11597 6 -70313 99115 63849 8 -29965 18770 63849 8 -171197 81318 32043 6 -43547 9520 32043 7 -252092 2175 45116 8 -111823 66118 45116 8 -240773 51249 63122 7 -128751 97502 63122 7 -128443 91752 53141 10 -44196 17056 53141 10 -99701 99625 45387 8 -9315 25975 45387 8 -201240 44546 47751 6 -97640 68997 47751 6 -183162 55838 11997 5 -106893 36870 11997 5 -114067 94105 28059 8 -45111 26183 28059 8 -217242 23482 48843 8 -99501 95900 46358 6 -45511 29935 46358 6 -186173 77786 55894 8 -96494 61128 55894 9 -279736 53385 61341 8 -107243 39287 61341 7 -213952 6845 43909 7 -157132 95908 43909 7 -96507 61223 54412 9 -3007 37658 54412 9 -153273 55186 39125 8 -273688 14463 35695 6 -99182 89675 35695 6 -84952 97895 63215 7 -43843 13084 63215 7 -121485 37429 76477 7 -14613 6970 76477 7 -197318 19711 64837 9 -9575 28623 64564 9 -22285 12252 30708 9 -254061 12862 42810 10 -84184 82271 42810 11 -218269 28756 30981 11 -128742 97301 30981 11 -3021 37900 72713 10 -254928 17082 62023 10 -99292 91964 57725 10 -39749 45472 57725 10 -215974 16855 49316 9 -99248 91045 49316 9 -256734 26373 10307 8 -84979 98472 10307 8 -143022 98434 41610 10 -12207 58325 41610 10 -128527 93227 72119 8 -22013 9226 72119 8 -314443 27237 55155 8 -43370 6700 44392 10 -242531 65461 41503 7 -69855 89751 58514 12 -30698 25787 58514 12 -292863 15096 61849 9 -172056 99515 61849 9 -198130 24062 39599 8 -143414 104054 39599 8 -171733 93027 49941 9 -34674 70873 49941 9 -99657 98823 44881 9 -15016 12122 44881 9 -313022 19969 51317 10 -157024 93495 51317 10 -143089 99580 10306 10 -23533 25113 10306 10 -113484 81994 62705 10 -12171 57885 62705 10 -33998 61728 33059 10 -279849 54133 32580 6 -185411 72483 40457 9 -65586 52118 40457 8 -99315 92486 44070 9 -33085 51447 44070 9 -235716 18481 16176 7 -131664 11386 16176 7 -298476 50855 29501 9 -197652 21472 16597 7 -22401 13620 62516 9 -292656 14180 47011 9 -1624 22507 54647 7 -276410 28670 27735 8 -99491 95789 27735 8 -171686 91995 10336 8 -38966 36398 10336 8 -85005 99216 57586 8 -1792 24160 57586 9 -167211 51976 31524 6 -37223 17971 31524 6 -281643 68868 60549 9 -45618 31137 40596 9 -253881 12067 38003 6 -110411 57816 38003 6 -196477 15932 30126 5 -74702 19361 30126 5 -70262 97859 28200 8 -22799 17748 28200 8 -87522 9485 63681 6 -34434 67929 63681 6 -256013 22784 46486 7 -85109 100933 46486 7 -345770 82727 12844 10 -282971 78573 1950 112 -318989 60658 86782 8 -1312 19724 2761 10 -7404 3805 49221 10 -276059 26683 125 10 -181753 45472 75219 10 -241865 60377 37916 21 -127953 80901 37916 25 -359360 94250 47912 9 -202782 56900 47912 7 -338574 64429 27629 7 -182194 48504 27629 8 -347140 99216 24797 8 -38324 28670 24797 9 -331691 51976 17108 6 -29940 18481 17108 7 -310274 6242 94658 7 -138687 53415 94658 6 -24350 32876 62073 9 -241812 59952 72692 8 -128513 92934 72692 8 -170208 70380 45238 9 -12176 57933 45238 9 -293707 19466 62535 9 -39976 47781 59245 9 -232919 3805 27474 9 -136788 42492 27474 9 -142994 97909 40164 10 -28856 3785 40164 10 -171118 79580 47870 10 -240518 49227 31368 9 -143049 98864 31368 9 -142972 97322 71179 11 -8084 14298 71179 11 -252125 2467 10848 10 -128367 90271 10848 10 -252305 3535 30714 9 -113870 90340 30714 9 -279617 52470 62398 9 -99407 94295 62398 9 -99627 98251 43945 10 -26151 54659 43945 10 -172181 101684 61023 9 -41423 64215 61023 9 -313280 21265 45269 8 -44012 14936 27627 7 -235987 19724 28820 8 -128036 82727 29540 10 -161056 16459 30639 11 -38111 26683 30639 11 -50794 12232 53950 12 -310139 5394 21803 10 -84769 94686 21803 10 -69499 82458 55370 11 -54426 51194 55370 11 -23191 21958 56158 6 -290507 2178 27905 10 -99426 94603 27905 10 -99178 89641 21933 10 -36180 4778 21933 11 -240726 50827 43826 11 -172130 100965 43826 11 -310261 6189 52312 10 -171187 81144 52312 9 -279417 50675 34847 9 -114154 96164 35006 12 -28868 4680 35006 12 -106451 33020 21801 10 -47854 58209 21801 11 -55911 68486 29318 9 -235658 18229 53593 11 -195860 12662 70987 8 -99186 89710 70987 8 -70367 100143 54200 12 -43206 2124 54200 11 -142250 81107 46665 9 -10297 37537 46665 9 -257503 31682 54535 10 -117928 16560 54535 10 -292442 13112 30252 9 -156498 81707 30252 9 -128907 100779 47602 11 -29508 13469 47602 11 -143085 99520 38653 10 -22575 15535 38653 10 -294806 25823 65658 5 -848 15108 48661 5 -253747 11546 22810 10 -128006 82150 22810 9 -6222 74213 51900 9 -256558 25573 60597 9 -114296 99506 60597 9 -234825 14241 58213 8 -113868 90311 58213 8 -128547 93582 60966 10 -1 59 60966 10 -98829 81634 43625 9 -32636 46820 43625 9 -212838 117790 46237 9 -273182 12031 53817 8 -48178 61934 39789 10 -36338 7911 60095 8 -215084 13000 38215 10 -157311 99493 38215 10 -281521 67912 37147 9 -143062 99157 37147 9 -155353 69276 56532 12 -26714 60772 56532 12 -172049 99352 60012 10 -16536 27389 60012 10 -8745 20733 56407 9 -292907 15291 27430 8 -233848 9113 52387 8 -99390 94023 52387 8 -171177 80960 44890 10 -904 15667 44890 10 -487 11125 43051 9 -234685 13519 72145 10 -171174 80900 72145 10 -180494 35988 62195 10 -102269 9525 62195 10 -17564 39716 64687 10 -198193 24439 59471 10 -142272 81685 59471 10 -276001 26377 58471 9 -84178 82121 58471 9 -172087 100131 44514 10 -5945 70460 44514 10 -171751 93469 39722 8 -13421 74997 39722 8 -22327 12635 46434 11 -69895 90439 55227 8 -30826 27030 55227 9 -128724 96947 27566 9 -777 14356 27566 9 -22737 17177 59847 8 -218388 29585 64114 8 -793 14569 51138 10 -215781 16072 51938 7 -222021 55981 58472 9 -164058 32646 58472 9 -217304 23917 51623 9 -69516 82761 51623 8 -113473 81769 60130 10 -36082 28 60130 10 -309327 261 55111 9 -310605 7963 53985 12 -99749 100522 53985 11 -164351 35234 39022 10 -4894 57367 39022 11 -8382 17309 60386 10 -299952 63186 68549 11 -110158 56318 68549 11 -70385 100425 40160 11 -27717 73017 40160 11 -21935 7859 69252 10 -182015 47227 62869 9 -157294 99119 62869 9 -99506 95993 55209 9 -36200 5288 55209 9 -195406 10109 71000 10 -84807 95649 71000 10 -121266 35899 62446 9 -13445 75427 62446 9 -3864 46171 50158 9 -280784 61904 36703 10 -135544 33589 3718 11 -30073 19873 3718 11 -274881 20071 51786 11 -114368 100867 51786 11 -99252 91083 31377 12 -44340 18642 31377 12 -31466 33413 54911 8 -173956 208 49957 10 -156518 82160 69398 12 -14389 1319 69398 12 -299583 60085 40148 7 -36090 246 22519 12 -37247 18197 40691 9 -174409 2706 44711 10 -142968 97214 44711 10 -214974 12549 28634 10 -69428 80926 28634 10 -291865 9984 41448 10 -128701 96675 41448 10 -142944 96736 43939 11 -2660 31931 43939 11 -69861 89852 40454 11 -55190 59057 40454 11 -201658 48242 47223 9 -121006 33832 47223 8 -274709 19376 70581 8 -69906 90585 70581 8 -69955 91450 70749 12 -38198 27527 70749 11 -140599 65176 49845 9 -1171 18315 49845 9 -237222 26214 30704 8 -85082 100454 30704 8 -281274 65851 17211 7 -202458 54613 41894 10 -236768 24102 59271 7 -279943 54941 60117 7 -37952 25235 48006 7 -39031 37400 63321 8 -279818 53996 31082 8 -171252 82451 31082 8 -84167 81860 22031 8 -2458 30162 22031 8 -253169 8399 70942 9 -51579 20586 31037 11 -274464 18123 41758 11 -114346 100424 41758 11 -149734 32682 47652 10 -52498 29371 47652 10 -236469 22399 71774 8 -127576 74401 71774 8 -99404 94212 71567 9 -10259 36793 71567 9 -143097 99701 73947 10 -15078 12900 73947 11 -98793 80759 28928 10 -56210 71917 28928 10 -279783 53776 44789 9 -143008 98240 44789 9 -114209 97606 30023 9 -7673 9458 30023 9 -223595 67930 30170 9 -84645 92437 30170 9 -256850 26945 52364 7 -171169 80765 52364 7 -157457 102107 49003 10 -53054 36478 49003 10 -178113 22067 38575 11 -70418 100950 38575 11 -199103 29347 58830 10 -117758 15543 58830 10 -216748 20557 49386 9 -164218 34024 49386 8 -216130 17548 45711 9 -114361 100680 45711 9 -69844 89555 54842 9 -32679 47230 54842 9 -176577 14233 50265 10 -91900 33907 50265 10 -202700 56348 39173 8 -69913 90777 39173 8 -98831 81646 21560 10 -32550 45996 21560 10 -312532 17731 47354 9 -174500 3073 40988 11 -80536 53171 40988 11 -296819 37937 104065 11 -167608 54258 104065 11 -168246 57864 56004 10 -54591 52899 56004 10 -176948 16177 31597 8 -278542 43359 44488 7 -91918 34226 44488 7 -204304 68198 70186 9 -253534 10425 53646 13 -128779 97962 53646 13 -2623 31624 70930 16 -20275 70263 29290 10 -217457 24820 42943 9 -184242 64204 63769 7 -106410 32660 63769 7 -282894 78107 39014 11 -129709 109686 39014 12 -222698 60906 45892 6 -142259 81359 45892 6 -171998 98420 61978 8 -44682 21923 61978 8 -69940 91198 38689 7 -7576 7865 38689 7 -261398 60472 45364 9 -5816 69086 9755 10 -277003 32869 63855 8 -45044 25498 49510 11 -203864 65193 54401 11 -175776 10274 53629 9 -48630 68326 55364 9 -214758 11536 59563 12 -31462 33337 23928 11 -254690 15872 61641 9 -45992 36512 23162 10 -313855 24428 48082 6 -217327 24142 59368 6 -84904 97069 72118 7 -52189 26614 72118 8 -70374 100194 44373 7 -22809 17869 44373 7 -178448 23970 42439 9 -240318 48113 47885 8 -66404 57012 47885 8 -99199 89971 47389 10 -23656 26272 47389 10 -157035 93675 59708 9 -44304 18232 59708 9 -217804 26463 51297 14 -20698 77985 115005 15 -37072 16366 46228 11 -14675 7915 31470 11 -9010 23052 44695 9 -31593 35622 37146 9 -296946 38811 41086 9 -196778 17304 24297 9 -298507 51085 43906 12 -47108 48954 20633 9 -36632 11641 45987 23 -199470 32129 71756 7 -179435 29321 54933 6 -178125 22117 44903 8 -350585 44437 41913 7 -7624 8773 41913 7 -350487 41913 44437 7 -2383 29526 44437 17 -40832 57270 45627 201 -318186 54071 46094 9 -50974 14733 60236 9 -242379 64125 41754 8 -556 11720 62909 9 -38199 27529 39071 11 -300921 70362 40068 12 -84874 96480 58323 12 -48514 66214 58323 12 -178654 25056 47256 12 -100813 112230 47256 12 -16288 24962 30299 12 -216691 20223 61823 10 -310495 7444 36711 37 -194135 2600 16065 7 -182890 53586 47451 34 -205402 76599 105830 71 -262954 71690 3086 19 -1887 25029 10750 10 -2913 36093 1255 8 -318439 56273 88596 8 -231488 112208 117727 14 -303635 86767 114451 66 -67049 61013 114451 83 -315963 37051 87382 38 -193138 113627 115011 7 -271923 4900 83634 60 -252477 4444 84929 37 -171374 84928 84929 42 -359490 95542 33901 7 -196319 15068 33901 32 -190586 98281 28742 19 -287331 99139 59766 20 -152792 52181 59766 14 -351617 70751 49488 11 -10847 44047 47553 20 -324242 91911 58724 18 -194059 2166 51754 50 -113889 90765 51754 11 -42259 77634 44010 110 -171666 91614 29262 11 -50326 6286 29262 12 -196020 13371 50936 132 -172267 102873 50936 9 -376548 64827 55812 12 -210702 102184 55812 23 -273191 12073 23954 10 -187303 83610 57865 12 -100550 109685 57865 12 -310544 7646 86784 11 -144947 117664 86784 8 -165255 41158 57634 11 -20727 83045 57634 10 -265296 85506 114450 18 -194174 2760 2084 20 -205180 74989 68382 113 -174612 3682 78769 23 -225064 78628 37113 39 -277706 36980 3296 32 -246286 88216 117725 29 -238867 36998 2119 67 -185327 71840 4749 47 -84303 85170 4749 32 -202067 51169 4332 87 -213175 2239 65434 8 -282931 78315 1951 90 -29230 10261 3438 60 -297682 44260 19892 87 -133276 20878 19892 47 -353271 96620 20123 8 -311913 14569 20123 9 -300662 68486 38601 48 -93929 46373 38601 48 -378209 94603 21664 10 -252532 4778 21664 10 -216982 21958 37810 7 -101949 6829 37810 7 -359398 94686 62558 10 -182582 51194 62558 10 -273228 12232 23817 49 -98172 72474 23817 47 -351882 79259 54692 10 -290360 1319 54692 11 -371408 90628 20482 9 -255911 22187 20482 48 -193873 823 89510 13 -1022 16783 113319 59 -290198 405 58161 9 -47645 55500 113321 9 -275466 23961 45997 145 -110704 59411 45997 133 -363721 56150 113322 10 -268300 99381 52274 27 -114072 94234 52274 17 -258359 36300 70377 14 -206136 80691 117734 21 -230334 103978 112806 4 -237860 30232 76743 17 -113436 81032 76743 17 -229506 99532 117735 17 -225021 78288 99439 13 -184498 65987 10766 9 -242642 66199 102600 85 -215935 16702 88286 46 -302276 79872 28741 13 -22403 13658 73425 7 -174372 2527 55467 89 -128328 89533 55467 5 -290260 739 39216 9 -157639 104102 39216 5 -321479 78523 18609 5 -251215 114207 29529 90 -157658 104310 29529 5 -41233 61989 45179 34 -253590 10698 60178 5 -262021 64757 55423 44 -95370 54565 55423 4 -290674 3090 88894 24 -290255 704 55238 7 -122266 41817 60362 4 -226980 88659 112817 7 -213369 3466 35760 21 -255324 18801 48681 7 -228134 93849 28857 17 -311588 13224 44223 12 -251427 115730 105071 10 -29339 11739 65680 12 -293947 20651 49665 10 -45089 25969 67657 9 -48858 71214 40166 12 -240019 45620 64038 9 -4854 56816 43003 48 -209948 98613 40261 14 -323534 88778 117187 12 -177269 17751 110075 25 -49963 114842 113873 27 -24164 30979 111150 18 -52869 33317 88895 50 -11810 54185 103091 31 -313819 24301 61400 9 -233191 5626 112279 10 -112413 70635 112279 4 -260446 52803 58933 21 -207131 86235 110076 11 -271301 1169 104442 110 -316824 43374 54927 10 -375352 35302 57484 16 -220017 39845 101562 49 -139192 56450 101562 11 -53906 45893 30302 25 -325993 98952 109546 20 -320552 71789 55356 91 -142698 91181 73356 11 -2575 31197 73356 11 -279644 52694 21406 11 -127998 81972 21406 11 -184813 68068 45736 10 -171245 82353 45736 10 -128683 96232 61447 10 -5815 69066 61447 10 -350470 41548 28886 11 -24215 31364 28886 24 -99422 94507 47301 9 -35011 75984 47301 32 -156182 75315 42489 11 -36952 15284 42489 12 -349862 28886 41548 11 -27141 65656 41548 11 -219978 39503 34879 11 -217428 24713 59942 10 -209765 97877 30200 18 -236495 22543 20152 9 -23983 29370 19124 6 -84441 88313 54335 8 -320807 73872 54697 33 -95539 55564 54697 9 -363101 38963 41395 10 -363182 41395 38963 10 -26089 53874 38963 23 -27823 75319 117191 5 -67244 62055 116659 4 -116588 7861 23898 6 -23871 28376 23898 45 -264998 83738 41890 37 -140364 63616 62427 5 -187767 86053 113343 7 -124479 54263 117755 5 -245989 86582 113880 25 -332482 73700 35710 7 -178934 26258 35710 7 -331048 35710 73700 7 -40815 57050 73700 10 -341141 105032 112826 10 -322908 85802 112826 24 -113640 85351 111741 10 -6670 104941 111741 10 -239245 39267 115029 46 -224072 71477 117197 13 -25970 52404 34882 11 -265262 85267 105079 21 -125215 58771 116660 12 -57090 113459 116660 12 -344011 39012 112827 11 -35568 111808 112827 46 -376190 55518 61791 8 -294241 22494 61791 22 -376425 61791 55518 8 -5705 67577 55518 9 -298251 49212 22517 5 -284239 85517 112823 10 -87124 6397 112823 5 -24654 38203 55684 9 -308670 113456 113339 90 -132194 14828 113339 5 -322664 84719 89202 30 -223205 64776 101579 8 -187496 84752 54294 10 -188055 87263 113883 18 -304140 89101 112824 11 -71793 113275 112824 6 -334978 112824 1342 12 -43510 9011 1342 21 -269310 104567 112825 15 -136117 38565 110080 6 -265598 86961 111743 28 -84459 88583 111743 8 -375054 30914 69885 4 -19674 61887 69885 7 -324037 91088 63523 32 -172146 101150 20493 12 -29499 13282 20493 14 -249951 104890 115030 12 -63081 38567 20610 9 -49944 114651 112292 22 -197741 21875 113884 25 -243245 70544 42828 7 -114997 107853 42828 6 -4714 55241 45951 10 -324195 91684 117752 5 -86986 5134 18777 11 -15354 16225 18777 24 -262636 69234 117193 3 -103683 17834 116657 6 -70535 102301 61426 9 -36175 4551 61426 10 -267841 97201 110087 24 -205201 75125 75178 5 -261187 58446 56308 8 -250097 106067 112293 13 -268716 100980 105537 52 -248950 99741 41859 23 -115072 108627 41859 9 -233105 5073 112828 12 -20328 70877 54250 23 -203314 60810 20770 11 -320910 74640 58974 21 -272685 9262 42631 12 -184340 64950 49507 22 -98773 80441 49507 12 -70091 93916 23903 11 -45574 30627 23903 11 -157308 99396 69428 16 -18456 48589 69428 23 -244957 81381 10355 19 -156848 90291 10355 14 -261846 63589 108751 7 -20145 68504 66275 24 -250878 111886 115659 4 -236008 19902 64713 11 -264541 81383 108562 34 -260030 49491 30286 10 -156915 91447 30286 10 -227931 92915 85881 40 -121646 38623 115658 10 -49767 112623 115658 22 -99080 87680 55511 11 -20013 66143 55511 23 -265396 86076 117198 20 -95371 54571 117198 11 -264299 80416 117199 36 -215943 16720 112294 29 -237768 29300 65744 10 -70706 104223 65744 10 -276817 31853 27886 8 -127915 80296 27886 8 -128361 90160 61942 8 -4777 55975 61942 8 -114137 95659 49354 9 -31143 29965 49354 10 -143060 99151 10397 8 -27158 65879 10397 9 -178686 25205 55739 8 -99305 92371 55739 8 -203049 58754 37856 8 -99214 90377 37856 8 -99736 100315 55620 9 -50561 9405 55620 9 -316295 39102 58535 8 -214803 11757 31299 7 -112220 69527 31299 7 -142243 80814 37858 6 -499 11255 37858 7 -47317 51535 44269 7 -171184 81050 61446 7 -50973 14689 61446 8 -171887 96370 53884 8 -28851 3469 53884 8 -156993 92962 30532 6 -40698 55839 30532 6 -299374 58121 59561 7 -99632 98327 59561 7 -281600 68503 43941 7 -99503 95952 43941 7 -113901 90972 10033 7 -5847 69381 10033 7 -261052 57477 7928 6 -301800 77075 116121 43 -184112 63167 101602 6 -216532 19438 53343 49 -98745 79395 53343 8 -367312 10317 42853 8 -10025 32426 42853 49 -50212 2573 9325 7 -218257 28726 114471 21 -114241 98263 70941 8 -33043 50971 70941 8 -299593 60189 28166 9 -157168 96670 28166 9 -311770 13930 31183 8 -84207 82924 31183 8 -216445 19016 31527 90 -136690 41891 61337 8 -52685 30970 61337 9 -62699 35613 66778 11 -1370 20314 66778 13 -142859 95074 44747 9 -55485 62304 44747 10 -157188 97180 54064 9 -37503 20714 54064 9 -85202 102403 60160 11 -29862 17741 60160 10 -203654 63378 24914 11 -84153 81637 24914 11 -174906 5657 104457 15 -293597 18909 116658 13 -13125 70373 40235 47 -29066 8421 45308 92 -189792 94890 40640 29 -320039 68296 47089 72 -14472 4679 30390 9 -37198 17670 52132 9 -204711 71507 50915 8 -54944 56281 58542 8 -189334 92828 37860 98 -99603 97811 37860 7 -202387 53854 48318 47 -128356 90033 48318 9 -114210 97620 51222 9 -33581 57151 51222 71 -70132 94790 53938 7 -4775 55959 53938 47 -51924 24120 59214 7 -254936 17102 32198 7 -142835 94559 32198 7 -39537 43514 57374 17 -306931 101896 54291 16 -65958 54321 54291 9 -202295 53187 56711 19 -121725 39048 56711 10 -143706 106725 58387 11 -20566 74113 58387 16 -180751 37670 66085 8 -127541 73946 44677 10 -12460 61005 44677 11 -23489 24693 43926 9 -216256 18132 69306 10 -156878 90894 69306 10 -32506 45494 51070 9 -99876 102559 72970 10 -20286 70382 72970 10 -70024 92544 57955 10 -34583 69978 57955 58 -172148 101173 40643 11 -13312 72524 40643 31 -185364 72060 43217 138 -69934 91137 43217 9 -229145 97992 42812 29 -114415 101626 42812 9 -232466 1305 71867 6 -114181 96955 39025 8 -54956 56459 39025 6 -128393 90698 53375 9 -14883 10491 53375 6 -195954 13121 29966 7 -210618 101634 109723 8 -250315 107708 109722 4 -307637 106420 109724 5 -280804 62121 58766 10 -183349 57164 39786 8 -223419 66680 117194 99 -297554 43092 23849 10 -171160 80593 23849 10 -299693 61000 39546 9 -103063 14596 39546 9 -199499 32365 62793 12 -48974 72638 29176 11 -303894 87895 115037 35 -171427 86469 115037 11 -114025 93257 54548 10 -24825 40236 54548 26 -252805 6373 31744 22 -84411 87681 31744 10 -229020 97468 72617 27 -128033 82693 72617 11 -266493 90995 61295 31 -177350 18127 29156 26 -62433 32979 29156 13 -50875 13230 32700 9 -246244 88000 111745 9 -17150 33556 31642 36 -266957 93237 23437 14 -32671 47166 44030 7 -206432 81933 115033 16 -298940 54680 55138 3 -307665 106585 57921 5 -240952 52692 45770 10 -128471 92060 45770 9 -70546 102518 39777 8 -33934 61056 39777 8 -357099 47083 55425 6 -182578 51146 55425 6 -128551 93737 44828 7 -48006 59813 44828 7 -357413 55425 47083 6 -320611 72258 47083 43 -234313 11764 44409 6 -238218 33009 31566 21 -215535 14853 42264 8 -167111 51427 24771 11 -23560 25312 24771 100 -37089 16550 61813 56 -181556 43599 104466 11 -182009 47211 45088 54 -55100 58166 62061 55 -25902 51603 64809 8 -298945 54794 38572 8 -279078 48321 66908 66 -99857 102152 66908 50 -298087 48080 54080 10 -70182 95884 54080 10 -41974 71824 73044 12 -38033 26037 59487 13 -12802 65482 46477 8 -236676 23594 71589 49 -293571 18751 59933 77 -229610 100200 30400 16 -67846 66361 30400 13 -356899 40726 70578 17 -41077 60099 70578 24 -127929 80506 39692 18 -8537 18792 39692 16 -357975 70578 40726 17 -197082 18665 40726 17 -241229 55018 108641 2 -288947 108640 34417 3 -232016 116014 35723 11 -164229 34255 35723 11 -12214 58364 52860 11 -298795 53472 15077 90 -325268 96124 59063 22 -114479 102370 59063 10 -173952 201 62692 14 -217729 26156 20631 62 -178361 23553 41397 8 -281804 69845 45678 47 -200911 41092 47443 8 -39517 43220 46162 7 -189729 94556 48109 7 -176383 13272 31798 41 -221348 50514 70673 9 -294196 22251 70366 10 -171960 97616 70366 9 -254354 14273 65887 9 -315556 34557 71946 8 -325726 97890 46540 19 -38253 28080 51578 10 -183486 58210 57868 8 -260665 54356 54386 8 -146724 15791 75042 6 -203530 62538 30383 10 -252600 5209 44626 9 -134135 25767 44626 9 -24623 37516 47367 8 -297355 41709 52992 8 -99531 96422 52992 8 -231994 115901 112835 8 -87550 9638 15182 3 -267344 94942 39836 13 -152856 52527 26689 2 -193762 124 47058 10 -227983 93121 29620 8 -279166 49013 59115 8 -70252 97516 59115 8 -114046 93700 55398 8 -99234 90788 49919 8 -27510 70901 49919 8 -320240 69686 60754 8 -70177 95694 60754 8 -199070 29134 43812 56 -234361 11975 50320 53 -127909 80158 50320 8 -260521 53277 20089 54 -156165 75166 20089 9 -143115 100159 51575 9 -15765 20155 51575 55 -303657 86842 117207 37 -210943 103449 103446 4 -307631 106362 59725 8 -261393 60368 107771 6 -146907 17057 47477 3 -215769 16046 55044 78 -19559 60588 61216 20 -50772 12002 66461 55 -14772 9393 24689 11 -247425 92931 55731 52 -320131 68881 62748 40 -186630 80368 30381 38 -272471 8035 59789 8 -188428 88988 74829 10 -377995 92556 65013 9 -192443 108750 87979 5 -249390 101647 53172 2 -112366 70344 53172 5 -320184 69207 61401 4 -269486 105825 103135 3 -287414 99633 105081 17 -209007 94459 57326 15 -253622 10864 54463 10 -236251 21232 58417 15 -285909 92866 43919 19 -52699 31114 52320 18 -31958 40015 41057 12 -266249 89778 62553 31 -142615 89721 72011 15 -32632 46786 72011 19 -318866 59576 108738 7 -287761 101096 43330 29 -237901 30623 42366 18 -219056 34000 75060 27 -235216 16009 38428 23 -245972 86528 113352 12 -98354 73511 106337 4 -230639 106337 73511 4 -156748 87922 73511 7 -249890 104371 68091 5 -131864 12559 68091 4 -281548 68091 12559 4 -139152 56196 12559 6 -232247 117675 73677 7 -69781 88231 73677 9 -270417 112754 106404 9 -70979 106399 106404 7 -333182 87972 8887 10 -50509 8860 8887 4 -230480 105014 88600 7 -116757 9069 88600 3 -265954 88600 9069 3 -92094 35615 9069 5 -344396 48986 98807 11 -49266 87634 98807 13 -298538 51399 64762 5 -146617 15248 64762 5 -300159 64762 15248 5 -148407 25344 15248 7 -183744 60361 107750 7 -142466 86118 107750 7 -264898 83108 106275 7 -164129 33138 106275 8 -200037 35137 81089 5 -153016 53638 81089 4 -302547 81089 53638 4 -145977 11347 53638 7 -202436 54509 12241 4 -68956 73729 12241 5 -176150 12241 73729 5 -100326 107383 73729 7 -289468 112756 110708 6 -144122 110705 110708 7 -220290 42274 107829 9 -77426 33913 107829 9 -179370 28811 37507 4 -85592 106460 37507 3 -200427 37507 106460 3 -142828 94413 106460 7 -315709 35676 59536 6 -122244 41664 59536 4 -261312 59536 41664 4 -128572 94214 41664 5 -259621 46348 69698 4 -65073 48842 69698 4 -204089 66748 17616 3 -120116 28525 17616 3 -255067 17616 28525 3 -104797 24044 28525 2 -313537 22767 24642 4 -74341 17477 24642 3 -198246 24642 17477 3 -75087 21315 17477 3 -243059 69269 65436 91 -297079 39676 69054 11 -195010 7816 87982 12 -6352 76696 113890 58 -289612 113890 76314 59 -205374 76314 84220 14 -322592 84220 88602 50 -175122 6733 83107 29 -28590 115061 114475 27 -231786 114475 66042 37 -263150 73253 17760 13 -314699 28907 76912 17 -13427 75123 116662 32 -293367 17760 89205 19 -226317 85171 113891 41 -328289 113891 83437 52 -184506 66042 84578 29 -226227 84578 83299 26 -303005 83299 84649 22 -303181 84649 34245 24 -28794 117780 51336 13 -245399 83437 83694 48 -192534 109469 110084 32 -289135 110084 83695 75 -154418 62702 15832 176 -55748 65712 15832 174 -150947 41529 24255 45 -24009 29593 24255 44 -169774 67312 26476 46 -26120 54252 26476 45 -153186 54728 25977 46 -23305 22993 25977 45 -147845 22303 11412 45 -2670 31992 11412 45 -58035 8806 21118 49 -30289 21869 21118 48 -178496 24187 37867 47 -133447 21890 37867 48 -95782 56872 17860 45 -13133 70549 17860 45 -190778 99085 76700 62 -320755 73398 84290 24 -303137 84290 75923 8 -301635 75923 75924 15 -205324 75924 5068 20 -290970 5068 82920 15 -245317 82920 83696 21 -206714 83696 84579 17 -285724 92078 29623 9 -127367 72636 29623 9 -346597 94282 48615 8 -254514 15089 48615 7 -120541 30820 13798 58 -18677 51009 13798 58 -4628 54359 59231 180 -239159 38668 49342 3 -279220 49342 2519 3 -275102 21430 16869 5 -165171 40729 16869 3 -128561 93906 62841 90 -10798 43609 62841 30 -310011 4691 93152 95 -277309 34272 4691 83 -244755 80461 6238 20 -243683 74101 92321 117 -167649 54465 92321 120 -233599 7806 34182 33 -271872 4614 7806 25 -213587 4961 4614 16 -301623 75850 66043 38 -300326 66043 4961 15 -376026 51336 28907 17 -50303 5938 28907 15 -322421 83107 8353 28 -239793 43486 38218 22 -113007 73850 38218 26 -174103 1227 80807 52 -239306 39553 73321 24 -63961 43519 73321 12 -185499 73321 43519 12 -78738 43138 43519 19 -306556 100104 69902 9 -65449 51240 69902 18 -185044 69902 51240 18 -65907 53999 51240 29 -182585 51240 53999 29 -113014 73939 53999 16 -241110 53999 73939 16 -167544 53930 73939 22 -320812 73939 53930 22 -93329 43379 53930 39 -221768 53930 43379 39 -164647 37635 43379 23 -316826 43379 37635 23 -167371 52906 37635 7 -316057 37635 52906 7 -153018 53640 52906 12 -213053 1400 39888 47 -220027 39888 3888 38 -271740 3888 3384 47 -271246 725 78579 34 -282972 78579 68402 8 -279761 53566 53585 24 -138685 53371 53585 16 -259423 44576 43289 14 -138717 53566 43289 15 -278530 43289 53566 15 -138720 53585 53566 24 -253617 10856 59395 6 -229320 98807 213 28 -278539 43351 74069 12 -156980 92613 74069 14 -314719 29084 39695 16 -121540 37914 39695 37 -258849 39695 37914 37 -164602 37351 37914 31 -316094 37914 37351 31 -153012 53611 37351 18 -296726 37351 53611 18 -62909 37454 53611 18 -277432 34954 59441 24 -81550 59155 59441 6 -203132 59441 59155 6 -127550 74019 59155 7 -261268 59155 74019 7 -128717 96881 74019 33 -246317 88294 8883 98 -185663 74523 103427 24 -377856 91324 99180 9 -181536 43446 99180 42 -261155 58119 92278 31 -299695 61016 3776 39 -213425 3776 3889 8 -232933 3889 69628 9 -320831 74094 52512 30 -87495 9302 52512 39 -212835 117769 37186 6 -85279 103499 37186 16 -200365 37186 103499 16 -159229 117769 103499 13 -307247 103499 117769 13 -77783 37186 117769 6 -370830 81632 72636 8 -32813 48615 72636 8 -82370 64176 21491 85 -19995 65858 21491 83 -62618 35016 66178 108 -37447 20246 66178 107 -66325 56499 71722 86 -55864 67902 71722 86 -282327 74112 99600 52 -91074 29182 99600 44 -126076 63863 10225 84 -56279 72530 10225 84 -136810 42624 7348 167 -56026 70015 7348 167 -356309 29623 15089 8 -288126 102814 15089 7 -118204 18137 15063 110 -46793 45790 15063 112 -79473 46959 26842 133 -48952 72358 26842 134 -168080 56691 33755 41 -2459 30166 33755 40 -106259 31668 25714 39 -18116 45352 25714 39 -97897 70651 18396 40 -22084 10016 18396 40 -261695 62472 64108 22 -171912 96756 64108 42 -344349 48173 96756 52 -319494 64108 96756 42 -331341 43179 55466 8 -3142 39140 55466 8 -65953 54295 55260 8 -6218 74038 55260 26 -367919 18151 79861 22 -56587 91027 79861 10 -230029 102348 66243 31 -127935 80609 66243 9 -378056 93152 101193 25 -240068 46022 101193 11 -350580 44276 59451 9 -213197 2362 59451 9 -361397 14293 34272 12 -35172 92668 34272 12 -338333 58055 16309 10 -57420 117656 16309 9 -348139 5813 80461 8 -49324 95019 80461 8 -373248 6218 89646 12 -216187 17834 89646 8 -164373 35461 17191 7 -50244 4592 17191 10 -377598 88590 85165 15 -95313 54262 74765 5 -105239 26440 100889 3 -74915 20407 80460 3 -127280 72269 99370 3 -289693 114407 110098 5 -154991 66395 25290 68 -5726 67951 25290 68 -261295 59371 1349 41 -5570 65413 1341 24 -114122 95311 6882 127 -13337 72761 6882 21 -109518 52440 62078 133 -24255 31826 62078 131 -91741 32776 25197 109 -44768 22728 25197 108 -378840 100428 95311 113 -233396 6882 95311 127 -206466 82101 75850 36 -334804 107058 117772 6 -322869 85618 117772 10 -358586 85161 116669 19 -328415 114977 116669 10 -335517 9268 116670 8 -35901 115563 116670 10 -296938 38768 103244 11 -126956 70313 103244 58 -261953 64262 56873 11 -178231 22682 29796 6 -351597 70317 34504 11 -319116 61469 34504 11 -22379 13319 74833 58 -332782 81440 33764 16 -183468 58092 33764 8 -182970 54244 59601 19 -80643 53839 59601 35 -203149 59601 53839 35 -80688 54149 53839 26 -202384 53839 54149 26 -113111 74898 54149 11 -241126 54149 74898 11 -371234 88588 85886 18 -95336 54393 36030 11 -43897 13796 36030 12 -328285 113829 103212 3 -84410 87679 103212 2 -246117 87383 116671 5 -188280 88286 35551 15 -359869 99439 95144 11 -361119 10766 91571 10 -358882 89193 116133 17 -99016 86132 105845 58 -261854 63647 86181 6 -301285 73342 86790 10 -207237 86782 34794 8 -354508 3030 85168 89 -210903 103212 87679 2 -129178 104355 87679 3 -270285 111684 59887 5 -142494 86731 59887 5 -346115 89510 38607 13 -333268 89213 63941 12 -221895 54930 39098 4 -172859 108829 108828 5 -327592 108828 108829 5 -328204 113319 108830 58 -332575 77671 109469 9 -153803 58884 111761 5 -308424 111761 58884 5 -113751 87929 58884 7 -193093 113290 60483 5 -84346 86133 60483 5 -377575 88281 37519 19 -191821 104389 37519 8 -119647 25945 24886 3 -256433 24886 25945 3 -129447 106900 25945 3 -256635 25945 106900 3 -65668 52619 106900 4 -300050 63947 24768 7 -162883 26497 24768 3 -313913 24768 26497 3 -101477 117220 26497 3 -167739 54930 38681 4 -316235 38681 54930 4 -92556 39098 54930 4 -317910 51853 102759 6 -162510 24400 102759 7 -327755 110026 49830 24 -252360 3848 41299 89 -261636 62073 20597 8 -136388 40206 80661 25 -277879 38165 38862 10 -371018 85616 85887 8 -76728 29909 82977 53 -27967 86136 82977 13 -198984 28460 41002 12 -84101 80619 41002 10 -281547 68085 90499 9 -244859 80918 54122 13 -98859 82218 54122 9 -358902 89523 89212 16 -360752 2084 101139 13 -128897 100580 56602 4 -149881 34216 69898 4 -172862 108837 108838 5 -327595 108838 108837 5 -359107 91728 27063 37 -152831 52412 19253 112 -300242 65413 60466 5 -368013 19253 65413 4 -174140 1349 65413 41 -112476 70925 52412 113 -48067 60466 52412 113 -9779 30495 50262 51 -225399 80373 17987 4 -78079 39542 17987 4 -319426 63648 95222 5 -156676 86137 95222 5 -129345 105850 105842 3 -269488 105842 105850 3 -71297 109499 109498 7 -192536 109498 109499 7 -172175 101604 101605 8 -35361 105815 101605 6 -326567 101605 101604 8 -172582 105814 101604 8 -172853 108760 108764 5 -327582 108764 108760 5 -84437 88288 101568 9 -210613 101568 88288 9 -129343 105844 105838 6 -269487 105838 105844 6 -335222 1950 105848 13 -258601 38012 105848 13 -192168 106918 91437 204 -71694 112318 91437 201 -189027 91437 49494 517 -139143 56180 39501 11 -278094 39501 56180 11 -143607 105846 106632 4 -288675 106632 105846 4 -157837 105849 103113 3 -307186 103113 105849 3 -338285 56866 82101 9 -38081 26391 82101 8 -365594 94658 89520 5 -36821 13891 53415 37 -149022 28768 90696 8 -292602 13891 30106 37 -337496 36711 32991 37 -201570 47585 60202 4 -175511 8850 21043 3 -242813 67478 21910 3 -284933 88596 74526 8 -317551 49377 33620 4 -308318 111095 65464 3 -115091 108892 51545 3 -240808 51545 108892 3 -235319 16609 66284 3 -316995 45037 92570 5 -224994 78087 68155 37 -242908 68155 78668 78 -205750 78668 3890 59 -255676 20860 22539 7 -87234 7292 22539 5 -187299 83566 84500 52 -282278 73763 83943 21 -245465 83943 84780 59 -226259 84780 76225 58 -205369 76225 99085 24 -258184 35405 66779 6 -133162 20261 33237 3 -222319 57966 95122 4 -204925 73001 73513 7 -161760 19996 100428 10 -325079 95311 56781 114 -72710 6882 80269 22 -202866 57437 72761 9 -375233 33755 91481 40 -242353 63934 91481 10 -99702 99656 56691 10 -53456 41119 56691 11 -62497 33755 98262 42 -342654 18396 99314 39 -14587 6677 70651 9 -204540 70223 96171 10 -103772 18396 96171 39 -236156 20725 10016 12 -114119 95274 10016 12 -349605 25714 99494 41 -22657 16279 31668 8 -222747 61327 74951 10 -90435 25714 74951 41 -217081 22644 45352 8 -127926 80476 45352 8 -367730 15832 87693 175 -44022 15047 62702 11 -279293 49782 95124 11 -151057 42119 95124 103 -294247 22518 36347 8 -148671 26842 80969 133 -294916 26269 72358 14 -336890 26842 81587 133 -8125 14795 46959 9 -330598 27623 88289 19 -250701 110467 88289 12 -171519 88557 58885 12 -7049 113795 58885 12 -353445 98189 100546 30 -85080 100443 59834 10 -27021 63976 59834 7 -75709 24360 64429 10 -44225 17397 64429 11 -198860 27629 71869 7 -157050 93984 71869 11 -260433 52725 94250 10 -118349 19122 94250 35 -259816 47912 61087 10 -357682 62288 92391 7 -128618 95096 50052 10 -33568 56900 50052 9 -346627 94524 37549 157 -203394 61431 37549 9 -18521 49322 44841 9 -66734 59231 32487 180 -181330 41809 54359 11 -169616 66078 54359 10 -146356 13589 89947 35 -300918 70318 66956 8 -161684 19647 30914 4 -355228 15063 86185 113 -262127 65523 86185 9 -127396 72805 18137 6 -30964 28334 18137 6 -90681 27189 90324 168 -216841 21116 39633 10 -128853 99679 39633 10 -332412 71722 89564 85 -4733 55418 56499 12 -354853 10225 89840 85 -31488 34288 63863 10 -159689 7348 94505 168 -310492 7426 70015 9 -318754 58585 80731 14 -88150 13587 80731 72 -215501 14694 45102 11 -142873 95282 45102 11 -355145 13798 33114 59 -259034 41051 33114 12 -171771 93778 30820 11 -29512 13553 30820 11 -360937 7348 102814 167 -221418 51009 102814 7 -99298 92078 42624 8 -36931 15089 42624 8 -201352 45790 94282 9 -88192 13798 94282 58 -221066 48615 51009 8 -99891 102814 51009 7 -363528 50589 92078 45 -220348 42624 92078 8 -84152 81632 52714 7 -38412 29623 52714 8 -202251 52714 81632 7 -146592 15063 81632 112 -301196 72636 45790 9 -84745 94282 45790 9 -89620 21491 80633 84 -218829 32951 65858 13 -336459 21491 79521 83 -175719 9899 79521 11 -161143 16885 64176 12 -10019 32382 64176 12 -223696 68631 100259 14 -140729 66178 100259 109 -274806 19797 20246 12 -98761 80085 20246 11 -347185 99600 20372 45 -278689 44885 20372 9 -15210 14754 29182 8 -37468 20372 63104 5 -113117 74962 102092 55 -235927 19432 28957 12 -127934 80607 28957 12 -332202 66178 92617 108 -259311 43458 92617 12 -114038 93474 35016 12 -2309 28879 35016 12 -224611 75494 93482 12 -170457 71722 93482 86 -317328 47913 67902 11 -157281 98961 67902 11 -107675 41672 108621 35 -236353 21822 76449 10 -184563 66395 79110 14 -109815 54162 79110 57 -233456 7106 51024 11 -368443 25290 91935 67 -181060 39584 91935 12 -69367 79110 66395 14 -45740 32398 66395 14 -181206 40681 92141 9 -60960 25290 92141 66 -178813 25685 67951 10 -128332 89593 67951 10 -352996 93745 95608 37 -23246 22513 71393 10 -316677 42065 98627 8 -90667 27111 98627 85 -217521 25198 40681 9 -69996 92141 40681 9 -241264 55394 61713 8 -11712 52827 55510 13 -350640 45997 97483 132 -27004 63786 59411 7 -363797 58366 82636 39 -37478 20456 53480 12 -159742 7720 91324 7 -326058 99180 41146 8 -350942 52412 89691 113 -23777 27461 70925 8 -80023 50262 99551 52 -203109 59283 30495 8 -156398 79278 30495 8 -358455 81761 80638 32 -222076 56355 80638 9 -140817 66775 51703 10 -33861 60193 51703 10 -148393 25197 99914 110 -294151 21973 22728 9 -351286 62078 92597 131 -22653 16234 52440 12 -314742 29262 91614 11 -164968 39832 91614 123 -312498 17571 35015 10 -84851 96214 35015 9 -111176 62078 82681 132 -237053 25444 31826 11 -371929 95812 92940 79 -200551 38407 92940 10 -45284 27928 20198 11 -343119 25197 81248 108 -19476 59693 32776 10 -351649 71450 97579 47 -27712 72962 29090 9 -170405 71450 92556 48 -319598 65013 49706 7 -360800 4121 91964 134 -222293 57725 91964 10 -205209 75219 47365 10 -335260 2997 38633 133 -222840 62057 38633 10 -138856 54451 55159 8 -315011 31524 51976 6 -61812 29758 51976 43 -177137 17108 29164 8 -97747 69713 29164 8 -343466 29758 24687 45 -297809 45523 24687 9 -157737 104994 40546 8 -20410 71976 40546 8 -202896 57586 99216 8 -92631 39560 99216 44 -217452 24797 28504 9 -99886 102701 28504 9 -356857 39560 11386 45 -274062 16176 11386 7 -73906 14990 9871 6 -29885 18000 9871 5 -211281 105848 36173 173 -48258 62771 3030 90 -41748 69396 50186 22 -260112 50186 78989 57 -225135 78989 102568 111 -41634 67844 10555 133 -40498 53630 4121 134 -11193 47365 2997 133 -167623 54313 52997 49 -20053 66903 52997 49 -258582 37916 80901 25 -67283 62288 80901 11 -186742 80901 62288 11 -123719 50052 62288 7 -116885 9871 39560 44 -16657 28504 39560 45 -92803 40546 29758 44 -2341 29164 29758 45 -371412 90696 13891 37 -285129 89520 13891 36 -278162 40164 97909 10 -279203 49221 67844 10 -99745 100414 67844 10 -353892 102568 42492 77 -276210 27474 42492 9 -120903 33026 57779 9 -271571 2761 69396 9 -376106 52997 69621 46 -51970 24506 54313 11 -257279 29540 82727 10 -95082 52997 82727 50 -215053 12844 66903 9 -99540 96635 66903 9 -223447 66903 96635 9 -271146 125 53630 10 -157125 95761 53630 10 -197725 21803 94686 10 -124733 55842 94686 48 -261714 62558 47808 10 -157104 95231 47808 11 -369490 44380 82458 44 -183090 55370 82458 11 -85205 102452 54631 11 -46860 46394 54631 11 -120509 30635 91303 132 -256086 23225 71550 4 -218099 27905 94603 10 -160814 14951 94603 45 -313347 21664 63472 10 -113496 82213 63472 10 -343988 38601 89641 48 -216977 21933 89641 10 -113333 76840 46373 10 -14777 9462 46373 10 -278670 44711 97214 10 -118732 21118 97214 48 -255256 18505 21869 10 -145656 8939 21869 9 -335600 10555 54258 133 -326975 104065 54258 11 -63600 41396 54521 10 -104152 20477 96620 48 -236055 20123 63516 8 -361878 19892 89833 46 -39562 43766 20878 10 -221772 53985 100522 11 -145568 8114 100522 79 -296577 36527 20243 10 -368743 29624 35234 47 -316285 39022 35234 10 -44319 18415 69332 11 -242967 68549 56318 11 -79386 46461 56318 49 -203543 62660 61616 11 -172123 100879 61616 10 -145978 11352 90628 131 -293915 20482 22873 8 -368782 30635 51334 130 -44906 24100 61364 10 -101772 5362 79259 54 -241203 54692 44533 10 -84658 92688 44533 10 -343025 23817 82160 48 -300783 69398 82160 12 -84923 97303 72474 11 -18816 52573 72474 11 -355838 22928 98777 130 -32021 40610 59888 8 -363044 37867 100425 47 -181131 40160 100425 11 -99967 103712 21890 11 -38445 29925 21890 11 -162238 22928 98924 130 -310764 8806 64173 9 -335640 11352 95495 130 -9146 24187 51571 9 -367375 11412 100131 44 -316930 44514 100131 10 -69860 89850 22303 11 -45116 26235 22303 11 -314958 31082 82451 8 -58448 11412 82451 45 -179199 27690 31992 7 -70152 95183 31992 7 -368494 25977 81860 45 -197761 22031 81860 8 -121008 33842 54728 10 -43713 11740 54728 9 -239586 41758 100424 11 -105150 25977 100424 45 -236661 23453 22993 10 -155235 68466 22993 10 -374806 26476 32682 45 -298028 47652 32682 10 -69439 81130 67312 11 -51298 17950 67312 11 -262966 71774 74401 8 -105249 26476 74401 45 -234923 14774 54252 8 -84674 93021 54252 8 -368356 24255 94212 45 -224084 71567 94212 9 -156471 81221 41529 9 -43793 12603 41529 9 -282306 73947 99701 10 -104845 24255 99701 45 -237628 28236 29593 10 -171964 97782 29593 10 -218293 28928 80759 10 -74408 17860 80759 45 -193840 534 70549 11 -342606 17860 98240 46 -278678 44789 98240 9 -142818 94122 56872 8 -19382 58757 56872 8 -237839 30023 97606 9 -154099 60625 97606 50 -297753 44912 47636 9 -77312 32719 47636 9 -311092 10750 27793 8 -251868 838 839 122 -271262 839 965 174 -124497 54395 34561 41 -193278 114451 61013 83 -114999 107856 61013 299 -241949 61013 107856 299 -188078 87382 110102 24 -187693 85632 111764 5 -283924 83634 7816 52 -258069 34561 54395 41 -142497 86767 54395 100 -124331 53436 40693 34 -32136 41650 40693 17 -258979 40693 53436 34 -157614 103975 53436 45 -298788 53436 103975 45 -149854 33847 103975 33 -307296 103975 33847 33 -154940 66062 33847 15 -306176 98312 38987 8 -168717 60338 38987 29 -316277 38987 60338 29 -317453 48803 70751 11 -240553 49488 50830 9 -82401 64342 50830 12 -377965 92321 81011 119 -221929 55229 81011 10 -54105 47641 54465 11 -287773 101139 2501 26 -321526 78769 4165 30 -219626 37113 37164 62 -271115 117725 87692 27 -243733 74293 88610 103 -194455 4749 85170 32 -142163 77409 85170 9 -41645 67993 59436 14 -194276 3438 89523 27 -370348 68663 14951 45 -55573 63472 14951 45 -213946 6829 39372 5 -68150 68663 39372 9 -150117 36322 68663 11 -1708 23225 68663 7 -92605 39372 6829 5 -25185 44380 6829 41 -239013 37810 44380 44 -153173 54631 44380 44 -359071 91303 23225 5 -181020 39372 23225 5 -154208 61364 30635 132 -34734 71550 30635 130 -80276 51571 11352 131 -44782 22873 11352 130 -330091 21118 24187 48 -209244 95495 24187 8 -378699 98924 8806 10 -3020 37867 8806 48 -125397 59888 22928 130 -55640 64173 22928 129 -302217 79503 89213 11 -320236 69628 3385 9 -202982 58161 68158 5 -281556 68158 56997 6 -231643 113321 33537 6 -156315 76854 101588 71 -306873 101588 76854 71 -261225 58790 60439 3 -66275 56150 60439 9 -131758 11964 56150 15 -3275 40372 56150 14 -289537 113322 11964 9 -168419 58790 11964 9 -125504 60439 58790 3 -52890 33758 58790 7 -353002 93798 40372 20 -183751 60439 40372 7 -98621 75901 35111 16 -23825 27946 35111 16 -345205 70951 94234 16 -240911 52274 94234 17 -19500 59946 24698 16 -85256 103281 103280 4 -210916 103280 103281 4 -114815 105861 106183 4 -250120 106183 105861 4 -172659 106756 106755 2 -327286 106755 106756 2 -100262 106727 101517 4 -229917 101517 106727 4 -100285 106919 106920 3 -230729 106920 106919 3 -157905 106559 106556 2 -307662 106556 106559 2 -100311 107199 107197 2 -230785 107197 107199 2 -143701 106682 106685 6 -288680 106685 106682 6 -85383 104502 105863 3 -211283 105863 104502 3 -129091 103478 104511 2 -269294 104511 103478 2 -345563 80738 112318 6 -4224 49494 112318 318 -356803 38579 99674 16 -171634 90729 46371 16 -30341 22382 46371 29 -317142 46371 90729 16 -127193 71710 90729 16 -266777 92292 49694 36 -339253 81552 81032 15 -244095 76743 81032 17 -12177 57953 9822 15 -84583 91236 34833 5 -168768 60675 49906 5 -260790 55467 89533 5 -297012 39216 104102 5 -295469 29529 104310 5 -72970 9166 55047 6 -221945 55423 54565 4 -92010 35106 54565 4 -261390 60362 41817 4 -156800 89179 41817 4 -71870 113807 35396 5 -106474 33244 29307 5 -250936 112279 70635 4 -375275 34182 85891 23 -46273 40200 85891 13 -149996 35302 36764 16 -376262 57484 35302 16 -296613 36764 35302 16 -82175 62841 33424 32 -198213 24491 43609 10 -168233 57758 99569 23 -311405 12372 67654 10 -193593 116659 62055 4 -81880 61012 62055 4 -114414 101597 101598 4 -249384 101598 101597 4 -143188 101596 101597 3 -287882 101597 101596 3 -378303 95360 81900 46 -278064 39288 81900 8 -84168 81878 9183 8 -280847 62427 63616 5 -99157 89216 63616 4 -223077 63616 89216 4 -271116 117755 54263 5 -142556 88293 54263 4 -279864 54263 88293 4 -231585 112823 6397 5 -289538 113339 14828 5 -113666 85871 36041 4 -113651 85614 114491 4 -94953 52191 88911 10 -215215 13577 50635 27 -239718 42828 107853 6 -198507 26046 36757 4 -251568 116657 17834 6 -99179 89646 17834 8 -352812 91960 51669 73 -22241 11948 57794 12 -326705 102458 41190 47 -291664 8883 112854 98 -351535 69014 88294 9 -1394 20491 14471 5 -360739 1682 20491 17 -176067 11790 20491 9 -332926 83695 104486 48 -98549 75170 75176 3 -224563 75176 75170 3 -217815 26497 117220 3 -161355 17835 117220 4 -328740 117220 17835 4 -143834 108027 17835 4 -274418 17835 108027 4 -357880 68163 59371 5 -146618 15250 11823 4 -292216 11823 15250 4 -109390 51646 15250 4 -184699 67360 14568 5 -69947 91357 107019 5 -143892 108610 108611 6 -288938 108611 108610 6 -100468 108897 108898 2 -231037 108898 108897 2 -157896 106482 106481 2 -307644 106481 106482 2 -318166 53884 96370 8 -136405 40294 96370 21 -275644 24754 69248 8 -143053 99031 69248 8 -224264 72970 102559 10 -79330 46186 102559 59 -204250 67856 20317 8 -223751 69074 17017 4 -116844 9637 17017 3 -254908 17017 9637 3 -86262 113277 9637 2 -136469 40664 73492 7 -282247 73492 40664 7 -82092 62437 56576 6 -202742 56576 62437 6 -354475 2141 28092 8 -88761 17017 69074 4 -132611 16989 99197 7 -286576 95763 71333 15 -338048 50830 61123 11 -240901 52181 61123 9 -356663 35298 64342 7 -8068 14137 64342 10 -370048 59766 14596 14 -239303 39546 14596 9 -101897 6398 52181 7 -46446 42085 52181 9 -26739 61123 6398 6 -237710 28742 117221 11 -375842 47553 48803 10 -126158 64335 35298 7 -336551 22650 92060 56 -259556 45770 92060 9 -106473 33216 20200 8 -7755 10216 20200 8 -181086 39777 102518 8 -160131 10225 102518 83 -312198 15907 72530 9 -172153 101268 72530 9 -78398 41347 45532 4 -313915 24771 47953 6 -188225 87982 76696 8 -334892 110102 85632 5 -328418 115011 24265 7 -123005 45776 24265 7 -368975 33847 98312 16 -46141 38987 66062 8 -122048 40693 95542 15 -257937 33901 41650 9 -106211 31387 15382 138 -235078 15382 31387 138 -172174 101592 31387 174 -314992 31387 101592 174 -358828 88589 73253 47 -205455 76912 75123 15 -346098 89205 85171 12 -238442 34245 117780 19 -163361 28907 91761 14 -315506 34346 5938 44 -345793 83694 59872 37 -245897 86170 115061 12 -246416 88602 104489 46 -223448 66908 102152 50 -85637 106869 102152 27 -160953 15832 19710 176 -332452 72711 65712 11 -314025 25279 65712 11 -296318 34939 89217 6 -82847 67837 89217 3 -241726 59063 102370 10 -145988 11401 102370 10 -293402 17961 34939 17 -156803 89217 34939 6 -301502 75042 15791 6 -101899 6428 15791 5 -348032 2391 86798 56 -28149 104992 35163 8 -331931 58562 17555 23 -262869 71078 17555 3 -215596 15182 9638 3 -112511 71078 9638 1 -118088 17555 71078 3 -22623 15955 71078 2 -233946 9638 15955 2 -64884 47892 15955 2 -295017 26689 52527 2 -151045 42090 52527 3 -364525 80807 97351 47 -371280 89196 108909 37 -48399 64671 115062 11 -143895 108648 60033 6 -280580 60033 108648 6 -298007 47477 17057 3 -116319 5521 17057 2 -254917 17057 22339 1 -62847 36763 22339 4 -337456 36035 36763 9 -178156 22339 36763 4 -58680 12641 5521 4 -30337 22339 5521 2 -105743 29090 71450 47 -54273 49706 71450 46 -129631 108971 108062 3 -269808 108062 108971 3 -241022 53172 70344 5 -126775 69207 70344 5 -366951 1496 95923 15 diff --git a/tools/testers/trsp_tests.sql b/tools/testers/trsp_tests.sql index 3a22c7bbb5a..0110f0dedc4 100644 --- a/tools/testers/trsp_tests.sql +++ b/tools/testers/trsp_tests.sql @@ -63,8 +63,8 @@ BEGIN IF flag THEN directed = 'Directed'; END IF; k := 1; - with_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edge_table ORDER BY id'); - no_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost from edge_table ORDER BY id'); + with_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edges ORDER BY id'); + no_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost from edges ORDER BY id'); FOR i IN 1.. cant BY 2 LOOP FOR j IN 1..cant LOOP @@ -137,8 +137,8 @@ BEGIN IF flag THEN directed = 'Directed'; END IF; k := 1; - with_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edge_table ORDER BY id'); - no_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost from edge_table ORDER BY id'); + with_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edges ORDER BY id'); + no_reverse_cost = quote_literal('SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost from edges ORDER BY id'); FOR i IN 1.. cant LOOP FOR j IN 1..cant LOOP diff --git a/tools/testers/tsp_pgtap_tests.sql b/tools/testers/tsp_pgtap_tests.sql index 107a2db2dab..8038aed76b6 100644 --- a/tools/testers/tsp_pgtap_tests.sql +++ b/tools/testers/tsp_pgtap_tests.sql @@ -125,8 +125,8 @@ subs TEXT[]; BEGIN params = ARRAY[ '$fn$SELECT * FROM data$fn$', - '1::BIGINT', - '2::BIGINT' + '5::BIGINT', + '6::BIGINT' ]::TEXT[]; subs = ARRAY[ diff --git a/tools/testers/via_compare.sql b/tools/testers/via_compare.sql index 678f446ff5c..2bbbd23a90f 100644 --- a/tools/testers/via_compare.sql +++ b/tools/testers/via_compare.sql @@ -24,8 +24,8 @@ BEGIN IF flag THEN directed = 'Directed'; END IF; k := 1; - with_reverse_cost = quote_literal('SELECT id, source, target, cost, reverse_cost from edge_table ORDER BY id'); - no_reverse_cost = quote_literal('SELECT id, source, target, cost from edge_table ORDER BY id'); + with_reverse_cost = quote_literal('SELECT id, source, target, cost, reverse_cost from edges ORDER BY id'); + no_reverse_cost = quote_literal('SELECT id, source, target, cost from edges ORDER BY id'); empty_restrictions = quote_literal('SELECT * FROM restrictions WHERE id > 7'); --msg_end = E'\n' || trsp_sql || E'\n' || dijkstraVia_sql; msg_end = ' '; @@ -102,8 +102,8 @@ BEGIN IF flag THEN directed = 'Directed'; END IF; k := 1; - with_reverse_cost = quote_literal('SELECT id, source, target, cost, reverse_cost from edge_table ORDER BY id'); - no_reverse_cost = quote_literal('SELECT id, source, target, cost from edge_table ORDER BY id'); + with_reverse_cost = quote_literal('SELECT id, source, target, cost, reverse_cost from edges ORDER BY id'); + no_reverse_cost = quote_literal('SELECT id, source, target, cost from edges ORDER BY id'); the_points = quote_literal('SELECT * FROM pointsOfInterest'); msg_end = ' '; @@ -180,8 +180,8 @@ BEGIN IF flag THEN directed = 'Directed'; END IF; k := 1; - with_reverse_cost = quote_literal('SELECT id, source, target, cost, reverse_cost from edge_table ORDER BY id'); - no_reverse_cost = quote_literal('SELECT id, source, target, cost from edge_table ORDER BY id'); + with_reverse_cost = quote_literal('SELECT id, source, target, cost, reverse_cost from edges ORDER BY id'); + no_reverse_cost = quote_literal('SELECT id, source, target, cost from edges ORDER BY id'); the_points = quote_literal('SELECT * FROM pointsOfInterest'); empty_restrictions = quote_literal('SELECT * FROM restrictions WHERE id > 7'); msg_end = ' ';