On 6/11/10 1:50 AM, William Stein wrote:
Copy on write *should* be rather easy to implement for matrices at least.
William indicates otherwise in [1]. I can't think of an easy way to do
it either, so I'm really curious what how you think it would be easy.
Just out of curiosity, is this what would happen below with what you
guys are envisioning
for immutable copy on write matrices?
[snip]
I think the above would be very, very confusing to me. If immutable
matrices *act* as if they are fully mutable, but basically silently
have completely different semantics, this will be confusing.
I agree. I think my concerns would be taken care of if we just made the
top-level identity_matrix (and zero_matrix) function return a mutable
matrix (i.e., MM(1) or MM(0), rather than MM.one() or MM.zero())
I've posted a patch for doing this at
http://trac.sagemath.org/sage_trac/ticket/9212. It's ready for review.
Thanks,
Jason
[1]
http://groups.google.com/group/sage-devel/browse_frm/thread/1042edd11b3854b2
--
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