1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
\set QUIET 1
SET client_min_messages = WARNING;
DROP TABLE IF EXISTS edge_table;
--EDGE TABLE CREATE
CREATE TABLE edge_table (
id BIGSERIAL,
source BIGINT,
target BIGINT,
cost FLOAT,
reverse_cost FLOAT
);
--EDGE TABLE ADD DATA
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 1, 1, 2, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 2, 2, 3, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 3, 3, 4, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 4, 6, 5, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 5, 7, 5, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 6, 8, 5, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 7, 8, 7, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 8, 7, 6, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 9, 2, 10, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 10, 10, 9, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 11, 9, 1, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 12, 3, 11, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 13, 11, 10, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 14, 4, 12, 1 , -1);
INSERT INTO edge_table (id, source, target, cost,reverse_cost)
VALUES ( 15, 11, 12, 1 , -1);
|