Skip to content

Create pgr_contractionLinear new contraction function #2791

@cvvergara

Description

@cvvergara

New function

Signature:

pgr_contractionLinear(Edges SQL, [options])
options: [directed, cycles, forbidden]
Returns set of (type, id, contracted_vertices, source, target, cost)

Example excecution:

SELECT * FROM pgr_contractionLinear(
  'SELECT id, source, target, cost, reverse_cost FROM edges',false);
 type | id | contracted_vertices | source | target | cost
------+----+---------------------+--------+--------+------
 e    | -1 | {3}                 |      1 |      7 |    2
 e    | -2 | {17}                |     12 |     16 |    2
 e    | -3 | {15}                |     10 |     16 |    2

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions