mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Port FullPivLU to PermutationMatrix
This commit is contained in:
@@ -13,8 +13,4 @@ cout << "Here is the U part:" << endl;
|
||||
Matrix5x3 u = lu.matrixLU().part<UpperTriangular>();
|
||||
cout << u << endl;
|
||||
cout << "Let us now reconstruct the original matrix m:" << endl;
|
||||
Matrix5x3 x = l * u;
|
||||
Matrix5x3 y;
|
||||
for(int i = 0; i < 5; i++) for(int j = 0; j < 3; j++)
|
||||
y(i, lu.permutationQ()[j]) = x(lu.permutationP()[i], j);
|
||||
cout << y << endl; // should be equal to the original matrix m
|
||||
cout << lu.permutationP().inverse() * l * u * lu.permutationQ().inverse() << endl;
|
||||
|
||||
Reference in New Issue
Block a user