Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

Chapter Contents
Chapter Introduction
NAG Toolbox

# NAG Toolbox: nag_lapack_zpbstf (f08ut)

## Purpose

nag_lapack_zpbstf (f08ut) computes a split Cholesky factorization of a complex Hermitian positive definite band matrix.

## Syntax

[bb, info] = f08ut(uplo, kb, bb, 'n', n)
[bb, info] = nag_lapack_zpbstf(uplo, kb, bb, 'n', n)

## Description

nag_lapack_zpbstf (f08ut) computes a split Cholesky factorization of a complex Hermitian positive definite band matrix B$B$. It is designed to be used in conjunction with nag_lapack_zhbgst (f08us).
The factorization has the form B = SHS$B={S}^{\mathrm{H}}S$, where S$S$ is a band matrix of the same bandwidth as B$B$ and the following structure: S$S$ is upper triangular in the first (n + k) / 2$\left(n+k\right)/2$ rows, and transposed — hence, lower triangular — in the remaining rows. For example, if n = 9$n=9$ and k = 2$k=2$, then
S =
 s11 s12 s13 s22 s23 s24 s33 s34 s35 s44 s45 s55 s64 s65 s66 s75 s76 s77 s86 s87 s88 s97 s98 s99
.
$S = s11 s12 s13 s22 s23 s24 s33 s34 s35 s44 s45 s55 s64 s65 s66 s75 s76 s77 s86 s87 s88 s97 s98 s99 .$

None.

## Parameters

### Compulsory Input Parameters

1:     uplo – string (length ≥ 1)
Indicates whether the upper or lower triangular part of B$B$ is stored.
uplo = 'U'${\mathbf{uplo}}=\text{'U'}$
The upper triangular part of B$B$ is stored.
uplo = 'L'${\mathbf{uplo}}=\text{'L'}$
The lower triangular part of B$B$ is stored.
Constraint: uplo = 'U'${\mathbf{uplo}}=\text{'U'}$ or 'L'$\text{'L'}$.
2:     kb – int64int32nag_int scalar
If uplo = 'U'${\mathbf{uplo}}=\text{'U'}$, the number of superdiagonals, kb${k}_{b}$, of the matrix B$B$.
If uplo = 'L'${\mathbf{uplo}}=\text{'L'}$, the number of subdiagonals, kb${k}_{b}$, of the matrix B$B$.
Constraint: kb0${\mathbf{kb}}\ge 0$.
3:     bb(ldbb, : $:$) – complex array
The first dimension of the array bb must be at least kb + 1${\mathbf{kb}}+1$
The second dimension of the array must be at least max (1,n)$\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$
The n$n$ by n$n$ Hermitian positive definite band matrix B$B$.
The matrix is stored in rows 1$1$ to kb + 1${k}_{b}+1$, more precisely,
• if uplo = 'U'${\mathbf{uplo}}=\text{'U'}$, the elements of the upper triangle of B$B$ within the band must be stored with element Bij${B}_{ij}$ in bb(kb + 1 + ij,j)​ for ​max (1,jkb)ij${\mathbf{bb}}\left({k}_{b}+1+i-j,j\right)\text{​ for ​}\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,j-{k}_{b}\right)\le i\le j$;
• if uplo = 'L'${\mathbf{uplo}}=\text{'L'}$, the elements of the lower triangle of B$B$ within the band must be stored with element Bij${B}_{ij}$ in bb(1 + ij,j)​ for ​jimin (n,j + kb).${\mathbf{bb}}\left(1+i-j,j\right)\text{​ for ​}j\le i\le \mathrm{min}\phantom{\rule{0.125em}{0ex}}\left(n,j+{k}_{b}\right)\text{.}$

### Optional Input Parameters

1:     n – int64int32nag_int scalar
Default: The first dimension of the array bb and the second dimension of the array bb. (An error is raised if these dimensions are not equal.)
n$n$, the order of the matrix B$B$.
Constraint: n0${\mathbf{n}}\ge 0$.

ldbb

### Output Parameters

1:     bb(ldbb, : $:$) – complex array
The first dimension of the array bb will be kb + 1${\mathbf{kb}}+1$
The second dimension of the array will be max (1,n)$\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$
ldbbkb + 1$\mathit{ldbb}\ge {\mathbf{kb}}+1$.
B$B$ stores the elements of its split Cholesky factor S$S$.
2:     info – int64int32nag_int scalar
info = 0${\mathbf{info}}=0$ unless the function detects an error (see Section [Error Indicators and Warnings]).

## Error Indicators and Warnings

info = i${\mathbf{info}}=-i$
If info = i${\mathbf{info}}=-i$, parameter i$i$ had an illegal value on entry. The parameters are numbered as follows:
1: uplo, 2: n, 3: kb, 4: bb, 5: ldbb, 6: 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.
INFO > 0${\mathbf{INFO}}>0$
If info = i${\mathbf{info}}=i$, the factorization could not be completed, because the updated element b(i,i)$b\left(i,i\right)$ would be the square root of a negative number. Hence B$B$ is not positive definite. This may indicate an error in forming the matrix B$B$.

## Accuracy

The computed factor S$S$ is the exact factor of a perturbed matrix (B + E)$\left(B+E\right)$, where
 |E| ≤ c(k + 1)ε|SH||S|, $|E|≤c(k+1)ε|SH||S|,$
c(k + 1)$c\left(k+1\right)$ is a modest linear function of k + 1$k+1$, and ε$\epsilon$ is the machine precision. It follows that |eij|c(k + 1)ε×sqrt((biibjj))$|{e}_{ij}|\le c\left(k+1\right)\epsilon \sqrt{\left({b}_{ii}{b}_{jj}\right)}$.

The total number of floating point operations is approximately 4n(k + 1)2$4n{\left(k+1\right)}^{2}$, assuming nk$n\gg k$.
A call to nag_lapack_zpbstf (f08ut) may be followed by a call to nag_lapack_zhbgst (f08us) to solve the generalized eigenproblem Az = λBz$Az=\lambda Bz$, where A$A$ and B$B$ are banded and B$B$ is positive definite.
The real analogue of this function is nag_lapack_dpbstf (f08uf).

## Example

```function nag_lapack_zpbstf_example
uplo = 'L';
kb = int64(1);
bb = [complex(9.89),  1.69 + 0i,  2.65 + 0i,  2.17 + 0i;
1.08 + 1.73i,  -0.04 - 0.29i,  -0.33 - 2.24i,  0 + 0i];
[bbOut, info] = nag_lapack_zpbstf(uplo, kb, bb)
```
```

bbOut =

3.1448 + 0.0000i   0.9856 + 0.0000i   0.5362 + 0.0000i   1.4731 + 0.0000i
0.3434 + 0.5501i  -0.0746 - 0.5408i  -0.2240 - 1.5206i   0.0000 + 0.0000i

info =

0

```
```function f08ut_example
uplo = 'L';
kb = int64(1);
bb = [complex(9.89),  1.69 + 0i,  2.65 + 0i,  2.17 + 0i;
1.08 + 1.73i,  -0.04 - 0.29i,  -0.33 - 2.24i,  0 + 0i];
[bbOut, info] = f08ut(uplo, kb, bb)
```
```

bbOut =

3.1448 + 0.0000i   0.9856 + 0.0000i   0.5362 + 0.0000i   1.4731 + 0.0000i
0.3434 + 0.5501i  -0.0746 - 0.5408i  -0.2240 - 1.5206i   0.0000 + 0.0000i

info =

0

```