std::pair<DenseTensor<2, Scalar>, double> syten::pseudo_inverse_svd | ( | DenseTensor< 2, Scalar > const & | input | ) |
Takes a row-major input and pseudo-inverts it using a SVD.
Singular values smaller than SYTEN_SMALL_THRESHOLD relative to the largest singular value will be assumed zero. The pseudo-inverse \( G \) of a matrix \( A \) is defined by its property that \( A \cdot G \cdot A = A \). With the pseudo_inverse_svd_cm() function, the average absolute value of the entries of \( A \cdot G \cdot A - A \) is usually smaller than SYTEN_SMALL_THRESHOLD times the ratio of largest to smallest singular value (which is returned as the second element of the pair here).
References pseudo_inverse_svd_cm(), and transpose().