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

SVD with eigen 2.0.7

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

SVD with eigen 2.0.7

Fri Oct 23, 2009 7:40 pm
I work with 2.0.5 and today I try to update to 2.0.7

The following code work with eigen 2.0.5 and fail with eigen 2.0.7

SVD<MatrixXd> m_matSVD;

At compilation I receive:

error C2512: 'Eigen::SVD<MatrixType>' : no appropriate default constructor available
1> with
1> [
1> MatrixType=Eigen::MatrixXd
1> ]

I try with Visual Studio C++ express 8.0
and with Visual Studio professionnal C++ 8.0 the student version.

Same error on each compiler.
User avatar
bjacob
Registered Member
Posts
658
Karma
3

Re: SVD with eigen 2.0.7

Fri Oct 23, 2009 9:39 pm
This is very surprising: the only difference in SVD between 2.0.5 and 2.0.7 is that this assert was added at line 110 in the compute() method:

Code: Select all
ei_assert(m>=n && "In Eigen 2.0, SVD only works for MxN matrices with M>=N. Sorry!");


By the way, in Eigen 2.0 (2.0.5 and 2.0.7), we didn't write a default ctor for SVD so it can only be using a compiler-generated one.

Try this:
* remove the assert. Does it make a difference? If yes, can you explain that? I'd be puzzled.
* add a trivial default ctor, just SVD() {}. Does it help? If yes, we sure can include that code.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
User avatar
bjacob
Registered Member
Posts
658
Karma
3

Re: SVD with eigen 2.0.7  Topic is solved

Fri Oct 23, 2009 10:07 pm
Can you try the 2.0 branch, i've added a default ctor.

If it works for you, i release 208 now (there's another major bug too)


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
Rox
Registered Member
Posts
2
Karma
0
OS

Re: SVD with eigen 2.0.7

Mon Oct 26, 2009 10:58 pm
Thank's for help. All build is ok with the add of SVD() {}.

And eigen 2_0_9 is ok with first tests.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]