Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/boost_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Get postgres version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- centos-7 gcc-4.8.5

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: get postgres version
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/check-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Signatures are not removed
run: |
tools/scripts/test_signatures.sh
Expand All @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: News file up to date
run: |
tools/release-scripts/notes2news.pl
Expand All @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Install Requirements
run: |
sudo apt install -y licensecheck
Expand All @@ -53,7 +53,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Install Requirements
run: |
sudo apt install -y shellcheck
Expand All @@ -64,9 +64,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Checkout cpplint
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: 'cpplint/cpplint'
ref: "develop"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-queries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
os: [ubuntu-latest, ubuntu-26.04]

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: get postgres version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
os: [ubuntu-latest, ubuntu-26.04, ubuntu-22.04]

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Get postgres version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
language: [en, es, zh_Hans, sv]

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: install deps
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
os: [ubuntu-latest, ubuntu-26.04, ubuntu-22.04]

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: 'Raise Priority for apt.postgresql.org'
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 0

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
workflow_dispatch:
push:
paths:
- '.github/workflows/ubuntu.yml'
- '.github/workflows/update.yml'
- 'src/**'
- 'include/**'
- 'sql/**'
Expand All @@ -27,7 +27,7 @@ on:

pull_request:
paths:
- '.github/workflows/check-queries.yml'
- '.github/workflows/update.yml'
- 'src/**'
- 'include/**'
- 'sql/**'
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
matrix:
boost_minor: [74]
old_pgr: [
4.0.1, 4.0.0,
4.0.2, 4.0.1, 4.0.0,
3.8.0,
3.7.3, 3.7.2, 3.7.1, 3.7.0,
3.6.3, 3.6.2, 3.6.1, 3.6.0,
Expand All @@ -68,7 +68,7 @@ jobs:
]

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Get postgres version
run: |
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
sudo mv boost_1_${{ matrix.boost_minor }}_0/boost /usr/include/

- name: get old version
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: 'pgRouting/pgrouting'
ref: "v${{ matrix.old_pgr }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ string(TIMESTAMP COMPILATION_DATE "%Y/%m/%d" UTC)

