Re: [eigen] bug in the Eigen solver |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] bug in the Eigen solver
- From: "Gael Guennebaud" <gael.guennebaud@xxxxxxxxx>
- Date: Fri, 14 Nov 2008 10:58:02 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Hbyfp1IOZzU1+mNlKZmlBjGLmY7ut8PGbqWr3zM/dQk=; b=duS3VKZ+WS9ChCYKyv4qyN+xzGRW8EQFeHha11l41An7jw7aJ2To0cC7uGzIvzJoIY k2RbL8PAN1IMa0Nd2oRzS3TDxFZ4HlH20cJGH03azP6ljDZ/xusFx/xCXTXx9j5DSXOu suIDhf0VFV56h2IoJoc7ra96gkRTNVSpUf7lA=
- 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=exvspxRyNVbKTPfK5MTU/dbMjWGXs6p1xc4ge7AUaS/LuFoJdfO51L7MoYxWWFzeeH +LRW/sAeEReNUjv1KzEpmsVVbYbHDyy+OWyoU8BVLh0UwphFIPRhYNtKsU3lVdQVzzCR zjON47tTTIfEingeJDGZgL4cgsYb7i8oF6bxU=
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
---