Three years later I got bitten by this again, and I now believe that the degree of a vertex incident with a loop should be 1. Because it is rather pleasant to be sure that the degree of a vertex is equal to the number of its neighbors O_o
Nathann On Thursday, May 6, 2010 2:43:43 AM UTC+2, leif wrote: > > On 5 Mai, 23:20, Fidel <[email protected]> wrote: > > Given a graph G, with a loop at vertex j. What is the convention > > followed in sage for entry j,j of the adjacency matrix? > > > > sage: G=Graph({0:[0],1:[1]},allow_loops=True);G.am() > > [1 0] > > [0 1] > > > > Just wandering if it is a bug or a feature. > > What do you think is wrong with it? There's a difference between the > "number of edges touching a vertex" and its degree, so imho the matrix > is correct. (As long as the edges are represented by a set rather than > a multiset, i.e. multiedges=False, the matrix elements are actually > boolean.) > > -Leif > > -- > To post to this group, send an email to > [email protected]<javascript:> > To unsubscribe from this group, send an email to > [email protected] <javascript:> > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/groups/opt_out.
