On Apr 15, 2009, at 8:07 AM, David Joyner wrote:

> On Wed, Apr 15, 2009 at 10:54 AM, javier <vengor...@gmail.com> wrote:
>>
>> On Apr 15, 3:26 pm, David Joyner <wdjoy...@gmail.com> wrote:
>>> I'm not sure what you mean by better way. Is this what you want?
>>>
>>> sage: G = AlternatingGroup(5)
>>> sage: g = G.random_element()
>>> sage: CCg = Set([x*g*x^(-1) for x in G])
>>
>> Thanks for your answer,
>>
>> I was thinking more about getting all the conjugacy classes in a list
>> (or set) of sets, I guess I could define my own functions as
>>
>> def conjugacyclass(group, g):
>>    return Set([x*g*x^(-1) for x in group])
>>
>> def conjugacyclasses(group):
>>    return Set([conjugacyclass(group, g) for g in group])
>>
>> but I thought maybe GAP function ConjugacyClasses() was more  
>> efficient
>
> Actually, I think permutation multiplication was rewritten in Cython
> so what you have is pretty efficient I think.

Being in Cython means there's a constant speedup, but aren't there  
better algorithms for this kind of thing? (Depending on the size of  
groups you're working with though, the above may be plenty fast).

- Robert


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to