diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2016-02-09 20:35:20 -0800 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2016-02-09 20:35:20 -0800 |
commit | bb8811c6555cd62cff333bce3927b3b647a8c5ea (patch) | |
tree | 75412fc965bccfd0ee92b73d7ffb232d1538ef12 /test | |
parent | 53f60e0afca01d9e07fd1c44d163369ae36009ca (diff) |
Enable inverse() method for computing pseudo-inverse.
Diffstat (limited to 'test')
-rw-r--r-- | test/qr_colpivoting.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/qr_colpivoting.cpp b/test/qr_colpivoting.cpp index 16f80d8b5..d8672ce33 100644 --- a/test/qr_colpivoting.cpp +++ b/test/qr_colpivoting.cpp @@ -57,6 +57,9 @@ void cod() { JacobiSVD<MatrixType> svd(matrix, ComputeThinU | ComputeThinV); MatrixType svd_solution = svd.solve(rhs); VERIFY_IS_APPROX(cod_solution, svd_solution); + + MatrixType pinv = cod.inverse(); + VERIFY_IS_APPROX(cod_solution, pinv * rhs); } template <typename MatrixType, int Cols2> |