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
24 changes: 18 additions & 6 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ jobs:

strategy:
fail-fast: false
matrix:
release: [Debug, Release]
os: [ubuntu-latest, ubuntu-22.04]

steps:
- uses: actions/checkout@v4
Expand All @@ -64,12 +67,21 @@ jobs:
echo "PGIS=3" >> $GITHUB_ENV
echo "PGPORT=5432" >> $GITHUB_ENV

- name: 'Raise Priority for apt.postgresql.org'
run: |
cat << EOF >> ./pgdg.pref
Package: *
Pin: release o=apt.postgresql.org
Pin-Priority: 600
EOF
sudo mv ./pgdg.pref /etc/apt/preferences.d/
sudo apt update

- name: Add PostgreSQL APT repository
run: |
sudo apt-get install curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt-get purge postgresql-*
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg-testing main ${PGVER}" > /etc/apt/sources.list.d/pgdg.list'
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null

- name: Install dependencies
run: |
Expand All @@ -84,13 +96,13 @@ jobs:
postgresql-${PGVER}-postgis-${PGIS}-scripts \
postgresql-server-dev-${PGVER}

- name: Configure
- name: Configure for clang
run: |
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
mkdir build
cd build
CXX=clang++ CC=clang cmake -DPOSTGRESQL_VERSION=${PGVER} \
-DCMAKE_BUILD_TYPE=Debug -DBUILD_HTML=OFF -DBUILD_DOXY=OFF \
-DCMAKE_BUILD_TYPE=${{ matrix.release }} -DBUILD_HTML=OFF -DBUILD_DOXY=OFF \
-DUSE_CLANG_TIDY=ON ..

- name: Build
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ on:
push:
paths:
- '.github/workflows/ubuntu.yml'
- 'src/**'
- 'include/**'
- 'pgtap/**'
- 'tools/testers/**'
- './CMakeLists.txt'

branches-ignore:
- 'gh-pages'
Expand All @@ -31,6 +36,7 @@ jobs:
matrix:
psql: [13,14,15,16,17,18]
postgis: [3]
release: [Debug, Release]
os: [ubuntu-latest, ubuntu-22.04]

steps:
Expand Down Expand Up @@ -69,7 +75,8 @@ jobs:
export PATH=/usr/lib/postgresql/${{ matrix.psql }}/bin:$PATH
mkdir build
cd build
cmake -DPOSTGRESQL_VERSION=${{ matrix.psql }} -DCMAKE_BUILD_TYPE=Release -DWITH_DOC=OFF ..
cmake -DPOSTGRESQL_VERSION=${{ matrix.psql }} \
-DCMAKE_BUILD_TYPE=${{ matrix.release }} -DBUILD_HTML=OFF -DBUILD_DOXY=OFF ..

- name: Build
run: |
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Summary of changes by function

* pgr_kingOrdering

* New experimental function.
* New experimental function.

* pgr_KSP

Expand Down Expand Up @@ -194,7 +194,7 @@ Summary of changes by function
* pgr_trspVia_withPoints

* Function promoted to official.
* **Driving side** parameter is positional unnamed and compulsory.
* **Driving side** parameter is positional unnamed.
* Valid values depend on kind of graph
* Breaking change, signatures no longer available:
* pgr_trspvia_withpoints(text,text,text,anyarray,boolean,boolean,boolean,character,boolean)
Expand Down
85 changes: 17 additions & 68 deletions doc/categories/via-category.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,13 @@ Via - Category

.. official-start

* :doc:`pgr_dijkstraVia`
* :doc:`pgr_withPointsVia`
* :doc:`pgr_trspVia`
* :doc:`pgr_trspVia_withPoints`

.. official-end

.. include:: proposed.rst
:start-after: warning-begin
:end-before: end-warning

.. proposed-start

* :doc:`pgr_dijkstraVia`

.. proposed-end

General Information
-------------------------------------------------------------------------------

Expand All @@ -52,76 +43,34 @@ Parameters
**Used in:**

* :doc:`pgr_dijkstraVia`
* :doc:`pgr_trspVia`

.. via_parameters_start

.. list-table::
:width: 81
:widths: 14 20 7 40
:header-rows: 1

* - Parameter
- Type
- Default
- Description
* - `Edges SQL`_
- ``TEXT``
-
- SQL query as described.
* - **via vertices**
- ``ARRAY`` [ **ANY-INTEGER** ]
-
- Array of ordered vertices identifiers that are going to be visited.

Where:

:ANY-INTEGER: SMALLINT, INTEGER, BIGINT

.. via_parameters_end
.. include:: pgr_dijkstraVia.rst
:start-after: via_parameters_start
:end-before: via_parameters_end

**Used in:**

* :doc:`pgr_withPointsVia`
* :doc:`pgr_trspVia_withPoints`

.. via_withPoints_parameters_start

.. list-table::
:width: 81
:widths: auto
:header-rows: 1

* - Parameter
- Type
- Description
* - `Edges SQL`_
- ``TEXT``
- SQL query as described.
* - `Points SQL`_
- ``TEXT``
- SQL query as described.
* - **via vertices**
- ``ARRAY`` [ **ANY-INTEGER** ]
- Array of ordered vertices identifiers that are going to be visited.
.. include:: pgr_withPointsVia.rst
:start-after: via_withPoints_parameters_start
:end-before: via_withPoints_parameters_end

