Digraphs
Digraphs copied to clipboard
Added a helper function and updated the existing methods to preserve edge weights when removing vertices, edges or copying digraphs (issue #683)
Issue - https://github.com/digraphs/Digraphs/issues/683
Previously, 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:
- Added
CopyEdgeWeightsForSubdigraphhelper function to reconstruct weights after vertex removals. - Updated
DigraphRemoveVertexto copy edge weights. - Updated
DigraphRemoveEdgeto remove corresponding weight entries instead of dropping all weights. - Updated
DigraphMutableCopyto copy edge weights when present. - Declared the new helper in
digraph.gd.
This looks like it's coming along. Could you please:
- take a look at the failing lint check
- add tests to
oper.tstthat useDigraphRemoveVerticesetc. and verify that the edge weights are copied appropriately.
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.
Documentation should be installed in doc/z-chap5.xml