std::pair< DenseTensor< 2, Scalar >, typename ScalarBase< Scalar >::type > syten::pseudo_inverse_svd_cm | ( | DenseTensor< 2, Scalar > && | input_cm | ) |
Takes a column-major input and pseudo-inverts it using a SVD.
Inverted singular values are broadened as \( \frac{s_i}{s_i^2 + \varepsilon} \) where \( \varepsilon \) is the largest singular value multiplied by SYTEN_SMALL_THRESHOLD.
The pseudo-inverse \( G \) of a matrix \( A \) is defined by its property that \( A \cdot G \cdot A = A \).
References std::move(), overThreshold(), syten::STensorImpl::svd(), and SYTEN_SMALL_THRESHOLD.
Referenced by orthogonalise_solve_svd(), and pseudo_inverse_svd().