* When positive it is considered a vertex identifier
* When negative it is considered a point identifier
* - **driving side**
- ``CHAR``
- Value in [``r``, ``R``, ``l``, ``L``, ``b``, ``B``] indicating if the driving side is:
**Used in:**

- [``r``, ``R``] for right driving side (for directed graph only)
- [``l``, ``L``] for left driving side (for directed graph only)
- [``b``, ``B``] for both (only for undirected graph)
* :doc:`pgr_trspVia`

.. include:: TRSP-family.rst
:start-after: via_parameters_start
:end-before: via_parameters_end

Where:
**Used in:**

:ANY-INTEGER: SMALLINT, INTEGER, BIGINT
:ANY-NUMERICAL: SMALLINT, INTEGER, BIGINT, REAL, FLOAT
* :doc:`pgr_trspVia_withPoints`

.. via_withPoints_parameters_end
.. include:: /pgr_trspVia_withPoints.rst
:start-after: trspvia_withPoints_parameters_start
:end-before: trspvia_withPoints_parameters_end

Besides the compulsory parameters each function has, there are optional
parameters that exist due to the kind of function.
Expand Down
29 changes: 24 additions & 5 deletions doc/categories/withPoints-category.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,34 @@ Parameters
- ``ARRAY[BIGINT]``
- Array of identifiers of ending vertices. Negative values are for point’s
identifiers.
* - **driving side**

.. withPoints_parameters_end

.. driving_side_start

.. list-table::
:width: 81
:widths: 14 14 44

* - [**driving side**]
- ``CHAR``
- Value in [``r``, ``R``, ``l``, ``L``, ``b``, ``B``] indicating if the driving side is:

- [``r``, ``R``] for right driving side (for directed graph only)
- [``l``, ``L``] for left driving side (for directed graph only)
- [``b``, ``B``] for both (only for undirected graph)
- For directed graph:

.. withPoints_parameters_end
- [``r``, ``R``] for right driving side
- [``l``, ``L``] for left driving side

- For undirected graph:

- [``b``, ``B``] for both driving sides

- Default values when parameter is missing:

- [``r``, ``R``] for directed graph
- [``l``, ``L``] for undirected graph

.. driving_side_end

Optional parameters
...............................................................................
Expand Down
36 changes: 29 additions & 7 deletions doc/dijkstra/pgr_dijkstraVia.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
****************************************************************************

.. index::
single: Dijkstra Family ; pgr_dijkstraVia - Proposed
single: Via Category ; pgr_dijkstraVia - Proposed
single: Dijkstra Family ; pgr_dijkstraVia
single: Via Category ; pgr_dijkstraVia
single: dijkstraVia - Proposed

|

``pgr_dijkstraVia`` - Proposed
``pgr_dijkstraVia``
===============================================================================

``pgr_dijkstraVia`` — Route that goes through a list of vertices.
Expand Down Expand Up @@ -45,7 +45,7 @@ Signatures
-------------------------------------------------------------------------------

.. index::
single: dijkstraVia - Proposed ; One Via - Proposed on 2.2
single: dijkstraVia ; One Via

One Via
...............................................................................
Expand All @@ -69,9 +69,31 @@ One Via
Parameters
-------------------------------------------------------------------------------

.. include:: via-category.rst
:start-after: via_parameters_start
:end-before: via_parameters_end
.. via_parameters_start

.. list-table::
:width: 81
:widths: 14 20 7 40
:header-rows: 1

* - Parameter
- Type
- Default
- Description
* - `Edges SQL`_
- ``TEXT``
-
- SQL query as described.
* - **via vertices**
- ``ARRAY`` [ **ANY-INTEGER** ]
-
- Array of ordered vertices identifiers that are going to be visited.

Where:

:ANY-INTEGER: SMALLINT, INTEGER, BIGINT

.. via_parameters_end

Optional parameters
...............................................................................
Expand Down
14 changes: 8 additions & 6 deletions doc/metrics/pgr_bandwidth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@

.. rubric:: Availability

.. rubic:: Version 4.0.0
.. rubric:: Version 4.0.0

* New experimental function.

Description
-------------------------------------------------------------------------------

Bandwidth measures how "spread out" the connections are in a graph when vertices are arranged in a linear order (like numbering them 1, 2, 3, etc.).
Bandwidth measures how "spread out" the connections are in a graph when vertices
are arranged in a linear order (like numbering them 1, 2, 3, etc.).

* For each edge in the graph, calculate the distance between the vertex numbers it connects
* For each edge in the graph, calculate the distance between the vertex numbers
it connects
* The bandwidth is the maximum of all these distances
* The implementation is for undirected graphs
* Run time is 0.160789 seconds
Expand Down Expand Up @@ -61,9 +63,9 @@ Signatures
Parameters
-------------------------------------------------------------------------------

.. include:: pgRouting-concepts.rst
:start-after: edges_start
:end-before: edges_end
.. include:: allpairs-family.rst
:start-after: edges_start
:end-before: edges_end

Inner Queries
-------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions doc/ordering/pgr_kingOrdering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@

.. rubric:: Version 4.0.0

* New experimental function.
* New experimental function.

Description
-------------------------------------------------------------------------------

In numerical linear algebra and graph theory, the King ordering algorithm
is a heuristic designed to reorder the vertices of a graph so as to reduce
its bandwidth.
its bandwidth.

The method follows a breadth-first search (BFS) traversal,but with a refinement:
at each step, the unvisited neighbors of the current vertex are inserted into
Expand Down
Loading
Loading