Dear Christian, Thank you for following up, and I apologize for taking so long to get back to you. I have looked at your patch and added the complex QR routines, with some modifications. The main one is I have deprecated the complex_householder_hm function because it is based on Level-1 BLAS operations which are quite slow. I have made a new function complex_householder_left() which uses Level-2 BLAS, at the cost of requiring extra workspace. The end result is that the tau parameter to QR_decomp must be length N, instead of MIN(M,N) now.
I have made a similar change to the real QR_decomp function, in a way which is backward compatible with the current interface. I updated the docs and put everything on the git now. Ultimately, I would like to implement the Level-3 BLAS QR algorithm from Elmroth and Gustavson (which is already implemented for the real case), since the current Level-2 code is quite slow for larger matrices which are routinely encountered in research. I hope to get around to this soon, or if you are interested, please go ahead and try to implement it. Thanks again for the delay, Patrick On 6/3/20 4:52 AM, Christian Krueger wrote: > Hi Patrick, > > I don't want to insist on getting my patches introduced. But as I have, > meanwhile, learned a bit more about git and such, I thought I would make > my patch more easily accessible. I've merged my changes onto the current > git commit (as of today -- bb7f532c) and attach two clean patches (one > for the Householder fix and one for the complex QR) that could be applied. > > Cheers, > Christian > > > On 11/27/17 10:34 PM, Patrick Alken wrote: >> Hi Christian, >> >> This should be very useful. I will take a look at your code as soon >> as I can, though it may be a while as I am very busy with other things >> at the moment. I will add this to the bug tracker so it isn't lost. >> >> Thanks, >> Patrick >> >> On 11/27/2017 08:34 AM, Christian Krueger wrote: >>> Hi, >>> >>> I was looking for the QR decomposition for complex-valued matrices. As >>> GSL does not provide this yet, I have copied the code for the >>> real-valued QR and modified it to handle complex-valued matrices. >>> >>> As I've seen in the archive that this feature has been requested a few >>> times already, I am happy to share it with everyone who wants to use it. >>> My github repository can be found at: >>> https://github.com/mangroveck/gsl-qr-complex-devel.git >>> >>> The file linalg/qrc.c is essentially a copy of the file linalg/qr.c and >>> provides a bunch of gsl_linalg_complex_QR_* functions. I've had to add >>> "_complex" to the function calls and sometimes take the conjugate of tau >>> when calling the householder-functions but the whole process was fairly >>> straight-forward and the decomposition works. >>> >>> * My repository also includes my patch for the >>> gsl_linalg_complex_householder_hv() function to handle the N=1 case. >>> (I've just reported the bug on the bug-list). >>> * I've added various tests to the file linalg/test.c to test the new >>> gsl_linalg_complex_QR_* functions (in the same style as the tests for >>> the real-valued QR decomp). >>> * I've also adjusted the header file linalg/gsl_linalg.h and the file >>> Makefile.am >>> >>> The only exception is the function gsl_linalg_complex_QR_update() which >>> I haven't adjusted yet as it requires Givens rotations and they don't >>> take complex values yet (within GSL). All other functionality from qr.c >>> is now available for complex values, too. >>> >>> If it helps, I'm happy for this code to be included in GSL. >>> >>> Christian >>> >>> >> >> >> >>