Given a positive-definite symmetric n by n array A, the CHOLDC procedure constructs its Cholesky decomposition A = LLT , where L is a lower triangular array and LT is the transpose of L.

CHOLDC is based on the routine choldc described in section 2.9 of Numerical Recipes in C: The Art of Scientific Computing (Second Edition), published by Cambridge University Press, and is used by permission.

Note: If you are working with complex inputs, use the LA_CHOLDC procedure instead.

Examples


See CHOLSOL.

Syntax


CHOLDC, A, P [, /DOUBLE]

Arguments


A

An n by n array. On input, only the upper triangle of A need be given. On output, L is returned in the lower triangle of A, except for the diagonal elements, which are returned in the vector P.

Note: If CHOLDC is complex then only the real part is used for the computation.

P

An n-element vector containing the diagonal elements of L.

Keywords


DOUBLE

Set this keyword to force the computation to be done in double-precision arithmetic.

Version History


4.0

Introduced

See Also


CHOLSOL, LA_CHOLDC