set(MINORS 4.1 4.0 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.6)
set(OLD_SIGNATURES
4.0.2 4.0.1 4.0.0
4.0.3 4.0.2 4.0.1 4.0.0
3.8.0
3.7.3 3.7.2 3.7.1 3.7.0
3.6.3 3.6.2 3.6.1 3.6.0
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ To see all issues & pull requests closed by this release see the
## pgRouting 4.0


<details> <summary>pgRouting 4.0.3 Release Notes</summary>

4.0.3 Bug fixes

* [#3176](https://github.com/pgRouting/pgrouting/issues/3176): Boost broken links
* [#3180](https://github.com/pgRouting/pgrouting/issues/3180): Undirected graph with cost != reverse_cost: aStar, bdAstar and
bdDijkstra functions return every node and edge twice

</details>

<details> <summary>pgRouting 4.0.2 Release Notes</summary>

To see all issues & pull requests closed by this release see the
Expand Down
2 changes: 1 addition & 1 deletion doc/src/pgRouting-installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ be found in `Installation wiki

To use pgRouting, PostGIS needs to be installed, please read the information
about installation in this `Install Guide
<https://www.postgis.us/presentations/postgis_install_guide_22.html>`__
<https://postgis.net/documentation/getting_started/>`__

.. _install-short:

Expand Down
10 changes: 10 additions & 0 deletions doc/src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ pgRouting 4.0
:local:
:depth: 1

pgRouting 4.0.3 Release Notes
-------------------------------------------------------------------------------

4.0.3 Bug fixes
...............................................................................

* :issue:`3176`: Boost broken links
* :issue:`3180`: Undirected graph with cost != reverse_cost: aStar, bdAstar and
bdDijkstra functions return every node and edge twice

pgRouting 4.0.2 Release Notes
-------------------------------------------------------------------------------

Expand Down
44 changes: 44 additions & 0 deletions include/cpp_common/base_graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,50 @@ class Pgr_base_graph {
insert_edges_no_parallel(edges);
}

/**
* @brief Inserts edges storing a single undirected edge between 2 vertices
*
* cost is the minof(cost and reverse_cost).
* Avoids parallel edges.
*/
template <typename T>
void insert_edges_min(const std::vector<T> &edges) {
pgassert(is_undirected());
for (const auto &edge : edges) {
if ((edge.cost < 0) && (edge.reverse_cost < 0)) continue;

auto vm_s = get_V(T_V(edge, true));
auto vm_t = get_V(T_V(edge, false));

pgassert(vertices_map.find(edge.source) != vertices_map.end());
pgassert(vertices_map.find(edge.target) != vertices_map.end());

double c = edge.cost;
double rc = edge.reverse_cost;
double best = -1.0;
if (c >= 0 && (rc < 0 || c <= rc)) best = c;
else if (rc >= 0) best = rc;

if (best < 0) continue;

E e1;
bool found = false;
boost::tie(e1, found) = boost::edge(vm_s, vm_t, graph);
if (found) {
if (best < graph[e1].cost) {
graph[e1].cost = best;
graph[e1].id = edge.id;
}
} else {
bool inserted = false;
E e;
boost::tie(e, inserted) = boost::add_edge(vm_s, vm_t, graph);
graph[e].cost = best;
graph[e].id = edge.id;
}
}
}

template <typename T> void insert_min_edges_no_parallel(const std::vector<T> &edges) {
for (const auto &edge : edges) {
graph_add_min_edge_no_parallel(edge);
Expand Down
2 changes: 1 addition & 1 deletion locale/de/LC_MESSAGES/pgrouting_doc_strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -5930,7 +5930,7 @@ msgstr ""
msgid "Instructions for downloading and installing binaries for different operating systems, additional notes and corrections not included in this documentation can be found in `Installation wiki <https://github.com/pgRouting/pgrouting/wiki/Notes-on-Download%2C-Installation-and-building-pgRouting>`__"
msgstr ""

msgid "To use pgRouting, PostGIS needs to be installed, please read the information about installation in this `Install Guide <https://www.postgis.us/presentations/postgis_install_guide_22.html>`__"
msgid "To use pgRouting, PostGIS needs to be installed, please read the information about installation in this `Install Guide <https://postgis.net/documentation/getting_started/>`__"
msgstr ""

msgid "Short Version"
Expand Down
13 changes: 11 additions & 2 deletions locale/en/LC_MESSAGES/pgrouting_doc_strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pgRouting v4.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-11-08 20:40+0000\n"
"POT-Creation-Date: 2026-11-24 16:11+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -6153,7 +6153,7 @@ msgstr ""
msgid "Instructions for downloading and installing binaries for different operating systems, additional notes and corrections not included in this documentation can be found in `Installation wiki <https://github.com/pgRouting/pgrouting/wiki/Notes-on-Download%2C-Installation-and-building-pgRouting>`__"
msgstr ""

msgid "To use pgRouting, PostGIS needs to be installed, please read the information about installation in this `Install Guide <https://www.postgis.us/presentations/postgis_install_guide_22.html>`__"
msgid "To use pgRouting, PostGIS needs to be installed, please read the information about installation in this `Install Guide <https://postgis.net/documentation/getting_started/>`__"
msgstr ""

msgid "Short Version"
Expand Down Expand Up @@ -13640,6 +13640,15 @@ msgstr ""
msgid "pgRouting 4.0"
msgstr ""

msgid "pgRouting 4.0.3 Release Notes"
msgstr ""

msgid "4.0.3 Bug fixes"
msgstr ""

msgid ":issue:`3180`: Undirected graph with cost != reverse_cost: aStar, bdAstar and bdDijkstra functions return every node and edge twice"
msgstr ""

msgid "pgRouting 4.0.2 Release Notes"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions locale/es/LC_MESSAGES/pgrouting_doc_strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -5950,8 +5950,8 @@ msgstr "Instalación"
msgid "Instructions for downloading and installing binaries for different operating systems, additional notes and corrections not included in this documentation can be found in `Installation wiki <https://github.com/pgRouting/pgrouting/wiki/Notes-on-Download%2C-Installation-and-building-pgRouting>`__"
msgstr "Las instrucciones para descargar e instalar los binarios para diferentes sistemas operativos, notas adicionales y correcciones no incluidas en esta documentación se pueden encontrar en `Installation wiki <https://github.com/pgRouting/pgrouting/wiki/Notes-on-Download%2C-Installation-and-building-pgRouting>`__"

msgid "To use pgRouting, PostGIS needs to be installed, please read the information about installation in this `Install Guide <https://www.postgis.us/presentations/postgis_install_guide_22.html>`__"
msgstr "Para utilizar pgRouting, PostGIS necesita ser instalado, por favor lea la información sobre la instalación en esta `Guía de Instalación <https://www.postgis.us/presentations/postgis_install_guide_22.html>`__"
msgid "To use pgRouting, PostGIS needs to be installed, please read the information about installation in this `Install Guide <https://postgis.net/documentation/getting_started/>`__"
msgstr "Para utilizar pgRouting, PostGIS necesita ser instalado, por favor lea la información sobre la instalación en esta `Guía de Instalación <https://postgis.net/documentation/getting_started/>`__"

msgid "Short Version"
msgstr "Versión corta"
Expand Down
2 changes: 1 addition & 1 deletion locale/ja/LC_MESSAGES/pgrouting_doc_strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -6088,7 +6088,7 @@ msgstr "インストール"
msgid "Instructions for downloading and installing binaries for different operating systems, additional notes and corrections not included in this documentation can be found in `Installation wiki <https://github.com/pgRouting/pgrouting/wiki/Notes-on-Download%2C-Installation-and-building-pgRouting>`__"
msgstr ""

msgid "To use pgRouting, PostGIS needs to be installed, please read the information about installation in this `Install Guide <https://www.postgis.us/presentations/postgis_install_guide_22.html>`__"
msgid "To use pgRouting, PostGIS needs to be installed, please read the information about installation in this `Install Guide <https://postgis.net/documentation/getting_started/>`__"
msgstr ""

msgid "Short Version"
Expand Down
2 changes: 1 addition & 1 deletion locale/ko/LC_MESSAGES/pgrouting_doc_strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -6038,7 +6038,7 @@ msgstr "설치"
msgid "Instructions for downloading and installing binaries for different operating systems, additional notes and corrections not included in this documentation can be found in `Installation wiki <https://github.com/pgRouting/pgrouting/wiki/Notes-on-Download%2C-Installation-and-building-pgRouting>`__"
msgstr ""

msgid "To use pgRouting, PostGIS needs to be installed, please read the information about installation in this `Install Guide <https://www.postgis.us/presentations/postgis_install_guide_22.html>`__"
msgid "To use pgRouting, PostGIS needs to be installed, please read the information about installation in this `Install Guide <https://postgis.net/documentation/getting_started/>`__"
msgstr ""

msgid "Short Version"
Expand Down
13 changes: 11 additions & 2 deletions locale/pot/pgrouting_doc_strings.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pgRouting v4.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-11-08 20:40+0000\n"
"POT-Creation-Date: 2026-11-24 16:11+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -6139,7 +6139,7 @@ msgstr ""
msgid "Instructions for downloading and installing binaries for different operating systems, additional notes and corrections not included in this documentation can be found in `Installation wiki <https://github.com/pgRouting/pgrouting/wiki/Notes-on-Download%2C-Installation-and-building-pgRouting>`__"
msgstr ""

msgid "To use pgRouting, PostGIS needs to be installed, please read the information about installation in this `Install Guide <https://www.postgis.us/presentations/postgis_install_guide_22.html>`__"
msgid "To use pgRouting, PostGIS needs to be installed, please read the information about installation in this `Install Guide <https://postgis.net/documentation/getting_started/>`__"
msgstr ""

msgid "Short Version"
Expand Down Expand Up @@ -13618,6 +13618,15 @@ msgstr ""
msgid "pgRouting 4.0"
msgstr ""

msgid "pgRouting 4.0.3 Release Notes"
msgstr ""

msgid "4.0.3 Bug fixes"
msgstr ""

msgid ":issue:`3180`: Undirected graph with cost != reverse_cost: aStar, bdAstar and bdDijkstra functions return every node and edge twice"
msgstr ""

msgid "pgRouting 4.0.2 Release Notes"
msgstr ""

Expand Down
Loading
Loading