class_FullPivLU.cpp
Go to the documentation of this file.
1 typedef Matrix<double, 5, 3> Matrix5x3;
2 typedef Matrix<double, 5, 5> Matrix5x5;
3 Matrix5x3 m = Matrix5x3::Random();
4 cout << "Here is the matrix m:" << endl << m << endl;
6 cout << "Here is, up to permutations, its LU decomposition matrix:"
7  << endl << lu.matrixLU() << endl;
8 cout << "Here is the L part:" << endl;
9 Matrix5x5 l = Matrix5x5::Identity();
10 l.block<5,3>(0,0).triangularView<StrictlyLower>() = lu.matrixLU();
11 cout << l << endl;
12 cout << "Here is the U part:" << endl;
13 Matrix5x3 u = lu.matrixLU().triangularView<Upper>();
14 cout << u << endl;
15 cout << "Let us now reconstruct the original matrix m:" << endl;
16 cout << lu.permutationP().inverse() * l * u * lu.permutationQ().inverse() << endl;
Matrix5x5
Matrix< double, 5, 5 > Matrix5x5
Definition: class_FullPivLU.cpp:2
Eigen::Upper
@ Upper
Definition: Constants.h:211
Eigen::FullPivLU
LU decomposition of a matrix with complete pivoting, and related features.
Definition: ForwardDeclarations.h:268
l
static const Line3 l(Rot3(), 1, 1)
Matrix5x3
Matrix< double, 5, 3 > Matrix5x3
Definition: class_FullPivLU.cpp:1
lu
cout<< "Here is the matrix m:"<< endl<< m<< endl;Eigen::FullPivLU< Matrix5x3 > lu(m)
m
Matrix5x3 m
Definition: class_FullPivLU.cpp:3


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:01:58