Registered Member
|
I'm developing an application that requires eigenvalues be calculated.
However when I try to calculate the eigenvalues I fail on assert on line 59 of coeffs.h. And this causes a crash. However if I ignore it and keep going the results are correct. I confirmed this with MATLAB. My question is why am I failing the assert if the eigenvalues can be calculated. Is this assert call simply to draw attention to developers? I'm currently building on Microsoft Visual C++ 2005 Pro on Windows XP |
Moderator
|
What assert? Which eigenvalues decomposition? SelfAdjoint? Complex? general?
|
Registered Member
|
I apologize, I actually listed the wrong error.
I'm failing the ei_assert(Flags&SelfAdjointBit); call in selfadjointeigensolver.h |
Registered Member
|
On line 296 in selfadjointeigensolver.h
|
Moderator
|
oh your are still using Eigen2, to call .eigenvalues() directly on a matrix you have to mark it as selfadjoint:
mat.mark<SelfAdjointBit>().eigenvalues() but I'd recommend you to use either the SelfAdjointEigenSolver or EigenSolver classes directly depending on whether your matrix is selfadjoint or general: SelfAdjointEigenSolver<MatrixType> eig(mat); ... eig.egenvalues() ...; ... eig.egenvvectors() ...; |
Registered Member
|
I seem to be getting syntax errors with both solutions.
For solution 1 I get get the following errors: SelfAdjointBit undeclared identifier mark is not a member of Eigen::Matrix For solution 2 I get the following: eig : identifier not found Eigen::Matrix3d illegal use of this type of expression (I'm using that as the matrix type) SelfAdjointEigenSolver: undeclared identifer I'm including the following from Eigen2 #include <Eigen/Core> #include <Eigen/Array> #include <Eigen/Geometry> #include <Eigen/LU> #include <Eigen/Eigen> and using the following macro: USING_PART_OF_NAMESPACE_EIGEN Is there anything else I should be doing? Thanks again for the help |
Moderator
|
sorry it is probably "marked<Eigen::SelfAdjoint>()" and you also need to #include <Eigen/QR>
btw, do you have to stick with Eigen2? Eigen3 is much more mature, and better documented too. |
Registered Member
|
Thanks for all the help. One more quick question. I took your advice and began upgrading to Eigen3 and for the most part the port has gone smoothly except for one syntax problem. I used to have a call
But in Eigen3 I notice that they have a different function so I'm using:
However I keep getting errors that say 'run' is not a member of Eigen::internal::compute_inverse_and_det_with_check I am including <Eigen/LU> and that's all the documentation on the website says I need. What am I doing wrong here? |
Registered Member
|
Actually I found the problem. Thanks for the help
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]