Re: [eigen] potential bug? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: Eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] potential bug?
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Tue, 3 Aug 2010 20:46:46 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=V9lK5cmf2tJOU52a6eemwr6F+Ak+2mFyOeB75F1yvNo=; b=U9TzH0KJc/TiKXphZugyG11AaamgQavVf/Omsxo10fDdq9CNwNMb/e51ehGYQM13Jd AYAb+cEv72mdPOudAU51wi9S0DsPp0qHesFm7JgUrI5SwBZjTCa3nlLqFNijpFVjCrw1 NwFi3yY4iTzDC8s/q9rbs/ShK9mtheagwDE4w=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=DyNtBI3XXT/9momwsb7+GLWixQ9nSGq4JBp0WTYkh56itCoJ0Lf5ctdrPJ2a+MRs0P vp6S3Lmtl+Tb/ixGAAFjmsVcCxAobwJUHWn3FU2daCxrJfRRDrivIy48r1huCI1VeI+S PeAMu57aZRTyPlxcDQ2uNGNVjCAUZ7d0RF1qM=
Seems to be a bug. With HouseholderQR it works.
Shall I add it as a unit test?
- Hauke
On Tue, Aug 3, 2010 at 7:53 PM, Hauke Heibel
<hauke.heibel@xxxxxxxxxxxxxx> wrote:
> Hi,
>
> this code here produces a norm of around 2. Is that a bug or is it me?
>
> - Hauke
>
> #include <Eigen/Eigen>
>
> #include <iostream>
>
> using namespace Eigen;
>
> void main()
> {
> typedef Matrix4d MatrixType;
> MatrixType m = MatrixType::Random();
>
> ColPivHouseholderQR<MatrixType> qr(m);
>
> MatrixType R = qr.matrixQR().triangularView<Upper>();
> MatrixType Q = qr.householderQ();
>
> std::cout << qr.rank() << std::endl;
> std::cout << (Q*R - m).norm() << std::endl;
> }
>