Re: [eigen] Error: trying to recover Q matrix in sparse QR factorization

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


On 07.05.2013 20:40, Avneesh Saluja wrote:
OK, ideally what I would like to do is perform two QR decompositions (let's
call them "left" and "right"), and take their resulting product Q_left^T *
Q_right.  You mentioned that I can directly use qr_factorizer.matrixQ() in
expressions, but I'm unable to make it work.  In code:

[...]

SparseMatrix<double> q1t_q2 =
qr_factorizer_left.matrixQ().transpose()*qr_factorizer_right.matrixQ();

Yes, that seems not to be implemented either. If you only want to do vector multiplications with q1t_q2, you need to write

w = (qr_factorizer_left.matrixQ().transpose()*(qr_factorizer_right.matrixQ()*v));

instead of w = q1t_q2*v;

If qr_factorizer_left and qr_factorizer_right are member variables of your class, you can encapsulate that into a method.

If you need to do more fancy stuff with q1t_q2, I guess you need to use the multiply-with-identity-matrix-trick for now.


Christoph


--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: +49 (421) 218-64252
----------------------------------------------



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/