Bug Fix: Fix graph construction in pgr_edgeColoring using base_graph#3102
Bug Fix: Fix graph construction in pgr_edgeColoring using base_graph#3102ayushjariyal wants to merge 3 commits intopgRouting:developfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughPgr_edgeColoring is refactored to replace internal Boost adjacency_list and ID/descriptor mappings with a single Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@include/coloring/edgeColoring.hpp`:
- Line 59: The namespace qualifier has an extra space: change the declaration
"pgrouting:: UndirectedGraph graph;" to use the correct qualifier without the
space so it reads "pgrouting::UndirectedGraph graph;"; update the token in
include/coloring/edgeColoring.hpp where the symbol pgrouting::UndirectedGraph is
declared to remove the stray space.
In `@include/cpp_common/basic_edge.hpp`:
- Line 48: Remove the dead member int64_t color from class Basic_edge: delete
the field declaration in Basic_edge and remove any remaining references to
Basic_edge::color (e.g., graph.graph[e_i].color) so the code uses the external
color_storage / color_map and edgeColoring logic exclusively; ensure
cp_members() and any serialization or copy logic no longer mention color and run
a build to verify no residual references remain.
In `@src/coloring/edgeColoring.cpp`:
- Around line 79-80: The file ends with the closing namespace braces for
functions and pgrouting but is missing a trailing newline; update the EOF of
src/coloring/edgeColoring.cpp so there is a single newline character after the
final "}" that closes the pgrouting::functions namespace to ensure
POSIX-compliant end-of-file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 454be25f-ff55-400f-8511-f10e4152d3db
📒 Files selected for processing (3)
include/coloring/edgeColoring.hppinclude/cpp_common/basic_edge.hppsrc/coloring/edgeColoring.cpp
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@include/coloring/edgeColoring.hpp`:
- Line 39: The header declares a friend operator using std::ostream (the friend
operator<< on EdgeColoring), but doesn't include <iosfwd> so the type is
undefined; add an `#include` <iosfwd> to include/coloring/edgeColoring.hpp (near
the top with other includes) so std::ostream is forward-declared and the friend
declaration compiles even when includes are ordered differently.
In `@src/coloring/edgeColoring.cpp`:
- Line 38: The translation unit uses std::map (used around the edge coloring
logic) but does not include <map>, relying on transitive includes; add an
explicit `#include` <map> near the other headers at the top of edgeColoring.cpp
(alongside existing includes such as "cpp_common/base_graph.hpp") so std::map is
properly declared for the code that references it.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 768fd744-e04b-4e91-9765-081562980878
📒 Files selected for processing (2)
include/coloring/edgeColoring.hppsrc/coloring/edgeColoring.cpp
Fixes #3101.
This PR remove graph building logicand replaces it with base_graph::insert_edges() for consistent graph building.
Summary by CodeRabbit