Template Function mcf_polar_decompose

Function Documentation

template<typename T>
void mcf_polar_decompose(const matrix<T> &C, matrix<T> &W, matrix<T> &P)

Right polar decomposition of a p×p matrix: C = W*P, P Hermitian PSD, W unitary (a partial isometry if C is singular).

Used by matrix_continued_fraction::convert_B_format() to move an off-diagonal Lanczos block from upper-triangular (QR) to Hermitian form. P = sqrt(C^H C) is obtained from the eigendecomposition of the Hermitian PSD matrix C^H C; W = C*P^{-1}. Eigenvalues of C^H C below (accur_deflation)^2 are treated as zero (their contribution to P^{-1} is dropped) — this only matters for a rank-deficient C, which in practice only arises for the unused truncation-residual block B[M-1].