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: 2 additions & 0 deletions doc/ordering/ordering-family.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Ordering - Family of functions
.. official-start

* :doc:`pgr_cuthillMckeeOrdering` - Return reverse Cuthill-McKee ordering of an undirected graph.
* :doc:`pgr_sloanOrdering` - Return sloan ordering of an undirected graph.
* :doc:`pgr_topologicalSort` - Linear ordering of the vertices for directed
acyclic graph.

Expand All @@ -31,6 +32,7 @@ Ordering - Family of functions
:hidden:

pgr_cuthillMckeeOrdering
pgr_sloanOrdering
pgr_topologicalSort

See Also
Expand Down
1 change: 1 addition & 0 deletions doc/src/pgRouting-introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Aryan Gupta,
Ashraf Hossain,
Ashish Kumar,
Aurélie Bousquet,
Bipasha Gayary,
Cayetano Benavent,
Christian Gonzalez,
Daniel Kastl,
Expand Down
63 changes: 63 additions & 0 deletions include/drivers/ordering/sloanOrdering_driver.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*PGR-GNU*****************************************************************
File: sloanOrdering_driver.hpp

Generated with Template by:
Copyright (c) 2025 pgRouting developers
Mail: project@pgrouting.org

Function's developer:
Copyright (c) 2025 Bipasha Gayary
Mail: bipashagayary@gmail.com

------

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

********************************************************************PGR-GNU*/

#ifndef INCLUDE_DRIVERS_ORDERING_SLOANORDERING_DRIVER_HPP_
#define INCLUDE_DRIVERS_ORDERING_SLOANORDERING_DRIVER_HPP_


#ifdef __cplusplus
# include <cstddef>
# include <cstdint>
using Edge_t = struct Edge_t;
using II_t_rt = struct II_t_rt;
#else
# include <stddef.h>
# include <stdint.h>
typedef struct Edge_t Edge_t;
typedef struct II_t_rt II_t_rt;
#endif


#ifdef __cplusplus
extern "C" {
#endif

void
pgr_do_sloanOrdering(
const char*, int64_t, int64_t,

II_t_rt**, size_t*,
char **, char **, char **);


#ifdef __cplusplus
}
#endif

#endif // INCLUDE_DRIVERS_ORDERING_SLOANORDERING_DRIVER_HPP_
53 changes: 53 additions & 0 deletions include/process/sloanOrdering_process.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*PGR-GNU*****************************************************************
File: sloan_ordering_process.h

Function's developer:
Copyright (c) 2025 Bipasha Gayary
Mail: bipashagayary at gmail.com

------

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

********************************************************************PGR-GNU*/

#ifndef INCLUDE_PROCESS_SLOAN_ORDERING_PROCESS_H_
#define INCLUDE_PROCESS_SLOAN_ORDERING_PROCESS_H_
#pragma once

#ifdef __cplusplus
#include <cstddef>
#include <cstdint>
#include <stdbool.h>
using Edge_t = struct Edge_t;
using II_t_rt = struct II_t_rt;
#else
#include <stddef.h>
#include <stdint.h>
typedef struct Edge_t Edge_t;
typedef struct II_t_rt II_t_rt;
#endif

#ifdef __cplusplus
extern "C" {
#endif

void pgr_process_ordering(const Edge_t*, size_t, int64_t, int64_t, bool, II_t_rt **, size_t *);

#ifdef __cplusplus
}
#endif

#endif // INCLUDE_PROCESS_SLOAN_ORDERING_PROCESS_H_
27 changes: 15 additions & 12 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 v3.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-31 14:26+0000\n"
"POT-Creation-Date: 2025-06-07 17:52+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 @@ -3420,6 +3420,9 @@ msgid ""
"of an undirected graph."
msgstr ""

msgid ":doc:`pgr_sloanOrdering` - Return sloan ordering of an undirected graph."
msgstr ""

