David,
I have a FullMatrix A on which I'd like to perform a QR factorization
and then access a few columns of the resulting orthogonal matrix Q. In
looking for some internal options within deal.II, I came across the
Householder class. After taking a pass at the source, it looks like the
class has an optimized approach to storing information about the QR
factorization in the form of a single full matrix and a diagonal vector.
However, in looking at how the decomposition is being computed and how
the least squares problem is being solved, I haven't been immediately
able to tell how I might go about constructing Q from the information
stored after initialize has run in the Householder object. I may have
missed something and the Householder (full matrix) object does indeed
simply store Q, but it seems it might be doing something
different/optimized.
In any case, I'm simply looking for some advice as to how one might
construct (or extract) Q from the Householder object. Thank you in
advance for the help.
Reading through the code a bit, the class does not in fact store the Q
and R factors explicitly. It does store R, but the Q factor is stored as
the product of Householder reflections of the form Q_i = I-v_i v_i^T
where the vectors v_i are so that they can be stored in the
lower-triangular part of the underlying matrix, whereas R is stored in
the upper triangular part.
The v_i vectors and the R matrix now are in conflict because they both
want to use the diagonal entry of the matrix, but we can only store one
in these positions, of course. Consequently, the entries (v_i)_i are
stored separately in the `diagonal` vector.
I'm not sure this is helpful in extracting this information, but that's
what the class appears to be doing.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.colostate.edu/~bangerth/
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.