Skip to content

Week 3 bandwidth #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0c2a602
Removed unwanted comments
Saloni-2005 Jun 16, 2025
96bee35
Updated file name from gragh_bandwidth_rt.h -> bandwidth_rt.h in src/…
Saloni-2005 Jun 16, 2025
43cb2d9
Standardizing pgr_DAGshortestPath to one path result columns
cvvergara Jun 12, 2025
0bc0fd0
(pgr_DAGshortestPath) updating NEWS and release notes about standardi…
cvvergara Jun 13, 2025
f582cfe
Update locale: commit 386ec71f1f
github-actions[bot] Jun 14, 2025
bd2cff4
Ignore run.sh in root
sanak Jun 15, 2025
a70de06
Merge remote-tracking branch 'pgr/develop' into week-3-bandwidth
Saloni-2005 Jun 16, 2025
8079ecf
Standardizing pgr_binaryBreadthFirstSearch to one path result columns
cvvergara Jun 14, 2025
cd2bdad
(pgr_binaryBreadthFirstSearch) updating NEWS and release notes about …
cvvergara Jun 14, 2025
402a4fb
Update locale: commit 07304c4b70
github-actions[bot] Jun 16, 2025
1a458c6
Merge remote-tracking branch 'pgr/develop' into week-3-bandwidth
Saloni-2005 Jun 17, 2025
f35500d
Commented the part of code from metrics_process.cpp so that it not ge…
Saloni-2005 Jun 17, 2025
c56c1be
Updated include and function name in metrics_process.cpp to maintain…
Saloni-2005 Jun 17, 2025
d455648
Updated include and function name in metrics_driver.cpp to maintain …
Saloni-2005 Jun 17, 2025
379bf4e
Upadted include file name from graph_bandwidth_rt.h -> bandwidth_rt.h
Saloni-2005 Jun 17, 2025
4f26434
Updated parameters and data types in metrics_process.h
Saloni-2005 Jun 18, 2025
431da5c
Udated metrics_process.cpp based on the method change in pgr_process_…
Saloni-2005 Jun 18, 2025
be3b9eb
Changed name of function from pgr_process_bandwidth to pgr_process_me…
Saloni-2005 Jun 18, 2025
c82e904
Updated src/metrics/bandwidth.c to match it with the previous changes…
Saloni-2005 Jun 18, 2025
d05ecb5
Fixed include in src/metrics/bandwidth.c
Saloni-2005 Jun 18, 2025
fd61bdb
Created metrics_rt.h and updated the includes
Saloni-2005 Jun 18, 2025
0130233
Updated metrics_process.cpp chnaged : pgr_alloc -> pgrouting::pgr_alloc
Saloni-2005 Jun 18, 2025
31d7dc6
Commented some part to compile successfully
Saloni-2005 Jun 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ notUsed

.vscode
taptest.sh
run.sh
36 changes: 22 additions & 14 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ Functions promoted to official

**Signatures promoted to official**

