TutorialLinAlgRankRevealing.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    Matrix3f A;
00010    A << 1, 2, 5,
00011         2, 1, 4,
00012         3, 0, 3;
00013    cout << "Here is the matrix A:\n" << A << endl;
00014    FullPivLU<Matrix3f> lu_decomp(A);
00015    cout << "The rank of A is " << lu_decomp.rank() << endl;
00016    cout << "Here is a matrix whose columns form a basis of the null-space of A:\n"
00017         << lu_decomp.kernel() << endl;
00018    cout << "Here is a matrix whose columns form a basis of the column-space of A:\n"
00019         << lu_decomp.image(A) << endl; // yes, have to pass the original A
00020 }


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