Skip to content

Commit 9f67cb7

Browse files
committed
[makeBiconnectedPlanar/doc] Adding documentation for pgr_makeBiconnectedPlanar
1 parent d108fed commit 9f67cb7

9 files changed

Lines changed: 205 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: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
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 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 an
31+
existing planar graph to make it biconnected, while ensuring the graph remains planar.
32+
33+
A graph is considered **biconnected** if it is connected and cannot be broken into
34+
disconnected pieces by deleting any single vertex (it has no articulation points).
35+
A planar graph is one that can be drawn in two-dimensional space with no two of
36+
its edges crossing.
37+
38+
The main characteristics are:
39+
40+
* Works for **undirected** graphs.
41+
* Works for **planar** graphs only.
42+
* If the input graph is not planar, it returns an **empty set**.
43+
* Returns a list of all new edges needed to make the graph biconnected.
44+
* The algorithm does not consider traversal costs in the calculations.
45+
* The algorithm does not consider geometric topology in the calculations.
46+
* Running time: :math:`O(|V_G| + |E_G|)` where :math:`G(V_G, E_G)` is the input graph.
47+
48+
|Boost| Boost Graph Inside
49+
50+
Signatures
51+
-------------------------------------------------------------------------------
52+
53+
.. admonition:: \ \
54+
:class: signatures
55+
56+
| pgr_makeBiconnectedPlanar(`Edges SQL`_)
57+
58+
| Returns set of |result-component-make|
59+
| OR EMPTY SET
60+
61+
:Example: List of edges that are needed to make the graph biconnected planar.
62+
63+
**Sample graph before:**
64+
65+
.. figure:: /images/Fig6-undirected.png
66+
:scale: 50%
67+
68+
Sample graph before
69+
70+
**Output:**
71+
72+
.. literalinclude:: makeBiconnectedPlanar.queries
73+
:start-after: -- q1
74+
:end-before: -- q2
75+
76+
**Sample graph after adding biconnecting edges:**
77+
78+
.. figure:: images/biconnected_planar_sampledata.png
79+
:scale: 75%
80+
81+
Sample graph after adding biconnecting edges (olive = original edges, red dashed = 4 new biconnecting edges).
82+
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.
83+
84+
Parameters
85+
-------------------------------------------------------------------------------
86+
87+
.. include:: pgRouting-concepts.rst
88+
:start-after: only_edge_param_start
89+
:end-before: only_edge_param_end
90+
91+
Inner Queries
92+
-------------------------------------------------------------------------------
93+
94+
Edges SQL
95+
...............................................................................
96+
97+
.. include:: pgRouting-concepts.rst
98+
:start-after: basic_edges_sql_start
99+
:end-before: basic_edges_sql_end
100+
101+
Result columns
102+
-------------------------------------------------------------------------------
103+
104+
Returns set of |result-component-make|
105+
106+
.. list-table::
107+
:width: 81
108+
:widths: auto
109+
:header-rows: 1
110+
111+
* - Column
112+
- Type
113+
- Description
114+
* - ``seq``
115+
- ``BIGINT``
116+
- Sequential value starting from **1**.
117+
* - ``start_vid``
118+
- ``BIGINT``
119+
- Identifier of the first end point vertex of the edge.
120+
* - ``end_vid``
121+
- ``BIGINT``
122+
- Identifier of the second end point vertex of the edge.
123+
124+
Additional Examples
125+
-------------------------------------------------------------------------------
126+
127+
:Example: Biconnecting a simple 4-vertex line graph (path graph).
128+
129+
.. literalinclude:: makeBiconnectedPlanar.queries
130+
:start-after: -- q2
131+
:end-before: -- q3
132+
133+
**Sample graph before:**
134+
135+
.. figure:: images/biconnected_line_before.png
136+
:scale: 75%
137+
138+
Sample 4-vertex line graph before biconnecting (vertices 2 and 3 are articulation points).
139+
140+
**Output:**
141+
142+
.. literalinclude:: makeBiconnectedPlanar.queries
143+
:start-after: -- q3
144+
:end-before: -- q4
145+
146+
**Sample graph after adding biconnecting edges:**
147+
148+
.. figure:: images/biconnected_line_after.png
149+
:scale: 75%
150+
151+
Biconnected planar graph after adding edges (1,3) and (2,4) to eliminate articulation points without crossing.
152+
153+
See Also
154+
-------------------------------------------------------------------------------
155+
156+
* `Boost: make_biconnected_planar
157+
<https://www.boost.org/libs/graph/doc/make_biconnected_planar.html>`__
158+
* :doc:`sampledata`
159+
160+
.. rubric:: Indices and tables
161+
162+
* :ref:`genindex`
163+
* :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 biconnected planar graph to make it maximal planar.
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)