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

Eigen Compiler Error

Tags: None
(comma "," separated)
RLovelett
Registered Member
Posts
11
Karma
0

Eigen Compiler Error

Tue Apr 03, 2012 3:48 pm
The following code will not compile with the error below.

Code: Select all
bool invertable = false;
double* jacobian = new double[4 * 4];
Eigen::Map<Eigen::MatrixXd> Jacobian(pJacobianMatrix, 4, 4);
Eigen::MatrixXd JacobianInverse(4, 4);
Jacobian.computeInverseWithCheck(JacobianInverse, invertable);


Code: Select all
error C2039: 'run' : is not a member of 'Eigen::internal::compute_inverse_and_det_with_check<MatrixType,ResultType>'   c:\eigen\eigen-eigen-5b4cfce09c6f\eigen\src\lu\inverse.h   372


Note: I am using Eigen 5b4cfce09c6f from Hg, and using VS2010.

Edit: If it matters I have set #define EIGEN_DEFAULT_TO_ROW_MAJOR

Suggestions?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Eigen Compiler Error

Wed Apr 04, 2012 6:41 am
See the documentation:

http://eigen.tuxfamily.org/dox/classEig ... d052a2e438

This is only for fixed-size square matrices of size up to 4x4. So use Matrix4d. If your matrices are larger use a PartialPivLU<MatrixXd> lu(jacobian);

and lu.info()==Success to check, and X=lu.solve(B) to apply jacobian^-1. It's usually not recommended to compute the inverse explicitly.
RLovelett
Registered Member
Posts
11
Karma
0

Re: Eigen Compiler Error

Wed Apr 04, 2012 1:54 pm
@ggael

That explains everything.

I am going to take your advice and re-factor the code to use the PartialPivLU.

Thanks.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]