Re: [eigen] bug in the Eigen solver

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


Hi Timothy,

thanks for reminding me this bug. It is now fixed. I also added the
imag() function.

cheers.
Gael.

On Thu, Nov 13, 2008 at 11:20 PM, Timothy Hunter <tjhunter@xxxxxxxxxxxx> wrote:
> Hello all,
>
> I found a bug in EigenSolver.h, when you want to use the pseudo eigen
> vectors (some of them are computed correctly, some not). Here is a a code
> snippet that triggers the bug:
>
> const int N=14;
>
> const int M=7;
>
> Eigen::IOFormat fmt(10, Eigen::AlignCols, ", ", ";\n", "", "", "[", "]");
>
> MatrixXd H=MatrixXd::Random(N,N);
>
> Eigen::EigenSolver<MatrixXd> es(H);
>
> cout<<"REVal = "<<es.pseudoEigenvalueMatrix().format(fmt)<<"\n";
>
> cout<<"REVec = "<<es.pseudoEigenvectors().format(fmt)<<"\n";
>
> const MatrixXd & realEigenVecs = es.pseudoEigenvectors();
>
> const MatrixXd & realEigenVals = es.pseudoEigenvalueMatrix();
>
> cout<<"EVDiff =
> "<<(H*realEigenVecs-realEigenVecs*realEigenVals).eval().format(fmt)<<endl;
>
> I will be extremely happy if you could take some time to fix it. Thanks!
>
> Also, there is a method for extracting the real part of a matrix (.real()).
> Can you add a .imag() to do the same with the imaginary part?
>
> Best regards
>
> Tim Hunter
>
> --
>
> Timothy Hunter
>
> Student (Stanford University)
>
> T. 404 421 3075

---


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