Rename inverse -> pseudoInverse.

This commit is contained in:
Rasmus Munk Larsen 2016-02-10 13:03:07 -08:00
parent bb8811c655
commit b6fdf7468c
2 changed files with 3 additions and 3 deletions

View File

@ -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);
} }

View File

@ -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);
} }