NAG Library Function Document
nag_real_cholesky (f03aec) computes a Cholesky factorization of a real symmetric positive definite matrix, and evaluates the determinant.
||nag_real_cholesky (Integer n,
nag_real_cholesky (f03aec) computes the Cholesky factorization of a real symmetric positive definite matrix where is lower triangular. The determinant is the product of the squares of the diagonal elements of .
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag
n – IntegerInput
On entry: , the order of the matrix .
a – doubleInput/Output
Note: the th element of the matrix is stored in .
On entry: the upper triangle of the by positive definite symmetric matrix . The elements of the array below the diagonal need not be set.
On exit: the sub-diagonal elements of the lower triangular matrix . The upper triangle of is unchanged.
tda – IntegerInput
: the stride separating matrix column elements in the array a
p[n] – doubleOutput
On exit: the reciprocals of the diagonal elements of .
detf – double *Output
dete – Integer *Output
On exit: the determinant of is given by . It is given in this form to avoid overflow or underflow.
fail – NagError *Input/Output
The NAG error argument (see Section 3.6
in the Essential Introduction).
6 Error Indicators and Warnings
On entry, while . These arguments must satisfy .
On entry, .
The matrix is not positive definite, possibly due to rounding errors. The factorization could not be completed. detf
are set to zero.
The accuracy of the determinant depends on the conditioning of the original matrix. For a detailed error analysis see page 25 of Wilkinson and Reinsch (1971)
8 Parallelism and Performance
The time taken by nag_real_cholesky (f03aec) is approximately proportional to .
To compute a Cholesky factorization and calculate the determinant of the real symmetric positive definite matrix
10.1 Program Text
Program Text (f03aece.c)
10.2 Program Data
Program Data (f03aece.d)
10.3 Program Results
Program Results (f03aece.r)