Sorry.  I was not being clear.  I was surprised by the fact that
*only* the latter shows multiple edges.

I am also surprised that arrowheads don't appear with multiple edges.
This is especially a problem with weighted digraphs.

(By the way, it probably would have been better for me to have written

sage: G = DiGraph({1:{2: 2}, 2:{1:1}}, weighted=True)

so that the Laplacian comes out correctly.  However, this doesn't help
with my problem.)

Dave

On Mar 19, 6:01 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
> davidp wrote:
> > Hi,
>
> > I was a bit surprised by the difference exhibited below:
>
> > sage: G = DiGraph({1:{2: 2}, 2:{1:1}})
> > sage: G.show()
>
> I'm surprised by the output of this.  There are clearly two edges in the
> graph: 1->2 and 2->1, but only one edge is shown.
>
> > sage: DiGraph(G.laplacian_matrix()).show()
>
> The Laplacian matrix has nonzero entries indicating edges from each
> vertex to each other vertex, so why do you find it surprising that there
> are two edges?
>
> sage: H=DiGraph(G.laplacian_matrix())
> sage: H.edges()
> [(0, 0, 1), (0, 1, -1), (1, 0, -1), (1, 1, 1)]
>
> I find it surprising that arrowheads don't appear in the following, though:
>
> sage: DiGraph(G.laplacian_matrix()).show()
>
> Thanks,
>
> Jason
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to