mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +08:00
Rename inverse -> pseudoInverse.
This commit is contained in:
parent
bb8811c655
commit
b6fdf7468c
@ -249,10 +249,10 @@ class CompleteOrthogonalDecomposition {
|
|||||||
|
|
||||||
/** \returns the pseudo-inverse of the matrix of which *this is the complete
|
/** \returns the pseudo-inverse of the matrix of which *this is the complete
|
||||||
* orthogonal decomposition.
|
* 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).
|
* 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);
|
return Inverse<CompleteOrthogonalDecomposition>(*this);
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ void cod() {
|
|||||||
MatrixType svd_solution = svd.solve(rhs);
|
MatrixType svd_solution = svd.solve(rhs);
|
||||||
VERIFY_IS_APPROX(cod_solution, svd_solution);
|
VERIFY_IS_APPROX(cod_solution, svd_solution);
|
||||||
|
|
||||||
MatrixType pinv = cod.inverse();
|
MatrixType pinv = cod.pseudoInverse();
|
||||||
VERIFY_IS_APPROX(cod_solution, pinv * rhs);
|
VERIFY_IS_APPROX(cod_solution, pinv * rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user