New user self-registration is currently disabled. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Bug 815 - Documentation of FullPivLu needs correction on the permutation matrices
Documentation of FullPivLu needs correction on the permutation matrices
Status: RESOLVED FIXED
Product: Eigen
Classification: Unclassified
Component: Documentation
unspecified
All All
: Normal Unknown
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-30 17:43 UTC by Allan Leal
Modified: 2014-06-01 00:10 UTC (History)
3 users (show)



Attachments

Description Allan Leal 2014-05-30 17:43:59 UTC
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;
}
Comment 1 Jitse Niesen 2014-06-01 00:10:55 UTC
Thank you for your report. This should now be fixed (changeset 3d06c6dec4f3 for the dev branch and changeset bf87a7a3bc64 for 3.2).

Note You need to log in before you can comment on or make changes to this bug.