Hi Ondrey, 2009/5/13 Ondrej Certik <ond...@certik.cz>: > The patch looks good to me. Could you please also add tests for > symbolic matrices? This only tests for a numeric ones, right?
Yup, I copied the tests from LUsolve, and they are only for numeric matrices. I'll add tests with symbolic matrices too. This may require removing this strange assert statemen from Matrix.QRdecomposition. Actually I'm getting a bit confused about this: the issue tracker entry mentioned that QUsolve would be good because it has better stability properties. This argument only makes sense if one is worried about the effect of rounding errors. But the current implementation of the QR decomposition seems to use Gram Schmidt orthonormalisation, which is numerically unstable and shouldn't be used in situations where rounding errors occur. This seems inconsistent. I see the following possibilities: 1) One could switch the QR decomposition to use Householder reflections or similar, but this would restrict the algorithm to real (or maybe complex) matrices, because the algorithm needs to know the sign (or complex phase) of certain intermediate quantities. Result: QRsolve would be stable but would only work for real matrices. Symbolic matrices could use LUsolve. 2) Have two implementations of QR decomposition, one which works for symbolic matrices, and one which is numerically stable (for real matrices). Neither of these seems to work well for matrices which have floats and symbols in them. What do you think? All the best, Jochen -- http://seehuhn.de/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-patches" group. To post to this group, send email to sympy-patches@googlegroups.com To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en -~----------~----~----~----~------~----~------~--~---