Thank you for your answers !! (though NONE of them was forwarded to sage-devel :-P)
I just needed a gray code over all subsets of 0,...,n-1 myself, sooooo sympy's totally works. And I even found a short one on the web [1]. But if somebody wants to implement some Sage-specific thing, then count me in at the very least for reviewing the tickets ;-) ... especially if it's C code messing with bits :-P Have fuuuuuuuuuuuun !!! Nathann [1] http://anterence.blogspot.com.es/2012/09/generate-gray-codes-in-python.html On Thursday, December 5, 2013 6:42:14 AM UTC+1, P Purkayastha wrote: > > You can just hook up the sympy code or use that directly: > http://docs.sympy.org/dev/modules/combinatorics/graycode.html > > > On 12/05/2013 05:52 AM, Nathann Cohen wrote: > > Helloooooo everybody ! > > > > I got an email from a Sage user who wants to enumerate something, and > > I'd need to generate a Gray Code in order to make it faster. And it > > looks like Sage cannot do that from my google searches. I would like to > > list all the subsets of a Set in a "Gray Ordering". Actually, I would > > like to know which bit changes at each step. Aaaaaand well. Is there > > anywhere ? > > > > If it is not in Sage yet 1) that is shameful for us 2) where would you > > like to see it if I implement it ? > > > > I warn you, there will be bitwise C operations somewhere and a Python > > class above to expose it :-P > > > > Thanks ! > > > > Nathann > > > > P.S. : If you answer this message, *PLEASE* also answer on sage-devel. > > > -- 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 sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/groups/opt_out.