mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Enable inverse() method for computing pseudo-inverse.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user