fix issue #585 that pickling graph & digraph do not preserve original edge index
This PR fixes issue #585. Now pickling graph & digraph should keep the original edge index.
Did a simple benchmark with directed_mesh_graph(300) (no node removed and 50 nodes removed -- 1/6 of the graph). Performance is very similar to previous implementation. If we do not need to maintain the original edge index, the new code is ~10% faster. The serialized data size of the graph is almost the same as previous implementation if no edge is removed. When 1/6 of the graph is removed, the serialized size is increased by about 6%.
Pull Request Test Coverage Report for Build 2182282857
- 293 of 321 (91.28%) changed or added relevant lines in 2 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.2%) to 97.884%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| src/digraph.rs | 147 | 161 | 91.3% |
| src/graph.rs | 146 | 160 | 91.25% |
| <!-- | Total: | 293 | 321 |
| Totals | |
|---|---|
| Change from base Build 2173032073: | -0.2% |
| Covered Lines: | 11102 |
| Relevant Lines: | 11342 |
💛 - Coveralls
Any chance this would get merged?
Any chance this would get merged?
There were some issues I outlined in review that I thought needed to be updated before we merged. But it looks like the has stalled since my initial review. I'll take a quick look to see if I can rebase it and then fix the issues I outlined.
Pull Request Test Coverage Report for Build 4929430178
- 250 of 278 (89.93%) changed or added relevant lines in 2 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.1%) to 96.936%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| src/digraph.rs | 126 | 140 | 90.0% |
| src/graph.rs | 124 | 138 | 89.86% |
| <!-- | Total: | 250 | 278 |
| Totals | |
|---|---|
| Change from base Build 4919724815: | -0.1% |
| Covered Lines: | 14519 |
| Relevant Lines: | 14978 |
💛 - Coveralls
Thank you so much for merging this - wondering if we could be getting a release soon?