On Friday, August 5, 2016 at 10:11:13 AM UTC-5, Andrew wrote:
>
>
>
> On Friday, 5 August 2016 18:23:03 UTC+10, Simon King wrote:
>
>> So, my advice is: 
>> - Start with one of the element base classes and implement arithmetics 
>>   there (and be careful to comply with Sage's coercion model). 
>> - Use the category framework to determine whether a parent it is a (say) 
>>   ring or a module. 
>> - CombinatorialFreeModule is convenient, but any time critical stuff 
>>   should be implemented on the level of its elements. 
>>
>
> Hi Simon,
>
> Would you mind expanding a little on this? I have some modules, for the 
> symmetric groups for example, that are implemented using  
> CombinatorialFreeModule, together with the realization code as there are 
> several interesting bases. It's reasonably fast in "small" examples but I'd 
> be happy if there was a way to make it faster. The indexing set for the 
> basis has a lot of combinatorial data attached to it that described 
> important properties of the module -- for example, it is graded and the 
> indexing set gives the grading -- so I need the indexing set. The algebra 
> action is defined by certain linear maps on the basis elements.. In 
> different incarnations these modules are defined over Z, or any ring, or 
> QQ[x]. How would you recommend implementing this?
>
> It is not true that CFM is implemented in Python. The addition and scalar 
coefficient action are done in cython in dict_addition. See 
https://trac.sagemath.org/ticket/20680, and Nicolas and I also looked into 
Cythonizing CFM elements (I have a branch with some progress on this). 
There are also likely improvements to be made to the current framework for 
the algebras (i.e., the *_on_basis methods), but it makes a very simple way 
to do implementations and removes a lot of redundancy. Though some of the 
design choice is based on how significant the overhead is compared to other 
operations (to which, with a bit more work, one can pull out bottlenecks 
into Cython).

Best,
Travis


 

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to