Re: [eigen] A not so simple product
• 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
• 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!!

#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;
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

---
```

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