-
Notifications
You must be signed in to change notification settings - Fork 61
Added a helper function and updated the existing methods to preserve edge weights when removing vertices, edges or copying digraphs (issue #683) #877
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: main
Are you sure you want to change the base?
Conversation
…edge weights when removing vertices, edges or copying digraphs (issue digraphs#683)
|
This looks like it's coming along. Could you please:
It'd be great if you could do this by next meeting, so we can do a proper review of your two PRs. |
|
Looks like linting is improved! If you could now add tests, that should satisfy the codecov check. |
…igraphRemoveVertex and related immutable operations. Also added testing.
mtorpey
left a comment
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.
Subject to what we've said above, it'd be nice to see documentation. But this is coming along well.
|
Documentation should be installed in doc/z-chap5.xml |
…the weights correctly. Split the DigraphImmutableCopy into a helper DigraphImmutableCopyNoWeights to copy the weights correctly.
Issue -
https://github.com/digraphs/Digraphs/issues/683Previously, deleting vertices or edges from an EdgeWeightedDigraph or taking a mutable copy caused the resulting digraph to lose its edge weights. This commit is just a layout for which I'll add tests and debug.
Changes include:
CopyEdgeWeightsForSubdigraphhelper function to reconstruct weights after vertex removals.DigraphRemoveVertexto copy edge weights.DigraphRemoveEdgeto remove corresponding weight entries instead of dropping all weights.DigraphMutableCopyto copy edge weights when present.digraph.gd.