Skip to content

Commit e19f387

Browse files
committed
(sloanOrdering/doc) Adding documentation for pgr_sloanOrdering
1 parent 9eadf7a commit e19f387

File tree

5 files changed

+158
-5
lines changed

5 files changed

+158
-5
lines changed

doc/_static/page_history.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function createInfo(file, newat, altnames = '', removedat = '') {
55
this.removedat = removedat;
66
}
77

8-
const versionsArr = ['3.8','3.7', '3.6', '3.5', '3.4', '3.3', '3.2', '3.1', '3.0'];
8+
const versionsArr = ['4.0', '3.8','3.7', '3.6', '3.5', '3.4', '3.3', '3.2', '3.1', '3.0'];
99
var unsuportedArr = ['2.6', '2.5', '2.4', '2.3', '2.2', '2.1', '2.0'];
1010
var titles = [
1111
{k: 'en', v: ['Supported versions', 'Unsupported versions']},
@@ -15,7 +15,7 @@ var titles = [
1515

1616

1717
var newpages = [
18-
{v: '4.0', pages: ['pgr_bandwidth', 'pgr_kingOrdering']},
18+
{v: '4.0', pages: ['pgr_bandwidth', 'pgr_kingOrdering', 'pgr_sloanOrdering']},
1919

2020
{v: '3.8', pages: ['pgr_contractionDeadEnd', 'pgr_contractionLinear', 'pgr_separateCrossing',
2121
'pgr_separateTouching']},

doc/ordering/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ SET(LOCAL_FILES
22
ordering-family.rst
33
pgr_cuthillMckeeOrdering.rst
44
pgr_topologicalSort.rst
5+
pgr_sloanOrdering.rst
56
pgr_kingOrdering.rst
67
)
78

doc/ordering/ordering-family.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Ordering - Family of functions
2424
* :doc:`pgr_cuthillMckeeOrdering` - Return reverse Cuthill-McKee ordering of an undirected graph.
2525
* :doc:`pgr_topologicalSort` - Linear ordering of the vertices for directed
2626
acyclic graph.
27-
* :doc:`pgr_kingOrdering` - Returns the King ordering of an undirected graphs
28-
acyclic graph.
27+
* :doc:`pgr_sloanOrdering` - Returns the sloan ordering of an undirected graph.
28+
* :doc:`pgr_kingOrdering` - Returns the King ordering of an undirected graph.
2929

3030
.. official-end
3131
@@ -34,6 +34,7 @@ Ordering - Family of functions
3434

3535
pgr_cuthillMckeeOrdering
3636
pgr_topologicalSort
37+
pgr_sloanOrdering
3738
pgr_kingOrdering
3839

3940
See Also

doc/ordering/pgr_sloanOrdering.rst

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
..
2+
****************************************************************************
3+
pgRouting Manual
4+
Copyright(c) pgRouting Contributors
5+
6+
This documentation is licensed under a Creative Commons Attribution-Share
7+
8+
Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/
9+
****************************************************************************
10+
11+
.. index::
12+
single: Ordering Family ; pgr_sloanOrdering
13+
single: pgr_sloanOrdering - Experimental on v4.0
14+
15+
|
16+
17+
``pgr_sloanOrdering`` - Experimental
18+
===============================================================================
19+
20+
``pgr_sloanOrdering`` — Returns the sloan ordering of an undirected
21+
graph
22+
23+
.. include:: experimental.rst
24+
:start-after: warning-begin
25+
:end-before: end-warning
26+
27+
.. rubric:: Availability
28+
29+
.. rubric:: Version 4.0.0
30+
31+
* New experimental function.
32+
33+
34+
Description
35+
-------------------------------------------------------------------------------
36+
37+
The Sloan ordering algorithm reorders the vertices of a graph to reduce
38+
bandwidth, profile, and wavefront properties, which is particularly useful for
39+
sparse matrix computations and finite element analysis.
40+
41+
* Finds a pseudoperipheral vertex pair to determine good starting points
42+
* Uses a priority-based algorithm that balances vertex degree and distance from the start vertex.
43+
* Aims to mininimize bandwidth (maximum difference between connected vertex indices.
44+
* The implementation is for undirected graphs
45+
* Typically produces better orderings than simple breadth-first approaches.
46+
* Run time is 0.115846 seconds.
47+
48+
|Boost| Boost Graph inside
49+
50+
Signatures
51+
------------------------------------------------------------------------------
52+
..rubric::Summary
53+
54+
.. index::
55+
single: sloanOrdering - Experimental on v4.0
56+
57+
.. admonition:: \ \
58+
:class: signatures
59+
60+
| pgr_sloanOrdering(`Edges SQL`_)
61+
62+
| Returns set of |result_node_order|
63+
| OR EMPTY SET
64+
65+
:Example : Sloan ordering without specifying start vertex
66+
67+
.. literalinclude:: sloanOrdering.queries
68+
:start-after: -- q1
69+
:end-before: -- q2
70+
71+
.. Parameters, Inner Queries & result columns
72+
73+
Parameters
74+
-------------------------------------------------------------------------------
75+
76+
.. include:: pgRouting-concepts.rst
77+
:start-after: only_edge_param_start
78+
:end-before: only_edge_param_end
79+
80+
Inner Queries
81+
-------------------------------------------------------------------------------
82+
83+
Edges SQL
84+
...............................................................................
85+
86+
.. include:: pgRouting-concepts.rst
87+
:start-after: basic_edges_sql_start
88+
:end-before: basic_edges_sql_end
89+
90+
Result columns
91+
-------------------------------------------------------------------------------
92+
93+
Returns set of ``(seq, node)``
94+
95+
=============== =========== ======================================
96+
Column Type Description
97+
=============== =========== ======================================
98+
``seq`` ``BIGINT`` Sequence of the order starting from 1.
99+
``node`` ``BIGINT`` New sloan ordering order.
100+
=============== =========== ======================================
101+
102+
Additional Examples
103+
104+
:Example: Sloan ordering of Original graph from Boost example (vertices 0-9).
105+
106+
..graphviz::
107+
108+
graph G{
109+
node[shape=circle, style=filled, fillcolor=lightblue, color=black, fontcolor=black, fontsize=12];
110+
edge[color=black, penwidth=1.5];
111+
112+
0 -- 3;
113+
0 -- 5;
114+
1 -- 2;
115+
1 -- 4;
116+
1 -- 6;
117+
1 -- 9;
118+
2 -- 3;
119+
2 -- 4;
120+
3 -- 5;
121+
3 -- 8;
122+
4 -- 6;
123+
5 -- 6;
124+
5 -- 7;
125+
6 -- 7;
126+
127+
{rank=same; 0; 8;}
128+
{rank=same; 3; 5; 7;}
129+
{rank=same; 2; 4; 6;}
130+
{rank=same; 1; 9;}
131+
132+
}
133+
134+
..literalinclude::sloanOrdering.queries
135+
:start-after: --q3
136+
:end-before: --q4
137+
138+
139+
See Also
140+
-------------------------------------------------------------------------------
141+
142+
* :doc:`sampledata`
143+
* `Boost: Sloan Ordering
144+
<https://www.boost.org/libs/graph/doc/sloan_ordering.html>`__
145+
146+
.. rubric:: Indices and tables
147+
148+
* :ref:`genindex`
149+
* :ref:`search`

doc/src/pgRouting-introduction.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ This Release Contributors
6666
Individuals in this release v4.0.0 (in alphabetical order)
6767
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6868

69-
Fan Wu
69+
Bipasha Gayary,
70+
Fan Wu,
7071
Regina Obe,
7172
Saloni kumari,
7273
Vicky Vergara
@@ -111,6 +112,7 @@ Aryan Gupta,
111112
Ashraf Hossain,
112113
Ashish Kumar,
113114
Aurélie Bousquet,
115+
Bipasha Gayary,
114116
Cayetano Benavent,
115117
Christian Gonzalez,
116118
Daniel Kastl,

0 commit comments

Comments
 (0)