pgr_articulationPoints
- Return the articulation points of an undirected graph.
In particular, the algorithm implemented by Boost.Graph.
Warning
Experimental functions
Those vertices that belong to more than one biconnected component are called articulation points or, equivalently, cut vertices. Articulation points are vertices whose removal would increase the number of connected components in the graph. This implementation can only be used with an undirected graph.
The main Characteristics are:
- The returned values are ordered:
- node ascending
- Running time: \(O(V + E)\)
pgr_articulationPoints(edges_sql)
RETURNS SET OF (seq, node)
OR EMPTY SET
The signature is for a undirected graph.
Example: |
---|
SELECT * FROM pgr_articulationPoints(
'SELECT id, source, target, cost, reverse_cost FROM edge_table'
);
seq | node
-----+------
1 | 2
2 | 5
3 | 8
4 | 10
(4 rows)
edges_sql: | an SQL query, which should return a set of rows 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 |
Parameter | Type | Default | Description |
---|---|---|---|
edges_sql | TEXT |
SQL query as described above. |
Returns set of (seq, node)
Column | Type | Description |
---|---|---|
seq | INT |
Sequential value starting from 1. |
node | BIGINT |
Identifier of the vertex. |
Indices and tables