f03bhf computes the determinant of an symmetric positive definite banded matrix that has been stored in band-symmetric storage. f07hdf must be called first to supply the Cholesky factorized form. The storage (upper or lower triangular) used by f07hdf is relevant as this determines which elements of the stored factorized form are referenced.
The routine may be called by the names f03bhf or nagf_det_real_band_sym.
The determinant of is calculated using the Cholesky factorization , where is an upper triangular band matrix, or , where is a lower triangular band matrix. The determinant of is the product of the squares of the diagonal elements of or .
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag
1: – Character(1)Input
On entry: indicates whether the upper or lower triangular part of was stored and how it was factorized. This should not be altered following a call to f07hdf.
The upper triangular part of was originally stored and was factorized as where is upper triangular.
The lower triangular part of was originally stored and was factorized as where is lower triangular.
2: – IntegerInput
On entry: , the order of the matrix .
3: – IntegerInput
On entry: , the number of superdiagonals or subdiagonals of the matrix .
4: – Real (Kind=nag_wp) arrayInput
Note: the second dimension of the array ab
must be at least
On entry: the Cholesky factor of , as returned by f07hdf.
5: – IntegerInput
On entry: the first dimension of the array ab as declared in the subprogram from which f03bhf is called.
6: – Real (Kind=nag_wp)Output
7: – IntegerOutput
On exit: the determinant of is given by . It is given in this form to avoid overflow or underflow.
8: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, .
Constraint: or .
On entry, .
On entry, .
On entry, and .
The matrix is not positive definite.
An unexpected error has been triggered by this routine. Please
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
The accuracy of the determinant depends on the conditioning of the original matrix. For a detailed error analysis see page 54 of Wilkinson and Reinsch (1971).
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
f03bhf is not threaded in any implementation.
The time taken by f03bhf is approximately proportional to .
This routine should only be used when since as approaches , it becomes less efficient to take advantage of the band form.
This example calculates the determinant of the real symmetric positive definite band matrix