This forum has been archived. All content is frozen. Please use KDE Discuss instead.

SVD does not work correctly

Tags: None
(comma "," separated)
pavelpanteluk
Registered Member
Posts
2
Karma
0

SVD does not work correctly

Fri Sep 04, 2015 10:07 am
Code: Select all
 Eigen::Matrix<double, 4, 3> Bs;
        Bs.col(0) = b1;
        Bs.col(1) = b2;
        Bs.col(2) = b3;

        Eigen::JacobiSVD<Eigen::Matrix<double, 4, 3> > svd(Bs, Eigen::ComputeThinU);


svd.matrixU() has 4x4 size, but if i use
Code: Select all
 Eigen::JacobiSVD<Eigen::MatrixXd> svd(Bs, Eigen::ComputeThinU);
it work correct
svd.matrixU() has 4x3 size. i use eigen 3.2.3
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: SVD does not work correctly

Fri Sep 04, 2015 2:41 pm
Compile without -DNDEBUG and you should get an assertion explaining why it is failing. This is also explained in the doc: http://eigen.tuxfamily.org/dox-devel/cl ... dad4af3f5a. Basically, you cannot use "Thin" with fixed-size matrices.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar