Re: [eigen] A not so simple product

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


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

---


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