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
Graph(..., format='incidence_matrix') doesn't work with graphs that have loops, but G.incidence_matrix() does. So? #9714
Comments
comment:1
Easy to fix, just replace (on line 944 of
with something like
|
Attachment: trac_9714_incidence_checking.patch.gz |
comment:2
Then there is another problem: checking forgets possibility that there are only two vertices defined. I tried to fix that: see the second doctest. |
Reviewer: Nathann Cohen |
comment:3
Helloooooooooooooooo !!! I find a bit weird that this code deals with -1 and 1 entries for undirected graphs, but well... Anyway, here is a very small patch that just avoid some unnecessary computations. I give a positive review to your patch, and you can review mine if you have some time Nathann |
comment:4
Hi, thanks for the review. You are certainly right that -1 is weird thing in this context and constructor should accept a normal incidence matrix with two ones in each column. I'll start another ticket for this. I'll set positive review as soon as the tests pass. |
comment:5
What do you say to this adjustment? :-) Lukáš. |
comment:6
"Stupid me" Ok, now it's good to go Nathann |
Author: Lukáš Lánský |
Changed author from Lukáš Lánský to Lukáš Lánský, Robert Miller |
comment:9
Please state clearly which patches have to be applied. |
comment:10
Oh, sorry. :-) |
This comment has been minimized.
This comment has been minimized.
comment:11
(Just adding a proper commit message.) |
comment:12
The last two patches have one annoyingly long line as commit message. Could you please shorten the line length. Multiple lines are allowed, but the first line should make sense by itself. |
Attachment: trac_9714_review.patch.gz |
comment:14
Attachment: trac_9714_review_review.patch.gz Fixed too Nathann |
Merged: sage-5.0.beta5 |
We have
But then:
Either the first .incidence_matrix() should fail, or the second Graph(...) should work.
Apply:
Component: graph theory
Author: Lukáš Lánský, Robert Miller
Reviewer: Nathann Cohen
Merged: sage-5.0.beta5
Issue created by migration from https://trac.sagemath.org/ticket/9714
The text was updated successfully, but these errors were encountered: