f03bfc computes the determinant of a real symmetric positive definite matrix . f07fdc must be called first to supply the symmetric matrix in Cholesky factorized form. The storage (upper or lower triangular) used by f07fdc is not relevant to f03bfc since only the diagonal elements of the factorized are referenced.
The function may be called by the names: f03bfc or nag_det_real_sym.
f03bfc computes the determinant of a real symmetric positive definite matrix that has been factorized as , where is upper triangular, or , where is lower triangular. The determinant is the product of the squares of the diagonal elements of or . The Cholesky factorized form of the matrix must be supplied; this is returned by a call to f07fdc.
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag
1: – Nag_OrderTypeInput
On entry: the order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by . See Section 3.1.3 in the Introduction to the NAG Library CL Interface for a more detailed explanation of the use of this argument.
2: – IntegerInput
On entry: , the order of the matrix .
3: – const doubleInput
Note: the dimension, dim, of the array a
must be at least
the th element of the Cholesky factorization of the matrix is stored in
On entry: the lower or upper triangle of the Cholesky factorized form of the positive definite symmetric matrix . Only the diagonal elements are referenced.
4: – IntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array a.
5: – double *Output
6: – Integer *Output
On exit: the determinant of is given by . It is given in this form to avoid overflow or underflow.
7: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
On entry, argument had an illegal value.
On entry, .
On entry, and .
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
The matrix is not positive definite.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
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).
8Parallelism and Performance
f03bfc is not threaded in any implementation.
The time taken by f03bfc is approximately proportional to .
This example computes a Cholesky factorization and calculates the determinant of the real symmetric positive definite matrix