scipy/scipy — pull request #4249 by ewmoore (2014-12-09 14:18:50+00:00)
Title: Add routines for updating QR decompositions

This pull request goes on top of #4021, accordingly only the last few commits are relevant here.

Here three new functions are added to perform various modifications of qr decompositions: `qr_update`, `qr_insert` and `qr_delete` for performing rank-k updates, adding row(s) or column(s) and removing row(s) or column(s).

The methods used are essentially those in [1], with some input from [2].

I've endeavored to write this such that updates can be performed in-place as much as possible. This is, for instance, why the rank-1 update and the rank-k update algorithms are slightly different. This allows the rank-1 update to support updating `q` and `r` when they are stored in C order. (In this spirit, it might be worth changing `linalg.qr` to return fortran ordered 'r', since at present it always returns a C ordered `r`, and a F ordered `q`. Numpy's qr returns both as C order.)

Some outstanding things:

1. I suppose I'll need to add a 'check_finite' flag to these.
2. `overwrite_qr` should probably default to `False` instead of true.

References

1. Golub, G. H. & Loan, C. F. van V. Matrix Computations, 3rd Ed. (Johns Hopkins University Press, 1996).
2. Hammarling, S. & Lucas, C. Updating the QR factorization and the least squares problem. 1-73 (The University of Manchester, 2008). at