-
Notifications
You must be signed in to change notification settings - Fork 51
Implemented LQ facotrization, questions about API #8
Conversation
Thank you for doing this. Is it necessary to allocate a new matrix in Solve? Does Dtrsm depend on that (it doesn't seem so from the netlib docs)? If it's not necessary to allocate, please don't and say that the routine over-writes - the convenience Solve function already makes allocations for this ad we should allow clients to decide when allocations happen if at all possible. Do we have pure Go implementations of the BLAS calls that this depends on? I like that we are using the engine more and want to see these calls in the other decomposition routines, but I don't want to block people from using the library if they are needing a pure Go solution. |
I haven’t had much time to work on the level-2 routines. I did level 1 incrementally, in that I wrote all the tests as I wrote each piece of code. It worked well, as it meant that there wasn’t a massive block of work left at the end that was testing. The level-2 routines are more complicated and have more tests. If we’d like, I don’t think it would be a ton of work to get the level-2 routines in order, but it’s a lot more work to also be sure that they’re correct. On Jan 18, 2014, at 6:02 PM, kortschak notifications@github.com wrote:
|
In order to get at least the decomposition routines in we either need to rewrite David's blas calls in place or write at least the calls that he makes - stubbing out the rest with informative panics. I prefer the latter since it will mean we can then rewrite the in-place calculation in the other decomposition routines to make use of blas calls. |
In general we need to allocate here because for A*X=B with A wide X has more rows than B. |
That all makes sense. Thanks. |
Implemented LQ factorization, questions about API
David, would you flesh out the doc comment for ApplyQ? (you may as well do that on gonum/matrix master directly). |
I implemented the LQ factorization and the minimum norm solver with calls to the blas engine.
For efficient solutions I think LQ and QR have to be implemented separately. LQ is probably more efficient in general because of the row major storage. The vectors describing the reflections are then actually in a continuous memory block.
I added an ApplyQ method which replaces the *Dense argument with its multiplication by Q (or Q^T). This would probably also be useful for the QR factorization.