Welcome to the KDE Community Forums, the official forum board for KDE.
You are currently viewing the forums as an unregistered user. Registration allows you to post and discuss topics, receive private messages, vote on ideas, subscribe to topics and many such great features. Registration is a simple process and completely free. So register now and be a part of the community!
You are currently viewing the forums as an unregistered user. Registration allows you to post and discuss topics, receive private messages, vote on ideas, subscribe to topics and many such great features. Registration is a simple process and completely free. So register now and be a part of the community!
Using Eigen in Windows
3 posts • Page 1 of 1
Using Eigen in Windows
hello,
i'm using MSVC 2008 and trying to compute SVD.
i'm testing with a matrix as in http://en.wikipedia.org/wiki/Singular_value_decomposition#Example.
in Debug Mode, after trying to run the code the output was:
in Release Mode, the output was correct but the application still crashes and an error message box from visual studio is showed up (a screenshot: http://aurodeus.freehostia.com/skripsi/error.html)
any idea?
btw, in my real project i will need to set the values for each matrix element separately, so how to set values for each A(m,n) separately?
and since i'm working with Windows Forms Application (not a Console Application as above) i will need to get the Singular Values separately also and then convert them to String, so how to get the Singular Values separately?
many thanks before!
i'm using MSVC 2008 and trying to compute SVD.
i'm testing with a matrix as in http://en.wikipedia.org/wiki/Singular_value_decomposition#Example.
- Code: Select all
const int m = 4, n = 5;
MatrixXf A = MatrixXf(m, n); /* this is just a test, so i don't mind how much resource is used */
A <<
1, 0, 0, 0, 2,
0, 0, 3, 0, 0,
0, 0, 0, 0, 0,
0, 4, 0, 0, 0;
cout << A.svd().singularValues();
in Debug Mode, after trying to run the code the output was:
Assertion failed: index >= 0 && index < size(), file c:\program files\eigen2\eigen\src\core\coeffs.h, line 186
in Release Mode, the output was correct but the application still crashes and an error message box from visual studio is showed up (a screenshot: http://aurodeus.freehostia.com/skripsi/error.html)
any idea?
btw, in my real project i will need to set the values for each matrix element separately, so how to set values for each A(m,n) separately?
and since i'm working with Windows Forms Application (not a Console Application as above) i will need to get the Singular Values separately also and then convert them to String, so how to get the Singular Values separately?
many thanks before!
Re: Using Eigen in Windows
First of all, you seem primarily interested in SVD, which to be honest isn't the greatest aspect of Eigen 2.0 (where we explicitly say that it is experimental). I'd recommend you to either try the development branch, or re-evaluate Eigen when we release the next major version.
Yes, in Eigen 2.0 the SVD is only for MxN matrices with M>=N. I just added an assert to guard that. In the devel branch, JacobiSVD already does that.
As explained in the tutorial, just do A(m,n) = value;
Not sure what you mean. matrix.svd().singularValues() returns you the vector of singular values. We don't offer yet a way to compute only one singular value, but be aware that if you start from a general matrix, computing just one singular value is almost as expensive as calculating them all. Only when you have e.g. a bidiagonal matrix, is there an optimization opportunity here.
in Debug Mode, after trying to run the code the output was:
Assertion failed: index >= 0 && index < size(), file c:\program files\eigen2\eigen\src\core\coeffs.h, line 186
in Release Mode, the output was correct but the application still crashes and an error message box from visual studio is showed up (a screenshot: http://aurodeus.freehostia.com/skripsi/error.html)
any idea?
Yes, in Eigen 2.0 the SVD is only for MxN matrices with M>=N. I just added an assert to guard that. In the devel branch, JacobiSVD already does that.
how to set values for each A(m,n) separately?
As explained in the tutorial, just do A(m,n) = value;
how to get the Singular Values separately?
Not sure what you mean. matrix.svd().singularValues() returns you the vector of singular values. We don't offer yet a way to compute only one singular value, but be aware that if you start from a general matrix, computing just one singular value is almost as expensive as calculating them all. Only when you have e.g. a bidiagonal matrix, is there an optimization opportunity here.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
Have a serious interest in Eigen? Then join the mailing list!
Re: Using Eigen in Windows
yeah i'm only interested in SVD because my i'm assigned to compute the matrix using SVD
ok thanks for your reply 
ok thanks for your reply 
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests

Search
FAQ
Policy
KDE.org
KDE.news
Planet KDE
More 
Windows XP