I'm looking at Trac #6823 which implements the Kneser graph. The vertices of this graph are the k-element subsets of an n-element set, built by the call graphs.KneserGraph(n,k). By and large the patch seems fine, but I'm seeing the behavior below with regard to sorted lists of sets, which I do not think is limited to anything in particular that the patch is doing.
For any graph, vertices() is suppose to return its results sorted. I get sage: g = Graph() sage: g.add_vertices(Subsets(3,2)) sage: g.vertices() [{2, 3}, {1, 2}, {1, 3}] sage: sorted(g.vertices()) [{1, 3}, {1, 2}, {2, 3}] sage: Subsets(3,2).list() [{1, 2}, {1, 3}, {2, 3}] sage: sorted(Subsets(3,2).list()) [{2, 3}, {1, 3}, {1, 2}] Either of the last two lists I'd say are sorted. I'd expect the first two lists to be equal to each other, and then also equal to one or the other of the last two. Is this all to be expected, or are the vertices of the graph getting mangled (hashed?) somewhere? In the creation of the Kneser graph using the patch, the vertices are created via calls to Subsets() and I get identical results for the first two lists when I use graphs.KneserGraph(3,2) instead of the more generic g demonstrated above. Rob --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---