Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3d5be64
(kruskal & prim) separating definition from implementation
cvvergara Feb 19, 2026
e644035
(mst) Using set instead of vector for roots
cvvergara Feb 19, 2026
2507925
(depthFirstSearch) Using set instead of vector for roots
cvvergara Feb 19, 2026
82b7530
(kruskal) Using set instead of vector for roots
cvvergara Feb 19, 2026
cab597d
(prim) Using set instead of vector for roots
cvvergara Feb 19, 2026
6be89cc
(depthFirstSearch) Using set instead of vector for roots
cvvergara Feb 19, 2026
67be75b
(enums) preparing enumeration for spanning tree like functions
cvvergara Feb 19, 2026
2c30a91
(utilities) Preparing for spanning tree like functions
cvvergara Feb 19, 2026
59a670f
(drivingDistance) adjusting namespace names
cvvergara Feb 19, 2026
af493dd
(breadthFirstSearch) adjusting namespace names
cvvergara Feb 19, 2026
62a914d
(to postgres) adding functions to get tuples for spanning tree like f…
cvvergara Feb 19, 2026
d4ca7ce
New process and driver for spanning tree like functions
cvvergara Feb 19, 2026
e6e40d3
(build) add the spanning tree process and driver to the build
cvvergara Feb 19, 2026
3b7392c
(kruskal) using the new spanning Tree process & driver
cvvergara Feb 19, 2026
12a3645
(prim) using the new spanning Tree process & driver
cvvergara Feb 19, 2026
1f1c4b6
(breadthFirstSearch) using the new spanning Tree process & driver
cvvergara Feb 19, 2026
8256dd1
(depthFirstSearch) using the new spanning Tree process & driver
cvvergara Feb 19, 2026
f420f70
(driving_distance) using the new spanning Tree process & driver
cvvergara Feb 19, 2026
70fcf5a
:broom: removing details not used anymore
cvvergara Feb 19, 2026
b047be8
:broom: removing mst_common not used anymore
cvvergara Feb 19, 2026
cab3eb4
:broom: removing depthFirstSearch_driver not used anymore
cvvergara Feb 19, 2026
6799cf4
:broom: removing kruskal_driver not used anymore
cvvergara Feb 19, 2026
87cc9db
:broom: removing driving_distance_driver not used anymore
cvvergara Feb 19, 2026
32377eb
:broom: removing breadthFirstSearch_driver not used anymore
cvvergara Feb 19, 2026
4629b89
:broom: removing prim_driver not used anymore
cvvergara Feb 19, 2026
fb95422
(build) adjusting build because of removals
cvvergara Feb 19, 2026
eb0dc7e
(code_checker) ignoring include order on spanning tree process
cvvergara Feb 19, 2026
1247175
(spanningTree) Fixing issues from rabbit
cvvergara Feb 20, 2026
e02deb9
Updating Release notes and news
cvvergara Feb 21, 2026
19f1894
Update locale: commit e02deb9dae
github-actions[bot] Feb 21, 2026
d9478fc
(prim) fix inverted edge cost calculation
cvvergara Feb 21, 2026
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 NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ To see all issues & pull requests closed by this release see the
* [#3056](https://github.com/pgRouting/pgrouting/issues/3056): edwardMoore: use the shortest_path process and driver
* [#3060](https://github.com/pgRouting/pgrouting/issues/3060): dagShortestPath: use the shortest_path process and driver
* [#3064](https://github.com/pgRouting/pgrouting/issues/3064): Astar: create and use a process and driver for Astar
* [#3075](https://github.com/pgRouting/pgrouting/issues/3075): Spanning tree: create and use a process and driver
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Edit NEWS.md via the generator script, not directly.

Direct edits to NEWS.md will be overwritten the next time tools/release-scripts/notes2news.pl is run. The entry for #3075 should be added to the script's source files instead.

Based on learnings from PRs #2970 and #2868: "NEWS.md is auto-generated and manual edits would be overwritten" — the correct procedure is to update the source files consumed by notes2news.pl.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@NEWS.md` at line 23, The NEWS.md change was made directly but is
auto-generated; instead add the entry for issue `#3075` into the source data used
by the generator (the inputs consumed by notes2news.pl) rather than editing
NEWS.md itself; locate the notes2news.pl invocation and the repository of
release-note source files referenced by notes2news.pl and add a new note entry
for "#3075: Spanning tree: create and use a process and driver" there, then run
the generator to regenerate NEWS.md so the entry is included properly.


## pgRouting 4.0

Expand Down
1 change: 1 addition & 0 deletions doc/src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ To see all issues & pull requests closed by this release see the
* :issue:`3056`: edwardMoore: use the shortest_path process and driver
* :issue:`3060`: dagShortestPath: use the shortest_path process and driver
* :issue:`3064`: Astar: create and use a process and driver for Astar
* :issue:`3075`: Spanning tree: create and use a process and driver

pgRouting 4.0
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Expand Down
18 changes: 17 additions & 1 deletion include/breadthFirstSearch/breadthFirstSearch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//******************************************

namespace pgrouting {
namespace functions {
namespace algorithms {

template <class G>
class Pgr_breadthFirstSearch {
Expand Down Expand Up @@ -113,6 +113,22 @@ class Pgr_breadthFirstSearch {
return results;
}
};

} // namespace algorithms

namespace functions {

template <class G>
std::vector<MST_rt> breadthFirstSearch(
G &graph,
const std::set<int64_t> &roots,
bool,
int64_t max_depth) {
pgrouting::algorithms::Pgr_breadthFirstSearch<G> fn_breadthFirstSearch;
auto results = fn_breadthFirstSearch.breadthFirstSearch(graph, roots, max_depth);
return results;
}

} // namespace functions
} // namespace pgrouting

Expand Down
8 changes: 7 additions & 1 deletion include/c_common/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ enum Which {
/** metrics **/
BANDWIDTH,
/** with edges that have x y */
ASTAR = 400, BDASTAR
ASTAR = 400, BDASTAR,
/** For spanning tree like results */
KRUSKAL = 500, KRUSKALDD, KRUSKALDFS, KRUSKALBFS,
PRIM = 510, PRIMDD, PRIMDFS, PRIMBFS,
DFS = 520,
BFS = 530,
DIJKSTRADD = 540
};

#endif // INCLUDE_C_COMMON_ENUMS_H_
16 changes: 16 additions & 0 deletions include/cpp_common/to_postgres.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#include <vector>
#include <deque>
#include <map>
#include <cstddef>

#include "c_types/contractionHierarchies_rt.h"
Expand Down Expand Up @@ -61,11 +62,26 @@ size_t get_viaRoute(std::deque<pgrouting::Path>&, Routes_t**);
*/
size_t get_tuples(const std::deque<pgrouting::Path>&, Path_rt*&);


/*
* @brief get tuples from a Path to a MST_rt
*/
size_t get_tuples(const std::deque<pgrouting::Path>&, MST_rt*&);

/*
* @brief get tuples for spanning tree driver
*/
size_t get_tuples(
const std::vector<MST_rt>&,
const std::deque<pgrouting::Path>&,
const std::vector<std::map<int64_t, int64_t>>&,
MST_rt*&);

/*
* @brief get tuples from a vector of MST_rt to a MST_rt
*/
size_t get_tuples(const std::vector<MST_rt>&, MST_rt*&);

/** @brief Vector of vertices id are saved on a C array
*
* @param[in] graph Created graph with the base Graph
Expand Down
5 changes: 5 additions & 0 deletions include/cpp_common/utilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#define INCLUDE_CPP_COMMON_UTILITIES_HPP_
#pragma once

#include <set>
#include <vector>
#include <string>
#include <cstdint>

#include "c_common/enums.h"
#include "c_types/mst_rt.h"

namespace pgrouting {

Expand All @@ -37,6 +41,7 @@ std::string get_name(Which, bool, bool);
std::string get_name(Which, bool, bool, bool);
char estimate_drivingSide(char, Which);
void get_new_queries(const std::string&, const std::string&, std::string&, std::string&);
std::vector<MST_rt> only_root_result(const std::set<int64_t>&);

} // namespace pgrouting

Expand Down
4 changes: 2 additions & 2 deletions include/dijkstra/drivingDist.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ std::deque<pgrouting::Path> drivingDistance_no_equicost(


namespace pgrouting {
namespace algorithm {
namespace functions {

template <typename G>
std::deque<Path> drivingDistance(
Expand All @@ -510,7 +510,7 @@ std::deque<Path> drivingDistance(
}
}

} // namespace algorithm
} // namespace functions
} // namespace pgrouting


Expand Down
76 changes: 0 additions & 76 deletions include/drivers/breadthFirstSearch/breadthFirstSearch_driver.h

This file was deleted.

71 changes: 0 additions & 71 deletions include/drivers/driving_distance/driving_distance_driver.h

This file was deleted.

57 changes: 0 additions & 57 deletions include/drivers/spanningTree/mst_common.h

This file was deleted.

Loading