-
-
Notifications
You must be signed in to change notification settings - Fork 395
Refs/heads/coloring using one process and driver #3103
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
base: develop
Are you sure you want to change the base?
Changes from all commits
f460d38
c57efc0
9b2066a
637ee6e
4e9cc16
648f943
0ba575d
e6cfd1d
05ec5c5
031c732
b743b3c
adeda1c
ad92dc2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -30,56 +30,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |||||
| #define INCLUDE_COLORING_EDGECOLORING_HPP_ | ||||||
| #pragma once | ||||||
|
|
||||||
| #include <iostream> | ||||||
| #include <map> | ||||||
| #include <vector> | ||||||
| #include <cstdint> | ||||||
|
|
||||||
| #include <boost/config.hpp> | ||||||
| #include <boost/graph/adjacency_list.hpp> | ||||||
| #include <boost/version.hpp> | ||||||
|
|
||||||
| #include "cpp_common/edge_t.hpp" | ||||||
| #include "c_types/ii_t_rt.h" | ||||||
| #include "cpp_common/assert.hpp" | ||||||
| #include "cpp_common/messages.hpp" | ||||||
| #include "cpp_common/base_graph.hpp" | ||||||
|
|
||||||
| namespace pgrouting { | ||||||
| namespace functions { | ||||||
|
|
||||||
| class Pgr_edgeColoring : public Pgr_messages { | ||||||
| public: | ||||||
| using EdgeColoring_Graph = | ||||||
| boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, | ||||||
| int64_t, boost::no_property>; | ||||||
|
|
||||||
| using V = boost::graph_traits<EdgeColoring_Graph>::vertex_descriptor; | ||||||
| using E = boost::graph_traits<EdgeColoring_Graph>::edge_descriptor; | ||||||
| using V_it = boost::graph_traits<EdgeColoring_Graph>::vertex_iterator; | ||||||
| using E_it = boost::graph_traits<EdgeColoring_Graph>::edge_iterator; | ||||||
|
|
||||||
| public: | ||||||
| std::vector<II_t_rt> edgeColoring(); | ||||||
|
|
||||||
| explicit Pgr_edgeColoring(const std::vector<Edge_t>&); | ||||||
| Pgr_edgeColoring() = delete; | ||||||
|
|
||||||
| #if BOOST_VERSION >= 106800 | ||||||
| friend std::ostream& operator<<(std::ostream &, const Pgr_edgeColoring&); | ||||||
| #endif | ||||||
|
|
||||||
| private: | ||||||
| V get_boost_vertex(int64_t id) const; | ||||||
| int64_t get_vertex_id(V v) const; | ||||||
| int64_t get_edge_id(E e) const; | ||||||
|
|
||||||
| std::vector<II_t_rt> edgeColoring(pgrouting::UndirectedGraph); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check the edgeColoring implementation to see if the graph is modified
rg -n -A 30 'edgeColoring\s*\(' src/coloring/edgeColoring.cpp | head -50Repository: pgRouting/pgrouting Length of output: 1278 Consider passing The implementation reads from the graph but does not modify it. Passing by Suggested change-std::vector<II_t_rt> edgeColoring(pgrouting::UndirectedGraph);
+std::vector<II_t_rt> edgeColoring(const pgrouting::UndirectedGraph&);📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| private: | ||||||
| EdgeColoring_Graph graph; | ||||||
| std::map<int64_t, V> id_to_V; | ||||||
| std::map<V, int64_t> V_to_id; | ||||||
| std::map<E, int64_t> E_to_id; | ||||||
| }; | ||||||
|
|
||||||
| } // namespace functions | ||||||
| } // namespace pgrouting | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preserve full matrix signal by disabling fail-fast (Line 50).
fail-fast: truewill cancel remainingold_pgrmatrix entries after the first failure, which hides additional upgrade failures and weakens this workflow’s compatibility coverage.Suggested change
📝 Committable suggestion
🤖 Prompt for AI Agents