Re: [eigen] potential bug?

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


Seems to be a bug. With HouseholderQR it works.

Shall I add it as a unit test?

- Hauke

On Tue, Aug 3, 2010 at 7:53 PM, Hauke Heibel
<hauke.heibel@xxxxxxxxxxxxxx> wrote:
> 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/