Function SV_decomp_mod (o2scl_linalg)

O2scl : Function List

template<class mat_t, class mat2_t, class mat3_t, class vec_t, class vec2_t>
void o2scl_linalg::SV_decomp_mod(size_t M, size_t N, mat_t &A, mat2_t &X, mat3_t &V, vec_t &S, vec2_t &work)

SV decomposition by the modified Golub-Reinsch algorithm which is better for \( M \gg N \).

This factors matrix A of size (M,N) into

\[ A = U~D~V^T \]
where U is a column-orthogonal matrix of size (M,N) (stored in A), D is a diagonal matrix of size (N,N) (stored in the vector S of size N), and V is a orthogonal matrix of size (N,N). The vector work is a workspace vector of size N and the matrix X is a workspace of size (N,N).