On Tue, Apr 13, 2010 at 2:53 AM, Nicolas M. Thiery <nicolas.thi...@u-psud.fr> wrote: >> ### Example 1 ### >> sage: (P,Q,R)= >> MtxAlgebrasWithBasis(QQ).example(('P','Q','R')).algebra_generators() > > Do you need a specific category for your application? In particular, > will you have several parents between which to share code?
Its a possibility- still getting my head around all the parents I can choose from. The application is just to implement matrices - which if I recall correctly from early University (many years ago ;-) - is "vector space" and Im sure these categories are a great way to represent vetcor spaces (especially with the amendments you suggested of including rows,cols so we check sizes are ok when adding / multiplying 2 matrices) (Note - not referring to the usual matrices that we find in software (with matrix elements) ) - just the symbolic kind where we can simplify (AB)^-1 as B^-1 A^-1 ) > If the only change is on the repr_term line, you might as well > override the method _repr_term in the parent; that's its purpose! Great idea! Will try this today. P.S. One problem I found yesterday is I worked on the _repr_ outside the class until it worked as planned then when I cut and pasted it inside the class (right at the top, as the first function) it didnt seem to change what was printed. Any ideas of why it might not be working inside the class? Many thanks Nicolas Ross -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org To unsubscribe, reply using "remove me" as the subject.