mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Rename inverse -> pseudoInverse.
This commit is contained in:
@@ -249,10 +249,10 @@ class CompleteOrthogonalDecomposition {
|
||||
|
||||
/** \returns the pseudo-inverse of the matrix of which *this is the complete
|
||||
* orthogonal decomposition.
|
||||
* \warning: Do not compute \c this->inverse()*rhs to solve a linear systems.
|
||||
* \warning: Do not compute \c this->pseudoInverse()*rhs to solve a linear systems.
|
||||
* It is more efficient and numerically stable to call \c this->solve(rhs).
|
||||
*/
|
||||
inline const Inverse<CompleteOrthogonalDecomposition> inverse() const
|
||||
inline const Inverse<CompleteOrthogonalDecomposition> pseudoInverse() const
|
||||
{
|
||||
return Inverse<CompleteOrthogonalDecomposition>(*this);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ void cod() {
|
||||
MatrixType svd_solution = svd.solve(rhs);
|
||||
VERIFY_IS_APPROX(cod_solution, svd_solution);
|
||||
|
||||
MatrixType pinv = cod.inverse();
|
||||
MatrixType pinv = cod.pseudoInverse();
|
||||
VERIFY_IS_APPROX(cod_solution, pinv * rhs);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user