Skip to content

Commit 569ba6b

Browse files
committed
[makeBiconnectedPlanar/doc] Adding documentation for pgr_makeBiconnectedPlanar
1 parent 1ddb527 commit 569ba6b

9 files changed

Lines changed: 206 additions & 2 deletions

doc/_static/page_history.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ var titles = [
1616

1717

1818
var newpages = [
19+
{v: '4.1', pages: ['pgr_makeBiconnectedPlanar']},
20+
1921
{v: '4.0', pages: ['pgr_bandwidth', 'pgr_kingOrdering', 'pgr_sloanOrdering']},
2022

2123
{v: '3.8', pages: ['pgr_contractionDeadEnd', 'pgr_contractionLinear', 'pgr_separateCrossing',

doc/planar/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# License: GPL-2 See https://github.com/pgRouting/pgrouting/blob/main/LICENSE
44

55
set(LOCAL_FILES
6+
planar-family.rst
67
pgr_isPlanar.rst
8+
pgr_makeBiconnectedPlanar.rst
79
)
810

911
foreach (f ${LOCAL_FILES})

doc/planar/images/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# License: GPL-2 See https://github.com/pgRouting/pgrouting/blob/main/LICENSE
44
set(LOCAL_FILES
55
nonPlanar.png
6+
biconnected_planar_sampledata.png
7+
biconnected_line_before.png
8+
biconnected_line_after.png
69
)
710

811
foreach (f ${LOCAL_FILES})
16.3 KB
Loading
3.92 KB
Loading
39.6 KB
Loading
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
:file: This file is part of the pgRouting project.
2+
:copyright: Copyright (c) 2020-2026 pgRouting developers
3+
:license: Creative Commons Attribution-Share Alike 3.0 https://creativecommons.org/licenses/by-sa/3.0
4+
5+
.. index::
6+
single: Planar Family ; pgr_makeBiconnectedPlanar - Experimental
7+
single: makeBiconnectedPlanar - Experimental on v4.1
8+
9+
|
10+
11+
``pgr_makeBiconnectedPlanar`` - Experimental
12+
===============================================================================
13+
14+
``pgr_makeBiconnectedPlanar`` — Returns the set of edges needed to make each connected component of a planar graph biconnected.
15+
16+
.. include:: experimental.rst
17+
:start-after: warning-begin
18+
:end-before: end-warning
19+
20+
.. rubric:: Availability
21+
22+
.. rubric:: Version 4.1.0
23+
24+
* New experimental function.
25+
26+
27+
Description
28+
-------------------------------------------------------------------------------
29+
30+
``pgr_makeBiconnectedPlanar`` identifies the missing edges that need to be added to each
31+
connected component of an existing planar graph to make those components biconnected,
32+
while ensuring the graph remains planar.
33+
34+
A graph is considered **biconnected** if it is connected and cannot be broken into
35+
disconnected pieces by deleting any single vertex (it has no articulation points).
36+
A planar graph is one that can be drawn in two-dimensional space with no two of
37+
its edges crossing.
38+
39+
The main characteristics are:
40+
41+
* Works for **undirected** graphs.
42+
* Works for **planar** graphs only.
43+
* If any component of the input graph is not planar, no added edges are returned for that component.
44+
* Returns a list of all new edges needed to make each connected component of the graph biconnected.
45+
* The algorithm does not consider traversal costs in the calculations.
46+
* The algorithm does not consider geometric topology in the calculations.
47+
* Running time: :math:`O(|V_G| + |E_G| + R \log R)` where :math:`G(V_G, E_G)` is the input graph and :math:`R` is the number of returned edges.
48+
49+
|Boost| Boost Graph Inside
50+
51+
Signatures
52+
-------------------------------------------------------------------------------
53+
54+
.. admonition:: \ \
55+
:class: signatures
56+
57+
| pgr_makeBiconnectedPlanar(`Edges SQL`_)
58+
59+
| Returns set of |result-component-make|
60+
| OR EMPTY SET
61+
62+
:Example: List of edges that are needed to make the graph biconnected planar.
63+
64+
**Sample graph before:**
65+
66+
.. figure:: /images/Fig6-undirected.png
67+
:scale: 50%
68+
69+
Sample graph before
70+
71+
**Output:**
72+
73+
.. literalinclude:: makeBiconnectedPlanar.queries
74+
:start-after: -- q1
75+
:end-before: -- q2
76+
77+
**Sample graph after adding biconnecting edges:**
78+
79+
.. figure:: images/biconnected_planar_sampledata.png
80+
:scale: 75%
81+
82+
Sample graph after adding biconnecting edges (olive = original edges, red dashed = 4 new biconnecting edges).
83+
Note: When a graph contains multiple disconnected components, each component is processed independently. Components (2,4) and (13,14) are already biconnected (0 articulation points) and require no new edges.
84+
85+
Parameters
86+
-------------------------------------------------------------------------------
87+
88+
.. include:: pgRouting-concepts.rst
89+
:start-after: only_edge_param_start
90+
:end-before: only_edge_param_end
91+
92+
Inner Queries
93+
-------------------------------------------------------------------------------
94+
95+
Edges SQL
96+
...............................................................................
97+
98+
.. include:: pgRouting-concepts.rst
99+
:start-after: basic_edges_sql_start
100+
:end-before: basic_edges_sql_end
101+
102+
Result columns
103+
-------------------------------------------------------------------------------
104+
105+
Returns set of |result-component-make|
106+
107+
.. list-table::
108+
:width: 81
109+
:widths: auto
110+
:header-rows: 1
111+
112+
* - Column
113+
- Type
114+
- Description
115+
* - ``seq``
116+
- ``BIGINT``
117+
- Sequential value starting from **1**.
118+
* - ``start_vid``
119+
- ``BIGINT``
120+
- Identifier of the first end point vertex of the edge.
121+
* - ``end_vid``
122+
- ``BIGINT``
123+
- Identifier of the second end point vertex of the edge.
124+
125+
Additional Examples
126+
-------------------------------------------------------------------------------
127+
128+
:Example: Biconnecting a simple 4-vertex line graph (path graph).
129+
130+
.. literalinclude:: makeBiconnectedPlanar.queries
131+
:start-after: -- q2
132+
:end-before: -- q3
133+
134+
**Sample graph before:**
135+
136+
.. figure:: images/biconnected_line_before.png
137+
:scale: 75%
138+
139+
Sample 4-vertex line graph before biconnecting (vertices 2 and 3 are articulation points).
140+
141+
**Output:**
142+
143+
.. literalinclude:: makeBiconnectedPlanar.queries
144+
:start-after: -- q3
145+
:end-before: -- q4
146+
147+
**Sample graph after adding biconnecting edges:**
148+
149+
.. figure:: images/biconnected_line_after.png
150+
:scale: 75%
151+
152+
Biconnected planar graph after adding edges (1,3) and (2,4) to eliminate articulation points without crossing.
153+
154+
See Also
155+
-------------------------------------------------------------------------------
156+
157+
* `Boost: make_biconnected_planar
158+
<https://www.boost.org/libs/graph/doc/make_biconnected_planar.html>`__
159+
* :doc:`sampledata`
160+
161+
.. rubric:: Indices and tables
162+
163+
* :ref:`genindex`
164+
* :ref:`search`

doc/planar/planar-family.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
:file: This file is part of the pgRouting project.
2+
:copyright: Copyright (c) 2020-2026 pgRouting developers
3+
:license: Creative Commons Attribution-Share Alike 3.0 https://creativecommons.org/licenses/by-sa/3.0
4+
5+
.. index:: Planar Family
6+
7+
|
8+
9+
Planar - Family of functions
10+
===============================================================================
11+
12+
.. include:: experimental.rst
13+
:start-after: warning-begin
14+
:end-before: end-warning
15+
16+
.. experimental-start
17+
18+
* :doc:`pgr_isPlanar` - Returns a boolean depending upon the planarity of the graph.
19+
* :doc:`pgr_makeBiconnectedPlanar` - Returns edges to add to a planar graph to make each connected component biconnected.
20+
21+
.. experimental-end
22+
23+
24+
.. toctree::
25+
:hidden:
26+
27+
pgr_isPlanar
28+
pgr_makeBiconnectedPlanar
29+
30+
.. rubric:: Indices and tables
31+
32+
* :ref:`genindex`
33+
* :ref:`search`

doc/src/experimental.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ Experimental Functions
129129

130130
.. rubric:: Planar Family
131131

132-
- :doc:`pgr_isPlanar`
132+
- :doc:`planar-family`
133133

134134
.. toctree::
135135
:hidden:
136136

137-
pgr_isPlanar
137+
planar-family
138138

139139
.. rubric:: Miscellaneous Algorithms
140140

0 commit comments

Comments
 (0)