|
NAG[f03aec] NAG[nag_real_cholesky] - factorization and determinant of real symmetric positive-definite matrix
|
|
Calling Sequence
f03aec(a, p, detf, dete, 'n'=n, 'tda'=tda, 'fail'=fail)
nag_real_cholesky(. . .)
Parameters
|
a - Matrix(1..n, 1..tda, datatype=float[8], order=C_order);
|
|
|
On exit: the sub-diagonal elements of the lower triangular matrix . The upper triangle of is unchanged.
|
|
|
p - Vector(1..n, datatype=float[8]);
|
|
|
On exit: the reciprocals of the diagonal elements of .
|
|
|
detf - assignable;
dete - assignable;
|
|
|
Note: On exit the variable detf will have a value of type float, dete will have a value of type integer.
|
|
On exit: the determinant of is given by . It is given in this form to avoid overflow or underflow.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the first dimension of the arrays a, p and the second dimension of the arrays a, pthe array a.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'tda'=tda - integer; (optional)
|
|
|
On entry: the second dimension of the array a as declared in the function from which nag_real_cholesky (f03aec) is called.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_real_cholesky (f03aec) computes a Cholesky factorization of a real symmetric positive-definite matrix, and evaluates the determinant.
|
|
Description
|
|
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 .
|
|
Error Indicators and Warnings
|
|
"NE_INT_ARG_LT"
On entry, n must not be less than 1: .
"NE_NOT_POS_DEF"
The matrix is not positive-definite, possibly due to rounding errors. The factorization could not be completed. detf and dete are set to zero.
|
|
Accuracy
|
|
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).
|
|
Further Comments
|
|
The time taken by nag_real_cholesky (f03aec) is approximately proportional to .
|
|
|
Examples
|
|
>
|
n := 4:
tda := 4:
a := Matrix([[6, 7, 6, 5], [7, 11, 8, 7], [6, 8, 11, 9], [5, 7, 9, 11]], datatype=float[8], order='C_order'):
p := Vector(4, datatype=float[8]):
NAG:-f03aec(a, p, detf, dete, 'n' = n, 'tda' = tda):
|
|
|