Tutorial_PartialLU_solve.cpp
Go to the documentation of this file.
00001 #include <Eigen/Core>
00002 #include <Eigen/LU>
00003 #include <iostream>
00004 
00005 using namespace std;
00006 using namespace Eigen;
00007 
00008 int main()
00009 {
00010    Matrix3f A;
00011    Vector3f b;
00012    A << 1,2,3,  4,5,6,  7,8,10;
00013    b << 3, 3, 4;
00014    cout << "Here is the matrix A:" << endl << A << endl;
00015    cout << "Here is the vector b:" << endl << b << endl;
00016    Vector3f x = A.lu().solve(b);
00017    cout << "The solution is:" << endl << x << endl;
00018 }


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:33:27