Since they are still not in Lapack (or I'm blind?), and since I had a need for it, I have a made port of Choleski update/downdate from the original LINPACK dchud and dchdd routines. http://www.netlib.org/linpack/dchud.f http://www.netlib.org/linpack/dchdd.f
I followed the suggestions and guidelines of Matthias Seeger from:
Low Rank Updates for the Cholesky Decomposition - Matthias Seeger http://infoscience.epfl.ch/record/16146 ... update.pdf
(I noted that he previouslyposted on the subject in 2007)
The main changes are :
- uses of BLAS drot and drotg for Given's rotations
- forces positive elements on the diagonal of R
- accepts upper or lower Cholesky factor R
I also changed sqrt(1-norm**2) into a sin(acos(norm)) or cos(asin(norm) so as to be more stable if norm is close to 1.
This might be questionable because there is no use of inverse trigonometric functions inthe whole Lapack, but if you have a better way...
I named the routines dchur1 and dchdr1 for choleski update/downdate of rank 1, but of course, this can be changed at will...
You can find the code attached, it is released under MIT license.
Tell me if it is of any interest.