[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sparse matrix problem
From: |
John W. Eaton |
Subject: |
Re: Sparse matrix problem |
Date: |
Wed, 3 Jan 2007 11:53:30 -0500 |
On 3-Jan-2007, David Bateman wrote:
| Ok, this was a lot more work than I though it would be, but here is the
| patch. Basically it allows scalars to be stored in a sparse matrix
| container and to be treated as if they were scalars. This is necessary
| as Mathworks chose the path of letting the user store scalars as sparse
| matrices rather than automatically reconverting these to scalars. In any
| case the attached patch makes octave matlab compatible for scalars
| stored as sparse matrices for all operators...
I applied this patch. It's unfortunate that we have nice type
conversions that lead to the right behavior (enforced by the type
system) but we still must have special cases like this. Should we
consider eliminating the special scalar types and handle the special
scalar cases in the Matrix classes instead?
Thanks,
jwe