rustworkx
rustworkx copied to clipboard
Add Graph difference
Related to #440
Adds the difference between two graphs for PyDiGraph and PyGraph.
Pull Request Test Coverage Report for Build 2779975375
- 62 of 62 (100.0%) changed or added relevant lines in 2 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.001%) to 97.131%
| Totals | |
|---|---|
| Change from base Build 2778191284: | -0.001% |
| Covered Lines: | 12425 |
| Relevant Lines: | 12792 |
💛 - Coveralls
Users have only indirect control over node indices since we assign them internally. In union we distinguish two nodes/edges based on their data payloads and it's probably better to do the same in this PR too.
In more detail I'm thinking that we should:
- Verify that we can match every node of the first graph into a unique node in the second graph with the same data payload.
- Remove an edge
e = (u, v)from the first graph if the second graph has an edge with endpointse' = (m[u], m[v]), wheremis the matching found in step (1.), and the edge data payloads agree.