[eigen] potential bug?

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


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



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