> Now, If I recall correctly, Meinholf main speed issue was elsewhere (with > the matrix > constructor?), and during his talk I had shown how to work around > this until the matrix constructor get optimized. >
Thanks for this Nicolas. I didn't know that you had identified the problem. I think that I have now officially migrated to sage but certainly in the back of my mind there was a niggling worry that this might be an issue down the track. I was hoping that the issue wasn't ultimately the category and coercion models as I know from debugging that they both do an awful lot behind the scene when objects are created (for example when taking linear combinations of objects)... You don't necessarily need to change the parent of each element (which > would indeed be a pain!). You can instead use a facade parent. This > could give something like: > > sage: P = Partitions(3) > sage: p = P.list() # create a bunch of elements of P > sage: Q = Partitions(3, order=..., facade = True) > sage: sorted(p, cmp=Q.cmp) # those are also elements of Q, so > we can use the methods from Q > I don't understand what facade does so this might be naive, but if this is the way you think that these parental variations should work wouldn't it make more sense for the facade=True to be automatically imposed as part of the definition of Partitions(3, order=...)? Andrew -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To view this discussion on the web visit https://groups.google.com/d/msg/sage-combinat-devel/-/OCrN0GZ9DoIJ. To post to this group, send email to sage-combinat-devel@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.