|Re: [eigen] QR factorization question|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] QR factorization question
- From: Eric Chu <eytchu@xxxxxxxxx>
- Date: Wed, 26 Aug 2009 18:02:53 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=Ez3wh/VdoA8Xm0+ybJRZ0fyIKl2ayamKlHjxtiRCIsU=; b=dhIooxUCt8/ANUQpZ9pS/Kxz9FrDiWX1gMH1t9CE/Z/Ex9cpBfpyijMHRyYGZRbCGf f3rozQ4q4ceqdoc7dYanYGBpwx8UYBGFwxPPkPjG8f6GHWC9JeX4KZHxf/ZJyv+I+MEJ yfoMb+7TMWFabcIIGyEV4VH0jAKnI/VSAqehg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=l2RGg05EGKsHnhd7tPVZR2n3C9O01zYfgB8R8OSSGgG06UD0VlExUug3p5gSDOl/0r 8QugPgMwk8E8AAbnNw0TPdNJ7B3v582aN33oYTTkH97EoQPiacZb5nWlGYpeepRniFN+ l4KgmlMbrv4Du9udJ+QCOH5Yi721byvbW/PtQ=
great! that solved my problem.
i have another issue though: A is a skinny matrix (m > n), and the matrix Q is square (m x m).
how do i retrieve the appropriate Q matrix that goes with my (now) upper triangular R? (i.e. A = [Q1 Q2] [R1; 0]--or the "economy size decomposition" in Matlab)
is there some way to figure out what the triangularView call did (what it multiplied matrixQR with to make matrixQR upper triangular) so i can apply it appropriately to the matrixQ and grab the first n columns.
On Wed, Aug 26, 2009 at 4:41 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
2009/8/26 Eric Chu <eytchu@xxxxxxxxx>:
Yes, matrixR() is removed at the moment, we may reintroduce it in the
> hi all,
> thanks for the great work. i recently updated my version of eigen, and the
> api's changed a bit from before.
> more specifically, the qr factorization module has changed. i was wondering
> how i'd go about retrieving the upper triangular matrix "R" from a qr
> that is, if i have an m x n matrix A, and i call
> R = A.householderQr().matrixR();
> the API seems to have deprecated this function call. i think i can call
> matrixQR() instead, but it's no longer upper triangular. any pointers?
future though once we support trapezoid matrices.
Meawhile you can retrive R as the upper triangular part of matrixQR().
R = A.householderQr().matrixQR().triangularView<UpperTriangular>();