Hi.
Congrats for successfully using DGEQR2!
Note that if you go to larger size you will want to use DGEQRF which uses level
3 BLAS in conjunction with an optimized BLAS routines.
But if you are happy with your time to solution keep it like that. For 4x3, you
are just fine.
To extract Q, you need to use DORGQR. Please read the doc and come back to us
if problems.
Note that some times you do not want Q but you want to apply Q to a bunch of
vectors, in which case,
it is better to use DORMQR.
Of course you can first compute Q with DORGQR and then apply Q by a straight
matrix-matrix multiplication, but this is less efficient (in general) than
DORMQR.
Of course you can first compute Q with DORMQR by applying DORMQR to the
identity, but this is less efficient (in general) than DORGQR.
Julien.
On Sep 27, 2012, at 2:27 PM, Roy P Koomullil
<rkoomul@Domain.Removed<mailto:rkoomul@Domain.Removed>> wrote:
Hi,
I am trying to use DGEQR2 to calculate QR factorization of a rectangular
matrix. I was able to compile the library and run it with a simple 4x3 case. I
also could see R (which is the upper triangular portion of A on exit).
However, I am having some issue on extracting Q from the matrix.
In the documentation it is written that Q is the product of elementary
reflectors (H(1)H(2)?H(k)), where H(i) = I ? tau*v*v_transpose and v is stored
in the lower triangular portion of A on exit. This involves a lot of
calculations outside the library. Is there any easier way to calculate Q? I am
not sure about what are the properties of elementary reflectors and properties
of v, we can use to simplify the calculations.
Any help in this matter will be greatly appreciated.
Thanks,
Roy
===============================================================
Associate Professor
Mailing Address:
Mechanical Engineering/UAB
BEC 257
Phone: (205)-934-0832 /Fax:(205)-975-7244 1720
Second Ave South
http://www.eng.uab.edu/me/faculty/rkoomul
Birmingham, AL 35294
===============================================================
_______________________________________________
Lapack mailing list
Lapack@Domain.Removed<mailto:Lapack@Domain.Removed>
http://lists.eecs.utk.edu/mailman/listinfo/lapack
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.eecs.utk.edu/mailman/private/lapack/attachments/20120928/74796ba7/attachment.html
|