-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
test: add tests for as_adjacency_matrix() in test-conversion #1519
Conversation
Current Aviator status
This PR was merged manually (without Aviator). Merging manually can negatively impact the performance of the queue. Consider using Aviator next time.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
87037d9
to
880698e
Compare
880698e
to
33e1558
Compare
You are using randomly generated data, then testing for specific values that depend on the random seed. This is difficult to manage and it's hard to see what goes wrong with failures. I suggest:
This would make a complete test. It is important to test self-loops and multi-edges, which is where things go wrong! |
For example,
The directed version contains: multi-edges, reciprocal edges, self-loops, multi-self-loops. The undirected version has the same edges, with directions ignored. I chose a 4-vertex graph (instead of a 3-vertex one) to leave room for non-diagonal zeros in the undirected case, and better cover all cases. Then just add edge weights. |
Thank you!! |
@szhorvat I've implemented the changes, is this good to go? |
Based on a quick skim, yes! |
This pull request failed to merge: PR cannot be automatically rebased, please rebase manually to continue. After you have resolved the problem, you should remove the Additional debug info: Failed to rebase this PR onto the latest changes from the base branch. You will probably need to rebase this PR manually and resolve conflicts). |
@szhorvat this is to prep for part of #1518, prior to my PR there were no direct tests of
as_adjacency_matrix()
.