JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.75k stars 5.49k forks source link

packedQ from svd? #4818

Closed alanedelman closed 9 years ago

alanedelman commented 11 years ago

qrfact provides a QRPackedQ which I love because it muliplies matrices with m rows or n rows

svdfact should do the same (and I don't think it is)

Maybe a better name is PackedQ rather than QRPackedQ as other routines can pack a Q

ViralBShah commented 11 years ago

I think PackedQ as a name may not give any hint of the context in which Q is packed.

alanedelman commented 11 years ago

Does the context matter? Or is PackedQ simply a data structure for a product of Householder reflectors?

ViralBShah commented 11 years ago

I don't think that the name PackedQ suggests that it is a data structure that is a product of Householder reflectors. Packed could refer to a data structure for any kind of packing. How about HouseholderQ instead?

simonbyrne commented 10 years ago

Is there a lapack svd routine that returns matrices of householder reflections?

jiahao commented 10 years ago

Possibly relevant: Representation of Orthogonal or Unitary Matrices

andreasnoack commented 10 years ago

The routines for svd return the U and V in the usual dense form and it is not possible to get the householder reflections. The problem is that in contrast to reduction to tridiagonal, Hessenberg or QR, you cannot determine a priori how many reflectors constitute the orthogonal matrices. Hence I don't think svd fit into the present QRPackedQ. By the way, I like the name HouseholderQ.

I wonder if it is an idea to store only the thin U and V in a special type. Since the last parts of U and V could be any orthogonal basis for the null space of U and V it might be possible to define an efficient * that works similar to *(QRPackedQ,Matrix), but only uses the thin parts. Does it make sense and do you think it is possible (to do efficiently)?

ViralBShah commented 9 years ago

Please reopen if necessary. Looks like LAPACK doesn't give us a packed Q from SVD.

I do like the idea of efficient * with U and V.