Open
Conversation
MatrixGraphMatrixGraph
MatrixGraphMatrixGraph
Member
Author
|
Semver checks seem to fail as a new crate is created and thus no comparison to the old one can be made. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR ports and rewrites the existing
MatrixGraphto the new traits.Some cleaning up was done, which resulted in a lot of code being removed, or moved to the
DirectedGraphandUndirectedGraphtrait impls. Separate modules for theDirectedandUndirectedimpls and their helpers were created.In particular, I used a new crate for
MatrixGraphas this allows to import and useMatrixGraphin testing forpetgraph-algorithmsor other crates without creating a circular dependency (like it would be the case ifMatrixGraphwas part of the mainpetgraphcrate).Some of the existing tests were adapted, while most were deleted, as they are redundant once #947 lands.
Notably, a mutable iterator over the edge data for undirected
MatrixGraphs was added which uses unsafe. The implementation of this is an adaption of theIterMutimplementation forSlicein the standard library.Documentation as well as
nodeandedgeaddition and removal methods can still be adapted of course, but with this PR we'd have a first "real" working graph to extend our testing capabilities with.