Re: [eigen] A not so simple product |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] A not so simple product
- From: "Benoit Jacob" <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 10 Dec 2008 15:46:12 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=JjziApFJq76knrpfA9jNqrc8sZTMAwU4/voLbSpwzGk=; b=DSreof5bn3ziclU4SPwZU0KLd2Knag1C8ohgHpI/PXV4CLvAZKZ3AASIZuYeA1DzQ6 +whaGD8p2l2wgabP88tPJDS3v0sfeiM7ETKLekovAHeiVmMSLSfQnQunMapc81ikawFW cP7mAk+rcOaUPOGZmlHXHPubOSjI2p53AXYqA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=TlFU9VqRx+5EXXuB5q4VHBZVC7u82ANNvo75v068Vik+DoU3C5nyJOfB+dMDmUZfka 09u8In0BlhwEBFwjoQkB9scntBtiAdXHJfXdeIe1oN7psiaWKgKEY9Yh7qTVLZwRiwoW o7oeIcPrJ2uV+e7569eaEB4KiMT8OC3UrE6hM=
I just discovered yet another bug in diagonal product. This part of
Eigen is really very buggy!!
To grade my exam I made this program:
#define EIGEN_DEFAULT_IO_FORMAT EIGEN_DOCS_IO_FORMAT
#include <Eigen/QR>
using namespace Eigen;
using namespace std;
int main()
{
Matrix3d A;
A << 0,1,1,
1,0,1,
1,1,0;
SelfAdjointEigenSolver<Matrix3d> s(A);
cout << "Eigenvalues:" << endl << s.eigenvalues() << endl;
cout << "Eigenvectors:" << endl << s.eigenvectors() *
(s.eigenvectors().row(2).cwise().inverse().asDiagonal()).eval() <<
endl;
}
This program produces the correct result.
But if I remove the .eval() it produces the wrong result.
Fixing diagonal product is really my top priority in eigen.... will
take me a while though as a first have to grade 400 exams.
Cheers,
Benoit
---