[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Re: QR Decomposition for a matrix with complex values

From: Jonny Taylor
Subject: Re: [Help-gsl] Re: QR Decomposition for a matrix with complex values
Date: Tue, 29 Jan 2008 11:46:17 +0000

OK, it turns out the problem was my confusion over exactly how the complex householder transformations work. With that sorted, I can get it to work.

The comment in householdercomplex.c:
"To compute H'v, pass the conjugate of tau as the first argument to gsl_linalg_householder_hm() rather than tau itself" was the bit I hadn't appreciated. Shouldn't this be mentioned somewhere in the manual? It's only by reading the source that you discover this pretty crucial point.

With that taken into account, I've got it working. Source file is attached in case it is of use to anybody. I have not included equivalents of some of the functions in qr.c because I did not test them since I don't need them. I have no idea whether it's more "correct" to store tau or its conjugate in the tau vector; I have chosen to store the conjugate.

Thanks for your help

Attachment: qr_complex.cpp
Description: Binary data

On 28 Jan 2008, at 21:07, Brian Gough wrote:

At Thu, 24 Jan 2008 14:33:44 +0000,
Jonny Taylor wrote:
I have a copy of Golub & van Loan (2nd edition) here, and as far as I
can see it only talks about real QR decomposition. Did you have a
part in mind where it talks specifically about complex decomposition?

As far as I remember it just says that it's the same algorithm as the
real case, so it doesn't describe it more than that.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]