Ok, I see :-) But why is this order computed "on the fly" when the user asks for it ? Can I expect the order used adjacency matrix to be the same as g.vertices() then ? :-)
And n the end... Why do we sort them ? It just requires some computation when it does not seem needed... Thank you ! :-) Nathann On Nov 29, 5:25 am, Mike Hansen <mhan...@gmail.com> wrote: > Hello, > > > I am writing something about chordal graphs and spent some time > > finding a bug in my code caused by the fact that g.vertices() and > > list(g.vertex_iterator()) return different lists.... I actually wanted > > to find the list matching the adjacency matrix, but everything was > > messed upi because of the vertex_iterator function I used which > > returns a different order... > > g.vertices() returns the vertices in a sorted order while > g.vertex_iterator() does not make any claims about the order of the > vertices. If you look at the code, you'll see that g.vertices() > amounts to sorted(g.vertex_iterator()). > > --Mike -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org