Hi Joseph, On 2016-08-05, Travis Scrimshaw <[email protected]> wrote: > Hey Joseph, > It is basically just Parent. I don't know of any other ABC that is a > subclass of Parent. Although a common concrete implementation of Parent > that is often used as a base class (for algebras) is > CombinatorialFreeModule.
I believe there should *not* be a hierarchy of parent base classes similar to the element classes. After all, the (cythonised!) element classes exist in order to have fast arithmetic methods. These methods apply to the elements, not to the parents. Do you think that there are methods for parents that are specific to (say) rings and absolutely need to be fast? I might be a bit biased and maybe got a wrong impression. Anyway: Using CombinatorialFreeModule seems like a bad idea to me if you want to have a fast arithmetic. After all, it is pure Python code, and moreover all these ..._on_basis methods seem to be called in a very convoluted way, meaning that there is a high calling overhead in each single arithmetic operation. 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. Best regards, Simon -- 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.