[#2718](https://github.com/pgRouting/pgrouting/issues/2918)
Make official the Combinations signature on the official functions

* pgr_aStar(Combinations)
* pgr_aStarCost(Combinations)
* pgr_bdAstar(Combinations)
Expand All @@ -74,14 +77,8 @@ SQL signatures and output standardization
[#2904](https://github.com/pgRouting/pgrouting/issues/2904)
Standardize output columns of functions with different output columns within overloads


**Official functions**

* [#2906](https://github.com/pgRouting/pgrouting/issues/2906) pgr_bdDijkstra

* Output columns standardized to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)``
* Combinations signature promoted to official.

* [#2905](https://github.com/pgRouting/pgrouting/issues/2905)
pgr_withPoints

Expand All @@ -92,15 +89,10 @@ Standardize output columns of functions with different output columns within ove
- Directed graph valid values: ``l`` or ``L`` and ``r``, ``R``
- Undirected graph valid values: ``b`` or ``B``

* [#2905](https://github.com/pgRouting/pgrouting/issues/2905)
pgr_withPointsCost
* [#2906](https://github.com/pgRouting/pgrouting/issues/2906) pgr_bdDijkstra

* Function promoted to official.
* Output columns standardized to ``(start_vid, end_vid, agg_cost)``
* Signature change: ``driving_side`` parameter changed from named optional to
unnamed positional.
- Directed graph valid values: ``l`` or ``L`` and ``r``, ``R``
- Undirected graph valid values: ``b`` or ``B``
* Output columns standardized to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)``
* Combinations signature promoted to official.

**Experimental functions**

Expand All @@ -109,11 +101,21 @@ Standardize output columns of functions with different output columns within ove

* Output columns standardized to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)``

* [#2908](https://github.com/pgRouting/pgrouting/issues/2908)
pgr_binaryBreadthFirstSearch

* Output columns standardized to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)``

* [#2910](https://github.com/pgRouting/pgrouting/issues/2910)
pgr_edwardMoore

* Output columns standardized to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)``

* [#2913](https://github.com/pgRouting/pgrouting/issues/2913)
pgr_DAGshortestPath

* Output columns standardized to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)``

Removal of SQL deprecated signatures
...............................................................................

Expand Down Expand Up @@ -207,6 +209,10 @@ Related issues: [#2897](https://github.com/pgRouting/pgrouting/issues/2897)
* _v4trsp(text,text,text,boolean)
* _pgr_tspeuclidean(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean)
* _pgr_tsp(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean)
* [#2913](https://github.com/pgRouting/pgrouting/issues/2913)
_pgr_dagshortestpath(text,text,boolean,boolean)
* [#2913](https://github.com/pgRouting/pgrouting/issues/2913)
_pgr_dagshortestpath(text,anyarray,anyarray,boolean,boolean)


* [#2861](https://github.com/pgRouting/pgrouting/issues/2861):
Expand Down Expand Up @@ -253,5 +259,7 @@ Code enhancements
* _v4trsp(text,text,anyarray,anyarray,boolean)
* _v4trsp(text,text,text,boolean)
* _pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean)
* [#2913](https://github.com/pgRouting/pgrouting/issues/2913)
_pgr_dagshortestpath

</details>
30 changes: 17 additions & 13 deletions doc/dagShortestPath/pgr_dagShortestPath.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,19 @@ In particular, the DAG shortest paths algorithm implemented by Boost.Graph.

.. rubric:: Availability

* Version 3.2.0
.. rubric:: Version 4.0.0

* New experimental function.
* Output columns standardized to |short-generic-result|

* pgr_dagShortestPath(Combinations)
.. rubric:: Version 3.2.0

* Version 3.0.0
* New experimental function.

* New experimental function.
* pgr_dagShortestPath(Combinations)

..rubric:: Version 3.0.0

* New experimental function.


Description
Expand Down Expand Up @@ -93,7 +97,7 @@ Signatures
| pgr_dagShortestPath(`Edges SQL`_, **start vids**, **end vids**)
| pgr_dagShortestPath(`Edges SQL`_, `Combinations SQL`_)

| Returns set of |result-1-1|
| Returns set of |short-generic-result|
| OR EMPTY SET


Expand All @@ -108,7 +112,7 @@ One to One

| pgr_dagShortestPath(`Edges SQL`_, **start vid**, **end vid**)

| Returns set of |result-1-1|
| Returns set of |short-generic-result|
| OR EMPTY SET

:Example: From vertex :math:`5` to vertex :math:`11` on a **directed** graph
Expand All @@ -128,7 +132,7 @@ One to Many

| pgr_dagShortestPath(`Edges SQL`_, **start vid**, **end vids**)

| Returns set of |result-1-1|
| Returns set of |short-generic-result|
| OR EMPTY SET

:Example: From vertex :math:`5` to vertices :math:`\{7, 11\}`
Expand All @@ -148,7 +152,7 @@ Many to One

| pgr_dagShortestPath(`Edges SQL`_, **start vids**, **end vid**)

| Returns set of |result-1-1|
| Returns set of |short-generic-result|
| OR EMPTY SET

:Example: From vertices :math:`\{5, 10\}` to vertex :math:`11`
Expand All @@ -168,7 +172,7 @@ Many to Many

| pgr_dagShortestPath(`Edges SQL`_, **start vids**, **end vids**)

| Returns set of |result-1-1|
| Returns set of |short-generic-result|
| OR EMPTY SET

:Example: From vertices :math:`\{5, 15\}` to vertices :math:`\{11, 17\}` on an
Expand All @@ -189,7 +193,7 @@ Combinations

| pgr_dagShortestPath(`Edges SQL`_, `Combinations SQL`_)

| Returns set of |result-1-1|
| Returns set of |short-generic-result|
| OR EMPTY SET

:Example: Using a combinations table on an **undirected** graph
Expand Down Expand Up @@ -234,8 +238,8 @@ Return columns
-------------------------------------------------------------------------------

.. include:: pgRouting-concepts.rst
:start-after: return_path_short_start
:end-before: return_path_short_end
:start-after: return_path_complete_start
:end-before: return_path_complete_end

Additional Examples
-------------------------------------------------------------------------------
Expand Down
25 changes: 25 additions & 0 deletions doc/src/migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ types.
- `Migration of single path functions`_
* - .. versionchanged:: 4.0.0 :doc:`pgr_bellmanFord` [3]_
- `Migration of single path functions`_
* - .. versionchanged:: 4.0.0 :doc:`pgr_binaryBreadthFirstSearch` [3]_
- `Migration of single path functions`_
* - .. versionchanged:: 4.0.0 :doc:`pgr_dagShortestPath` [3]_
- `Migration of single path functions`_
* - .. versionchanged:: 4.0.0 :doc:`pgr_edwardMoore` [3]_
- `Migration of single path functions`_
* - .. versionchanged:: 4.0.0 :doc:`pgr_withPoints` [2]_
Expand Down Expand Up @@ -313,6 +317,9 @@ application.
* - ``pgr_bellmanFord``
- v < 4.0
- |old-generic-result|
* - ``pgr_dagShortestPath``
- v < 4.0
- |result-1-1|
* - ``pgr_edwardMoore``
- v < 4.0
- |old-generic-result|
Expand Down Expand Up @@ -410,6 +417,24 @@ Before updating pgRouting enumerate the columns: |result-1-1|
:start-after: --bdDijkstra-1-to-1-filter
:end-before: --bdDijkstra-1-to-m

.. rubric:: Using ``pgr_DAGshortestPath``

Migrating `this v3.8
<https://docs.pgrouting.org/3.8/en/pgr_dagShortestPath.html#one-to-one>`__
example.

.. literalinclude:: migration.queries
:start-after: --DAGshortestPath-1-to-1
:end-before: --DAGshortestPath-1-to-1-filter

Before updating pgRouting enumerate the columns: |result-1-1|

.. literalinclude:: migration.queries
:start-after: --DAGshortestPath-1-to-1-filter
:end-before: --DAGshortestPath-END

.. note:: This applies to all signatures of ``pgr_DAGshortestPath``

Examples for One to Many with one route result
...............................................................................

Expand Down
35 changes: 25 additions & 10 deletions doc/src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ Functions promoted to official

.. rubric:: Signatures promoted to official

`#2718 <https://github.com/pgRouting/pgrouting/issues/2918>`__
Make official the Combinations signature on the official functions

* pgr_aStar(Combinations)
* pgr_aStarCost(Combinations)
* pgr_bdAstar(Combinations)
Expand All @@ -95,26 +98,18 @@ SQL signatures and output standardization
`#2904 <https://github.com/pgRouting/pgrouting/issues/2904>`__
Standardize output columns of functions with different output columns within overloads


.. rubric:: Official functions

* `#2906 <https://github.com/pgRouting/pgrouting/issues/2906>`__ pgr_bdDijkstra

.. include:: pgr_bdDijkstra.rst
:start-after: Version 4.0.0
:end-before: .. rubric

* `#2905 <https://github.com/pgRouting/pgrouting/issues/2905>`__
pgr_withPoints

.. include:: pgr_withPoints.rst
:start-after: Version 4.0.0
:end-before: .. rubric

* `#2905 <https://github.com/pgRouting/pgrouting/issues/2905>`__
pgr_withPointsCost
* `#2906 <https://github.com/pgRouting/pgrouting/issues/2906>`__ pgr_bdDijkstra

.. include:: pgr_withPointsCost.rst
.. include:: pgr_bdDijkstra.rst
:start-after: Version 4.0.0
:end-before: .. rubric

Expand All @@ -127,13 +122,27 @@ Standardize output columns of functions with different output columns within ove
:start-after: Version 4.0.0
:end-before: .. rubric

* `#2908 <https://github.com/pgRouting/pgrouting/issues/2908>`__
pgr_binaryBreadthFirstSearch

.. include:: pgr_binaryBreadthFirstSearch.rst
:start-after: Version 4.0.0
:end-before: .. rubric

* `#2910 <https://github.com/pgRouting/pgrouting/issues/2910>`__
pgr_edwardMoore

.. include:: pgr_edwardMoore.rst
:start-after: Version 4.0.0
:end-before: .. rubric

* `#2913 <https://github.com/pgRouting/pgrouting/issues/2913>`__
pgr_DAGshortestPath

.. include:: pgr_dagShortestPath.rst
:start-after: Version 4.0.0
:end-before: .. rubric

Removal of SQL deprecated signatures
...............................................................................

Expand Down Expand Up @@ -227,6 +236,10 @@ Related issues: `#2897 <https://github.com/pgRouting/pgrouting/issues/2897>`__
* _v4trsp(text,text,text,boolean)
* _pgr_tspeuclidean(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean)
* _pgr_tsp(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean)
* `#2913 <https://github.com/pgRouting/pgrouting/issues/2913>`__
_pgr_dagshortestpath(text,text,boolean,boolean)
* `#2913 <https://github.com/pgRouting/pgrouting/issues/2913>`__
_pgr_dagshortestpath(text,anyarray,anyarray,boolean,boolean)


* `#2861 <https://github.com/pgRouting/pgrouting/issues/2861>`__:
Expand Down Expand Up @@ -273,6 +286,8 @@ Code enhancements
* _v4trsp(text,text,anyarray,anyarray,boolean)
* _v4trsp(text,text,text,boolean)
* _pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean)
* `#2913 <https://github.com/pgRouting/pgrouting/issues/2913>`__
_pgr_dagshortestpath

pgRouting 3
*******************************************************************************
Expand Down
24 changes: 14 additions & 10 deletions doc/traversal/pgr_binaryBreadthFirstSearch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,19 @@ non-negative integer, is termed as a 'binary graph'.

.. rubric:: Availability

* Version 3.2.0
.. rubric:: Version 4.0.0

* New experimental signature:
* Output columns standardized to |short-generic-result|

* pgr_binaryBreadthFirstSearch(Combinations)
.. rubric:: Version 3.2.0

* Version 3.0.0
* New experimental signature:

* New experimental function.
* pgr_binaryBreadthFirstSearch(Combinations)

.. rubric:: Version 3.0.0

* New experimental function.

Description
-------------------------------------------------------------------------------
Expand All @@ -47,7 +51,7 @@ vertices can be found using Breadth First Search in :math:`O(|E|)` in an
unweighted graph, i.e. the distance is the minimal number of edges that you
need to traverse from the source to another vertex. We can interpret such a
graph also as a weighted graph, where every edge has the weight :math:`1`.
If not alledges in graph have the same weight, that we need a more general
If not all edges in graph have the same weight, that we need a more general
algorithm, like Dijkstra's Algorithm which runs in :math:`O(|E|log|V|)` time.

However if the weights are more constrained, we can use a faster algorithm.
Expand Down Expand Up @@ -87,7 +91,7 @@ Signatures
| pgr_binaryBreadthFirstSearch(`Edges SQL`_, **start vids**, **end vids**, [``directed``])
| pgr_binaryBreadthFirstSearch(`Edges SQL`_, `Combinations SQL`_, [``directed``])

| Returns set of |old-generic-result|
| Returns set of |short-generic-result|
| OR EMPTY SET

**Note:** Using the :doc:`sampledata` Network as all weights are same (i.e
Expand All @@ -104,7 +108,7 @@ One to One

| pgr_binaryBreadthFirstSearch(`Edges SQL`_, **start vid**, **end vid**, [``directed``])

| Returns set of |result-1-1|
| Returns set of |short-generic-result|
| OR EMPTY SET

:Example: From vertex :math:`6` to vertex :math:`10` on a **directed** graph
Expand All @@ -124,7 +128,7 @@ One to Many

| pgr_binaryBreadthFirstSearch(`Edges SQL`_, **start vid**, **end vids**, [``directed``])

| Returns set of |result-1-m|
| Returns set of |short-generic-result|
| OR EMPTY SET

:Example: From vertex :math:`6` to vertices :math:`\{10, 17\}` on a **directed**
Expand All @@ -145,7 +149,7 @@ Many to One

| pgr_binaryBreadthFirstSearch(`Edges SQL`_, **start vids**, **end vid**, [``directed``])

| Returns set of |result-m-1|
| Returns set of |short-generic-result|
| OR EMPTY SET

:Example: From vertices :math:`\{6, 1\}` to vertex :math:`17` on a **directed**
Expand Down
Loading