TutorialLinAlgExSolveLDLT.cpp
Go to the documentation of this file.
00001 #include <iostream>
00002 #include <Eigen/Dense>
00003 
00004 using namespace std;
00005 using namespace Eigen;
00006 
00007 int main()
00008 {
00009    Matrix2f A, b;
00010    A << 2, -1, -1, 3;
00011    b << 1, 2, 3, 1;
00012    cout << "Here is the matrix A:\n" << A << endl;
00013    cout << "Here is the right hand side b:\n" << b << endl;
00014    Matrix2f x = A.ldlt().solve(b);
00015    cout << "The solution is:\n" << x << endl;
00016 }


libicr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:33:55