subroutine ell_chol2eig(n, g, u, lam) integer n double precision g(n, n), u(n, n), lam(n) ! g contains the lower Cholesky factor G of the ! n x n PSD matrix A = G * G^T. The eigen-decomposition of A is: ! A = u * lam^2 * u^T. This routine returns u and lam (which are U ! and S in the SVD of G = U S V^T). integer lwork, info double precision work(10*n*n+20*n) lwork = 10*n*n+20*n call dgesvd( 'A', 'N', n, n, g, n, lam, u, n, g, n, work, lwork) ! if( info /= 0 ) then ! write(0,*)'ell_chol2eig: info, lwork = ', info, lwork ! stop ! endif end