[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: Eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] potential bug?
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Tue, 3 Aug 2010 19:53:16 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=6aO7DkvLpMsYTwBTP5rxSXoj68lFVyhBjKXxJGvtCR0=; b=jaUDdqsBjsnvJLOUSKZqL9qyyDZshid/1Ebvzd59uC5/rfixVxOnoopNgeOriNVlFY GanRyKx8dXytZXY1Kacv2K/ji77IiOVpHzXEbahIJih/LFfrF6nSCtNNo+v2+FDWyQWC bsWGZe6c0+vyJ9W6p9OU54VXyREo6Hk2L8WhY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ugn4/fphWYPKwLL2KMgHFImCwy1A289Z4k1YebeCkCsRoobc5RDRBiOvuS71i+XOXQ YOoUJwMh0Ro5e+lilHM/Yu/LW3KinSTILlFOYkQKLbwxKNlpg2AHvUTBpTPhQtalVHD6 ArboWY5KT0i7y1VsW3GGKpw5plM6aq9rD36Uo=
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;
}