NAG Library Function Document
nag_det_real_band_sym (f03bhc) computes the determinant of a
symmetric positive definite banded matrix
that has been stored in band-symmetric storage. nag_dpbtrf (f07hdc)
must be called first to supply the Cholesky factorized form. The storage (upper or lower triangular) used by nag_dpbtrf (f07hdc)
is relevant as this determines which elements of the stored factorized form are referenced.
||nag_det_real_band_sym (Nag_OrderType order,
const double ab,
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
order – Nag_OrderTypeInput
: 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 188.8.131.52
in the Essential Introduction for a more detailed explanation of the use of this argument.
uplo – Nag_UploTypeInput
: 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 nag_dpbtrf (f07hdc)
- 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.
n – IntegerInput
On entry: , the order of the matrix .
kd – IntegerInput
On entry: , the number of superdiagonals or subdiagonals of the matrix .
ab – const doubleInput
the dimension, dim
, of the array ab
must be at least
: the Cholesky factor of
, as returned by nag_dpbtrf (f07hdc)
pdab – IntegerInput
: the stride separating row or column elements (depending on the value of order
) of the matrix in the array
d – double *Output
id – 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, argument had an illegal value.
On entry, .
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
The matrix is not positive definite.
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)
8 Parallelism and Performance
The time taken by nag_det_real_band_sym (f03bhc) is approximately proportional to .
This function 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
10.1 Program Text
Program Text (f03bhce.c)
10.2 Program Data
Program Data (f03bhce.d)
10.3 Program Results
Program Results (f03bhce.r)