pgr_chinesePostmanCost
— Calculates the minimum costs of a circuit path which
contains every edge in a directed graph and starts and ends on the same vertex.
Warning
Possible server crash
Warning
Experimental functions
Availability
Support
The main characteristics are:
pgr_chinesePostmanCost(edges_sql)
RETURNS FLOAT
Example: |
---|
SELECT * FROM pgr_chinesePostmanCost(
'SELECT id,
source, target,
cost, reverse_cost FROM edge_table where id < 17'
);
pgr_chinesepostmancost
------------------------
34
(1 row)
Column | Type | Default | Description |
---|---|---|---|
edges_sql | TEXT |
The edges SQL query as described in Inner query. |
An Edges SQL that represents a directed graph with the following columns
Column | Type | Default | Description |
---|---|---|---|
id | ANY-INTEGER |
Identifier of the edge. | |
source | ANY-INTEGER |
Identifier of the first end point vertex of the edge. | |
target | ANY-INTEGER |
Identifier of the second end point vertex of the edge. | |
cost | ANY-NUMERICAL |
Weight of the edge (source, target)
|
|
reverse_cost | ANY-NUMERICAL |
-1 | Weight of the edge (target, source),
|
Where:
ANY-INTEGER: | SMALLINT, INTEGER, BIGINT |
---|---|
ANY-NUMERICAL: | SMALLINT, INTEGER, BIGINT, REAL, FLOAT |
Type | Description |
---|---|
FLOAT |
Minimum costs of a circuit path. |
Indices and tables