On Jun 28, 2008, at 9:33 AM, David Joyner wrote:

> On Sat, Jun 28, 2008 at 11:00 AM, John Cremona  
> <[EMAIL PROTECTED]> wrote:
>>
>> It seems that what Dan Bump's instructions did not specify is what
>> properties the class assigned to ._combinatorial_class must have.
>> And it needs something which PermutationGroupElement does not have.
>>
>> Does that help?
>
> Okay. Maybe the best thing is to write a wrapper to GAP's GroupRing  
> function.

I disagree, using CombinatorialAlgebra will be a much better option.

>>> Can anyone explain "AttributeError: type object
>>> 'sage.groups.perm_gps.permgroup_element.Permutation' has no  
>>> attribute
>>> 'count'"
>>> (in words of two syllables or less, if possible:-)?

Sure. It means that it's trying to use a method called "count" but  
the class "Permutation" found in sage/groups/perm_gps/ 
permgroup_element doesn't define one. What you need to do is make a  
method called count.

Actually, looking at the code (and someone more familiar with sage- 
combinat should correct me) it looks like _combinatorial_class should  
be the Parent (i.e. the group) rather than the element. It would  
probably make sense to do something like

> class PermutationGroupRing(CombinatorialAlgebra):
>    def __init__(self, R, G):
>        self.group = G
>        self._combinatorial_class = G # NOTE the change
>        self._one = G.identity()
>        self._name = 'Group ring of %s'%str(G)
>        self._prefix = ''
>        CombinatorialAlgebra.__init__(self, R)
>    def _multiply_basis(self, a, b):
>        c = a*b
>        return c

and add a count method to the group class.

- Robert


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

Reply via email to