Documentation of FullPivLu needs correction on the permutation matrices
Submitted by Allan Leal
Assigned to Nobody
Link to original bugzilla bug (#815)
Description
In http://eigen.tuxfamily.org/dox/classEigen_1_1FullPivLU.html, please correct from:
A = PLUQ
to
A = P^TLUQ^T
#include <iostream>
#include <Eigen/Dense>
using namespace Eigen;
using namespace std;
int main()
{
MatrixXd M = MatrixXd::Random(5, 5);
FullPivLU<MatrixXd> lu(M);
const MatrixXd L = lu.matrixLU().triangularView<UnitLower>();
const MatrixXd U = lu.matrixLU().triangularView<Upper>();
const MatrixXd P = lu.permutationP();
const MatrixXd Q = lu.permutationQ();
cout << "M = \n" << M << endl;
cout << "PLUQ = \n" << P*L*U*Q << endl;
cout << "P^TLUQ^T = \n" << P.transpose()*L*U*Q.transpose() << endl;
return 0;
}
Edited by Eigen Bugzilla