-
Notifications
You must be signed in to change notification settings - Fork 68
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
Expose non-const reference to edges in Graph.hh #580
Conversation
Signed-off-by: Jagadeeshan S <[email protected]>
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.
I think these changes break ABI (and API). We should retarget the patch to main
.
Alternatively, we could add the functions that are missing without changing the existing ones.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## gz-math7 #580 +/- ##
=========================================
Coverage 94.11% 94.11%
=========================================
Files 146 146
Lines 9804 9809 +5
=========================================
+ Hits 9227 9232 +5
Misses 577 577 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Jagadeeshan S <[email protected]>
@caguero Thank you for the guiding. |
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.
The new function looks good to me.
🦟 Bug fix
Fixes #99
Summary
Issue: The
Graph::VertexFromId
function has two versions that return a const and non-const reference to a Vertex. However there is only a const version of theGraph::EdgeFromId
function, which makes it hard to modify Edge Data()Solution : Have added non-const(mutable) reference function for
Graph::EdgeFromId
.Issue: Likewise, the
Graph::AdjacentsTo
andGraph::AdjacentsFrom
functions return non-const references to the graph vertices, while theGraph::IncidentsTo
andGraph::IncidentsFrom
functions only return const references to the graph edges.Solution: Removed the
const
from return type ofGraph::IncidentsTo
andGraph::IncidentsFrom
functions.