hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_lapack_dgbtrf (f07bd)

Purpose

nag_lapack_dgbtrf (f07bd) computes the LULU factorization of a real mm by nn band matrix.

Syntax

[ab, ipiv, info] = f07bd(m, kl, ku, ab, 'n', n)
[ab, ipiv, info] = nag_lapack_dgbtrf(m, kl, ku, ab, 'n', n)

Description

nag_lapack_dgbtrf (f07bd) forms the LULU factorization of a real mm by nn band matrix AA using partial pivoting, with row interchanges. Usually m = nm=n, and then, if AA has klkl nonzero subdiagonals and kuku nonzero superdiagonals, the factorization has the form A = PLUA=PLU, where PP is a permutation matrix, LL is a lower triangular matrix with unit diagonal elements and at most klkl nonzero elements in each column, and UU is an upper triangular band matrix with kl + kukl+ku superdiagonals.
Note that LL is not a band matrix, but the nonzero elements of LL can be stored in the same space as the subdiagonal elements of AA. UU is a band matrix but with klkl additional superdiagonals compared with AA. These additional superdiagonals are created by the row interchanges.

References

Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore

Parameters

Compulsory Input Parameters

1:     m – int64int32nag_int scalar
mm, the number of rows of the matrix AA.
Constraint: m0m0.
2:     kl – int64int32nag_int scalar
klkl, the number of subdiagonals within the band of the matrix AA.
Constraint: kl0kl0.
3:     ku – int64int32nag_int scalar
kuku, the number of superdiagonals within the band of the matrix AA.
Constraint: ku0ku0.
4:     ab(ldab, : :) – double array
The first dimension of the array ab must be at least 2 × kl + ku + 12×kl+ku+1
The second dimension of the array must be at least max (1,n)max(1,n)
The mm by nn matrix AA.
The matrix is stored in rows kl + 1kl+1 to 2kl + ku + 12kl+ku+1; the first klkl rows need not be set, more precisely, the element AijAij must be stored in
ab(kl + ku + 1 + ij,j) = Aij  for ​max (1,jku)imin (m,j + kl).
abkl+ku+1+i-jj=Aij  for ​max(1,j-ku)imin(m,j+kl).
See Section [Further Comments] in (f07ba) for further details.

Optional Input Parameters

1:     n – int64int32nag_int scalar
Default: The second dimension of the array ab.
nn, the number of columns of the matrix AA.
Constraint: n0n0.

Input Parameters Omitted from the MATLAB Interface

ldab

Output Parameters

1:     ab(ldab, : :) – double array
The first dimension of the array ab will be 2 × kl + ku + 12×kl+ku+1
The second dimension of the array will be max (1,n)max(1,n)
ldab2 × kl + ku + 1ldab2×kl+ku+1.
If info0info0, ab stores details of the factorization.
The upper triangular band matrix UU, with kl + kukl+ku superdiagonals, is stored in rows 11 to kl + ku + 1kl+ku+1 of the array, and the multipliers used to form the matrix LL are stored in rows kl + ku + 2kl+ku+2 to 2kl + ku + 12kl+ku+1.
2:     ipiv(min (m,n)min(m,n)) – int64int32nag_int array
The pivot indices that define the permutation matrix. At the iith step, if ipiv(i) > iipivi>i then row ii of the matrix AA was interchanged with row ipiv(i)ipivi, for i = 1,2,,min (m,n)i=1,2,,min(m,n). ipiv(i)iipivii indicates that, at the iith step, a row interchange was not required.
3:     info – int64int32nag_int scalar
info = 0info=0 unless the function detects an error (see Section [Error Indicators and Warnings]).

Error Indicators and Warnings

Cases prefixed with W are classified as warnings and do not generate an error of type NAG:error_n. See nag_issue_warnings.

  info = iinfo=-i
If info = iinfo=-i, parameter ii had an illegal value on entry. The parameters are numbered as follows:
1: m, 2: n, 3: kl, 4: ku, 5: ab, 6: ldab, 7: ipiv, 8: info.
It is possible that info refers to a parameter that is omitted from the MATLAB interface. This usually indicates that an error in one of the other input parameters has caused an incorrect value to be inferred.
W INFO > 0INFO>0
If info = iinfo=i, U(i,i)U(i,i) is exactly zero. The factorization has been completed, but the factor UU is exactly singular, and division by zero will occur if it is used to solve a system of equations.

Accuracy

The computed factors LL and UU are the exact factors of a perturbed matrix A + EA+E, where
|E|c(k)εP|L||U| ,
|E|c(k)εP|L||U| ,
c(k)c(k) is a modest linear function of k = kl + ku + 1k=kl+ku+1, and εε is the machine precision. This assumes kmin (m,n)kmin(m,n).

Further Comments

The total number of floating point operations varies between approximately 2nkl(ku + 1)2nkl(ku+1) and 2nkl(kl + ku + 1)2nkl(kl+ku+1), depending on the interchanges, assuming m = nklm=nkl and nkunku.
A call to nag_lapack_dgbtrf (f07bd) may be followed by calls to the functions:
The complex analogue of this function is nag_lapack_zgbtrf (f07br).

Example

function nag_lapack_dgbtrf_example
m = int64(4);
kl = int64(1);
ku = int64(2);
ab = [0, 0, 0, 0;
     0, 0, -3.66, -2.13;
     0, 2.54, -2.73, 4.07;
     -0.23, 2.46, 2.46, -3.82;
     -6.98, 2.56, -4.78, 0];
[abOut, ipiv, info] = nag_lapack_dgbtrf(m, kl, ku, ab)
 

abOut =

         0         0         0   -2.1300
         0         0   -2.7300    4.0700
         0    2.4600    2.4600   -3.8391
   -6.9800    2.5600   -5.9329   -0.7269
    0.0330    0.9605    0.8057         0


ipiv =

                    2
                    3
                    3
                    4


info =

                    0


function f07bd_example
m = int64(4);
kl = int64(1);
ku = int64(2);
ab = [0, 0, 0, 0;
     0, 0, -3.66, -2.13;
     0, 2.54, -2.73, 4.07;
     -0.23, 2.46, 2.46, -3.82;
     -6.98, 2.56, -4.78, 0];
[abOut, ipiv, info] = f07bd(m, kl, ku, ab)
 

abOut =

         0         0         0   -2.1300
         0         0   -2.7300    4.0700
         0    2.4600    2.4600   -3.8391
   -6.9800    2.5600   -5.9329   -0.7269
    0.0330    0.9605    0.8057         0


ipiv =

                    2
                    3
                    3
                    4


info =

                    0



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013