#9714: Graph(..., format='incidence_matrix') doesn't work with graphs that have
loops, but G.incidence_matrix() does. So?
-----------------------------+----------------------------------------------
Reporter: was | Owner: jason, ncohen, rlm
Type: defect | Status: positive_review
Priority: minor | Milestone: sage-5.0
Component: graph theory | Keywords:
Work_issues: | Upstream: N/A
Reviewer: Nathann Cohen | Author: Lukáš Lánský, Robert Miller
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Old description:
> We have
> {{{
> sage: M = matrix(3, [1,2,0, 0,2,0, 0,0,1])
> sage: g = Graph(M, format='adjacency_matrix')
> sage: I = g.incidence_matrix(); I
> [-1 -1 0 0 0 1]
> [ 1 1 0 1 1 0]
> [ 0 0 1 0 0 0]
> }}}
> But then:
> {{{
> sage: Graph(I, format='incidence_matrix').show(graph_border=True)
> kaboom!
> }}}
>
> Either the first .incidence_matrix() should fail, or the second
> Graph(...) should work.
New description:
We have
{{{
sage: M = matrix(3, [1,2,0, 0,2,0, 0,0,1])
sage: g = Graph(M, format='adjacency_matrix')
sage: I = g.incidence_matrix(); I
[-1 -1 0 0 0 1]
[ 1 1 0 1 1 0]
[ 0 0 1 0 0 0]
}}}
But then:
{{{
sage: Graph(I, format='incidence_matrix').show(graph_border=True)
kaboom!
}}}
Either the first .incidence_matrix() should fail, or the second Graph(...)
should work.
Apply:
* [attachment:trac_9714_incidence_checking.patch]
* [attachment:trac_9714_review.patch]
* [attachment:trac_9714_review_review.patch]
--
Comment(by brunellus):
Oh, sorry. :-)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9714#comment:10>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.