msgid ""
":doc:`pgr_topologicalSort` - Linear ordering of the vertices for directed"
" acyclic graph."
Expand Down Expand Up @@ -7509,17 +7512,17 @@ msgstr ""
msgid ""
"Aasheesh Tiwari, Abhinav Jain, Aditya Pratap Singh, Adrien Berchet, Akio "
"Takubo, Andrea Nardelli, Anthony Tasca, Anton Patrushev, Aryan Gupta, "
"Ashraf Hossain, Ashish Kumar, Aurélie Bousquet, Cayetano Benavent, "
"Christian Gonzalez, Daniel Kastl, Dapeng Wang, Dave Potts, David Techer, "
"Denis Rykov, Ema Miyawaki, Esteban Zimanyi, Florian Thurkow, Frederic "
"Junod, Gerald Fenoy, Gudesa Venkata Sai Akhil, Hang Wu, Himanshu Raj, "
"Imre Samu, Jay Mahadeokar, Jinfu Leng, Kai Behncke, Kishore Kumar, Ko "
"Nagase, Mahmoud Sakr, Manikata Kondeti, Mario Basa, Martin Wiesenhaan, "
"Maxim Dubinin, Maoguang Wang, Mohamed Bakli, Mohamed Zia, Mukul Priya, "
"Nitish Chauhan, Rajat Shinde, Razequl Islam, Regina Obe, Rohith Reddy, "
"Sarthak Agarwal, Shobhit Chaurasia, Sourabh Garg, Stephen Woodbridge, "
"Swapnil Joshi, Sylvain Housseman, Sylvain Pasche, Veenit Kumar, Vidhan "
"Jain, Virginia Vergara, Yige Huang"
"Ashraf Hossain, Ashish Kumar, Aurélie Bousquet, Bipasha Gayary, Cayetano "
"Benavent, Christian Gonzalez, Daniel Kastl, Dapeng Wang, Dave Potts, "
"David Techer, Denis Rykov, Ema Miyawaki, Esteban Zimanyi, Florian "
"Thurkow, Frederic Junod, Gerald Fenoy, Gudesa Venkata Sai Akhil, Hang Wu,"
" Himanshu Raj, Imre Samu, Jay Mahadeokar, Jinfu Leng, Kai Behncke, "
"Kishore Kumar, Ko Nagase, Mahmoud Sakr, Manikata Kondeti, Mario Basa, "
"Martin Wiesenhaan, Maxim Dubinin, Maoguang Wang, Mohamed Bakli, Mohamed "
"Zia, Mukul Priya, Nitish Chauhan, Rajat Shinde, Razequl Islam, Regina "
"Obe, Rohith Reddy, Sarthak Agarwal, Shobhit Chaurasia, Sourabh Garg, "
"Stephen Woodbridge, Swapnil Joshi, Sylvain Housseman, Sylvain Pasche, "
"Veenit Kumar, Vidhan Jain, Virginia Vergara, Yige Huang"
msgstr ""

msgid "Corporate Sponsors (in alphabetical order)"
Expand Down
7 changes: 5 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.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-31 14:26+0000\n"
"POT-Creation-Date: 2025-06-07 17:52+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 @@ -3097,6 +3097,9 @@ msgstr ""
msgid ":doc:`pgr_cuthillMckeeOrdering` - Return reverse Cuthill-McKee ordering of an undirected graph."
msgstr ""

msgid ":doc:`pgr_sloanOrdering` - Return sloan ordering of an undirected graph."
msgstr ""

msgid ":doc:`pgr_topologicalSort` - Linear ordering of the vertices for directed acyclic graph."
msgstr ""

Expand Down Expand Up @@ -6541,7 +6544,7 @@ msgstr ""
msgid "Individuals (in alphabetical order)"
msgstr ""

msgid "Aasheesh Tiwari, Abhinav Jain, Aditya Pratap Singh, Adrien Berchet, Akio Takubo, Andrea Nardelli, Anthony Tasca, Anton Patrushev, Aryan Gupta, Ashraf Hossain, Ashish Kumar, Aurélie Bousquet, Cayetano Benavent, Christian Gonzalez, Daniel Kastl, Dapeng Wang, Dave Potts, David Techer, Denis Rykov, Ema Miyawaki, Esteban Zimanyi, Florian Thurkow, Frederic Junod, Gerald Fenoy, Gudesa Venkata Sai Akhil, Hang Wu, Himanshu Raj, Imre Samu, Jay Mahadeokar, Jinfu Leng, Kai Behncke, Kishore Kumar, Ko Nagase, Mahmoud Sakr, Manikata Kondeti, Mario Basa, Martin Wiesenhaan, Maxim Dubinin, Maoguang Wang, Mohamed Bakli, Mohamed Zia, Mukul Priya, Nitish Chauhan, Rajat Shinde, Razequl Islam, Regina Obe, Rohith Reddy, Sarthak Agarwal, Shobhit Chaurasia, Sourabh Garg, Stephen Woodbridge, Swapnil Joshi, Sylvain Housseman, Sylvain Pasche, Veenit Kumar, Vidhan Jain, Virginia Vergara, Yige Huang"
msgid "Aasheesh Tiwari, Abhinav Jain, Aditya Pratap Singh, Adrien Berchet, Akio Takubo, Andrea Nardelli, Anthony Tasca, Anton Patrushev, Aryan Gupta, Ashraf Hossain, Ashish Kumar, Aurélie Bousquet, Bipasha Gayary, Cayetano Benavent, Christian Gonzalez, Daniel Kastl, Dapeng Wang, Dave Potts, David Techer, Denis Rykov, Ema Miyawaki, Esteban Zimanyi, Florian Thurkow, Frederic Junod, Gerald Fenoy, Gudesa Venkata Sai Akhil, Hang Wu, Himanshu Raj, Imre Samu, Jay Mahadeokar, Jinfu Leng, Kai Behncke, Kishore Kumar, Ko Nagase, Mahmoud Sakr, Manikata Kondeti, Mario Basa, Martin Wiesenhaan, Maxim Dubinin, Maoguang Wang, Mohamed Bakli, Mohamed Zia, Mukul Priya, Nitish Chauhan, Rajat Shinde, Razequl Islam, Regina Obe, Rohith Reddy, Sarthak Agarwal, Shobhit Chaurasia, Sourabh Garg, Stephen Woodbridge, Swapnil Joshi, Sylvain Housseman, Sylvain Pasche, Veenit Kumar, Vidhan Jain, Virginia Vergara, Yige Huang"
msgstr ""

msgid "Corporate Sponsors (in alphabetical order)"
Expand Down
4 changes: 3 additions & 1 deletion sql/ordering/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
SET(LOCAL_FILES
_cuthillMckeeOrdering.sql
cuthillMckeeOrdering.sql
_sloanOrdering.sql
sloanOrdering.sql
)

# Do not modify below this line
Expand All @@ -12,4 +14,4 @@ foreach (f ${LOCAL_FILES})
list(APPEND PACKAGE_SQL_FILES ${CMAKE_CURRENT_BINARY_DIR}/${f})
endforeach()

set(PROJECT_SQL_FILES ${PROJECT_SQL_FILES} ${PACKAGE_SQL_FILES} PARENT_SCOPE)
set(PROJECT_SQL_FILES ${PROJECT_SQL_FILES} ${PACKAGE_SQL_FILES} PARENT_SCOPE)
51 changes: 51 additions & 0 deletions sql/ordering/_sloanOrdering.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*PGR-GNU*****************************************************************
File: _sloanOrdering.sql

Generated with Template by:
Copyright (c) 2025 pgRouting developers
Mail: project@pgrouting.org

Function's developer:
Copyright (c) 2025 Bipasha Gayary
Mail: bipashagayary@gmail.com

------

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

********************************************************************PGR-GNU*/

----------------------------
-- _pgr_sloanOrdering
----------------------------

--v4.0.0
CREATE FUNCTION _pgr_sloanOrdering(
edges_sql TEXT,
start_vid BIGINT DEFAULT 0,
end_vid BIGINT DEFAULT 0,
OUT seq BIGINT,
OUT node BIGINT
)

RETURNS SETOF RECORD AS
'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;

-- COMMENTS

COMMENT ON FUNCTION _pgr_sloanOrdering(TEXT, BIGINT, BIGINT)
IS 'pgRouting internal function';

60 changes: 60 additions & 0 deletions sql/ordering/sloanOrdering.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*PGR-GNU*****************************************************************
File: sloanOrdering.sql

Generated with Template by:
Copyright (c) 2025 pgRouting developers
Mail: project@pgrouting.org

Function's developer:
Copyright (c) 2025 Bipasha Gayary
Mail: bipashagayary@gmail.com

------

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

********************************************************************PGR-GNU*/

----------------------------
-- pgr_sloanOrdering
----------------------------

--v4.0.0
CREATE FUNCTION pgr_sloanOrdering(
TEXT, -- edges_sql (required)
BIGINT, --start_vid (optional)
BIGINT, --end_vid (optional)
OUT seq BIGINT,
OUT node BIGINT)
RETURNS SETOF RECORD AS
$BODY$
SELECT seq, node
FROM _pgr_sloanOrdering(_pgr_get_statement($1), $2, $3);
$BODY$
LANGUAGE SQL VOLATILE STRICT;

-- COMMENTS

COMMENT ON FUNCTION pgr_sloanOrdering(TEXT, BIGINT, BIGINT)
IS 'pgr_sloanOrdering
- EXPERIMENTAL
- Parameters:
- Edges SQL with columns: id, source, target, cost [,reverse_cost]
- start_vid: Starting vertex id for sloan ordering
- end_vid: End/goal vertex id

- Documentation:
- ${PROJECT_DOC_LINK}/pgr_sloanOrdering.html
';
4 changes: 3 additions & 1 deletion src/ordering/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
ADD_LIBRARY(ordering OBJECT
cuthillMckeeOrdering.c
cuthillMckeeOrdering_driver.cpp
)
sloanOrdering.c
sloanOrdering_driver.cpp
)
Loading