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

Problem with LU Decomposition.

Tags: None
(comma "," separated)
jrojek
Registered Member
Posts
1
Karma
0

Problem with LU Decomposition.

Tue Nov 26, 2013 2:24 pm
I've tried to compile following code:
Code: Select all
#include <iostream>
#include <Eigen/Dense>
#include <Eigen/LU>
using namespace std;
using namespace Eigen;

int main()
{
   MatrixXd A(3,3);
   A << 2, 1, 3,
       2, 6, 8,
       6, 8, 18;
   Vector3d b(1, 3, 5);
   VectorXd x(3);
   A.lu().solve(b, &x);
   cout << x;
   return 0;
}


I get an error in line 15. I'm using Dev C++. The error report is:
[Error] no matching function for call to 'Eigen::PartialPivLU<Eigen::Matrix<double, -0x000000001, -0x000000001> >::solve(Eigen::Vector3d&, Eigen::VectorXd*) const'

I guess it's something simple enough but I'm just starting using Eigen.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Problem with LU Decomposition.

Tue Nov 26, 2013 9:12 pm
hm, you probably looked at the Eigen2 documentation. The API is:

x = A.lu().solve(b);


Bookmarks



Who is online

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