The implementation of the conjugacy classes is now ticket #7886: http://sagetrac.org/sage_trac/ticket/7886
At the moment all the test pass except the one for _getitem_; since the elements of the conjugacy class appear in a random order, I don't know how to make a working test for that function. I went for Set instead of set because the output looks better. I intend to wrap a few more functions on that patch, if you have a favorite one you'd like to see now is the time to tell! Concerning Dmitri remark above, if there was a way to convert gap matrices into sage matrices it could be possible to extend conjugacy_classes_representatives (as well as conjugacy_classes) to matrix groups. That would also make computation of conjugacy classes for matrix groups several times faster by avoiding the naive fallback. Should I open a different ticket for that? Cheers J On Jan 9, 8:03 pm, Minh Nguyen <nguyenmi...@gmail.com> wrote: > Hi, > > On Sun, Jan 10, 2010 at 2:06 AM, javier <vengor...@gmail.com> wrote: > > Sorted it out, I had forgotten to import one file. Sorry for the > > noise. Class patches nicely now; I am just having some test failures > > due to different orderings of some output sets. Is there a standard > > way of implementing tests that involve sets as outputs? > > You should be aware there is no fixed ordering when you output the > elements of a set. This is especially important when you have the > string representation of all elements of a set as expected output in a > doctest. For example, on some platform a set consisting of the > elements 1, 2, 3 might be output in a different order such as 3, 2, 1. > If the elements of your set can be sorted in some standard order, it > might be a good idea to first sort the elements, then have the sorted > elements be expected output of a doctest. A similar issue applies when > you have the values of a dictionary as expected output in a doctest. > > > In a related matter, in the _set_ method, is it better to return a > > python set or a sage Set? > > I don't know how to answer this question without knowing the (updated) > code or the context of the code. > > -- > Regards > Minh Van Nguyen
-- 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