QR decomp for complex matrix

Open discussion regarding features, bugs, issues, vendors, etc.

QR decomp for complex matrix

Postby cottrell » Sun Aug 25, 2019 9:28 am

I'm used to the functions dgeqrf and dorgqr for real matrices. Recently I've been working with complex matrices, and I see there's a zgeqrf, but no zorgqr to construct the m x n Q matrix from the raw materials provided by zgeqrf. I guess there must be a reason for that -- can you tell me what it is?

(I've written code which does the job on Q for the complex case, but I'm sure it's horribly inefficient compared with the clever stuff that dorgqr does.)
cottrell
 
Posts: 73
Joined: Thu Jan 15, 2009 1:40 pm

Re: QR decomp for complex matrix

Postby Julien Langou » Sun Aug 25, 2019 9:43 am

ZUNGQR
Julien Langou
 
Posts: 834
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

Re: QR decomp for complex matrix

Postby cottrell » Sun Aug 25, 2019 3:34 pm

Perfect! I missed that, needless to say, but then most z* functions have the same name as the corresponding d* ones, apart from the first letter.
cottrell
 
Posts: 73
Joined: Thu Jan 15, 2009 1:40 pm

Re: QR decomp for complex matrix

Postby cottrell » Sun Aug 25, 2019 4:04 pm

Ah, but now I see: ZUNGQR does not have the same signature as DORGQR (data types aside).

However, it would be helpful if the doc for ZGEQRF had a cross reference to ZUNGQR.
cottrell
 
Posts: 73
Joined: Thu Jan 15, 2009 1:40 pm

Re: QR decomp for complex matrix

Postby cottrell » Sun Aug 25, 2019 5:48 pm

Oof, sorry, too hasty! Actually the signatures of DORGQR and ZUNGQR are the same, modulo the data types for A, TAU and WORK. So (a less pressing question) is there a reason why the names of the functions differ, other than in their first letter as usual?
cottrell
 
Posts: 73
Joined: Thu Jan 15, 2009 1:40 pm

Re: QR decomp for complex matrix

Postby Julien Langou » Sun Aug 25, 2019 8:26 pm

OR = Orthogonal
UN = unitary

In general we say orthogonal for real matrices, and we say unitary for complex matrices.

( For the record, my preference would be to use DUNxxx and ZUNxxx. )
Julien Langou
 
Posts: 834
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

Re: QR decomp for complex matrix

Postby cottrell » Tue Aug 27, 2019 4:18 pm

Thanks for the explanation, Julien. My only remaining point is that it would be nice to have cross-references from the primary QR functions to those that extract or construct the actual Q matrix, in the online LAPACK documentation.
cottrell
 
Posts: 73
Joined: Thu Jan 15, 2009 1:40 pm


Return to User Discussion

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron