Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ generalized_inverse() [1/2]

template<typename EigMat , require_eigen_t< EigMat > * = nullptr, require_not_vt_var< EigMat > * = nullptr>
Eigen::Matrix< value_type_t< EigMat >, EigMat::ColsAtCompileTime, EigMat::RowsAtCompileTime > stan::math::generalized_inverse ( const EigMat &  G)
inline

Returns the Moore-Penrose generalized inverse of the specified matrix.

The method is based on the Cholesky computation of the transform as specified in

  • Courrieu, Pierre. 2008. Fast Computation of Moore-Penrose Inverse Matrices. arXiv 0804.4809
Template Parameters
EigMattype of the matrix (must be derived from Eigen::MatrixBase)
Parameters
Gspecified matrix
Returns
Generalized inverse of the matrix (an empty matrix if the specified matrix has size zero).

Definition at line 33 of file generalized_inverse.hpp.