#5877: [with patch; needs review] calling a group character is broken
---------------------+------------------------------------------------------
 Reporter:  saliola  |       Owner:  saliola   
     Type:  defect   |      Status:  new       
 Priority:  major    |   Milestone:  sage-3.4.2
Component:  algebra  |    Keywords:            
---------------------+------------------------------------------------------

Comment(by saliola):

 Hello David, thanks for your comments.

 Replying to [comment:3 dmharvey]:
 > I know very little about GAP and the implementation of groups in Sage,
 but is this really the most efficient way to do this? It looks like the
 code has to enumerate the conjugacy classes of the group on every call, is
 that for real?

 I know very little about GAP as well. I just followed the method described
 below, which I found at
 [http://www.gap-
 system.org/ForumArchive/Hulpke.1/Alexande.1/Re__Char.11/2.html GAP-Forum]:
 {{{
 You will (if you like it or not) have to identify the class of the element
 g.
 You can do this in general, by a specific test with \in (but see below):

 gap> cl:=ConjugacyClasses(G);;
 gap> First([1..Length(cl)],i->g in cl[i]);
 4

 So you know the class is class number 4, with the name:

     gap> ClassNames(CharacterTable(G))[4];
     "9a"

 So the character value is:

 gap> Irr(G)[3][4];
 E(9)^2+E(9)^4+E(9)^5+E(9)^7
 }}}

 I did a bit more research, and I found a direct method to evaluate the
 class function via GAP. Of course, the computation still needs to
 determine the class to which the element belongs, but at least there won't
 be the extra interface overhead of going back and forth between Sage and
 GAP for each test. Moreover, GAP must have speedups for particular types
 of groups (the above method is for the generic case).

 I'll replace the patch right-away with the better version.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5877#comment:4>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to