NAG Library Function Document

1Purpose

nag_ztbsv (f16skc) solves a system of equations given as a complex triangular band matrix.

2Specification

 #include #include
 void nag_ztbsv (Nag_OrderType order, Nag_UploType uplo, Nag_TransType trans, Nag_DiagType diag, Integer n, Integer k, Complex alpha, const Complex ab[], Integer pdab, Complex x[], Integer incx, NagError *fail)

3Description

nag_ztbsv (f16skc) performs one of the matrix-vector operations
 $x←αA-1x, x←αA-Tx or x←αA-Hx,$
where $A$ is an $n$ by $n$ complex triangular band matrix with $k$ subdiagonals or superdiagonals, $x$ is an $n$-element complex vector and $\alpha$ is a complex scalar. ${A}^{-\mathrm{T}}$ denotes ${A}^{-\mathrm{T}}$ or equivalently ${A}^{-\mathrm{T}}$; ${A}^{-\mathrm{H}}$ denotes ${\left({A}^{\mathrm{H}}\right)}^{-1}$ or equivalently ${\left({A}^{-1}\right)}^{H}$.
No test for singularity or near-singularity of $A$ is included in this function. Such tests must be performed before calling this function.

4References

Basic Linear Algebra Subprograms Technical (BLAST) Forum (2001) Basic Linear Algebra Subprograms Technical (BLAST) Forum Standard University of Tennessee, Knoxville, Tennessee http://www.netlib.org/blas/blast-forum/blas-report.pdf

5Arguments

1:    $\mathbf{order}$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 ${\mathbf{order}}=\mathrm{Nag_RowMajor}$. See Section 3.3.1.3 in How to Use the NAG Library and its Documentation for a more detailed explanation of the use of this argument.
Constraint: ${\mathbf{order}}=\mathrm{Nag_RowMajor}$ or $\mathrm{Nag_ColMajor}$.
2:    $\mathbf{uplo}$Nag_UploTypeInput
On entry: specifies whether $A$ is upper or lower triangular.
${\mathbf{uplo}}=\mathrm{Nag_Upper}$
$A$ is upper triangular.
${\mathbf{uplo}}=\mathrm{Nag_Lower}$
$A$ is lower triangular.
Constraint: ${\mathbf{uplo}}=\mathrm{Nag_Upper}$ or $\mathrm{Nag_Lower}$.
3:    $\mathbf{trans}$Nag_TransTypeInput
On entry: specifies the operation to be performed.
${\mathbf{trans}}=\mathrm{Nag_NoTrans}$
$x←\alpha {A}^{-1}x$.
${\mathbf{trans}}=\mathrm{Nag_Trans}$
$x←\alpha {A}^{-\mathrm{T}}x$.
${\mathbf{trans}}=\mathrm{Nag_ConjTrans}$
$x←\alpha {A}^{-\mathrm{H}}x$.
Constraint: ${\mathbf{trans}}=\mathrm{Nag_NoTrans}$, $\mathrm{Nag_Trans}$ or $\mathrm{Nag_ConjTrans}$.
4:    $\mathbf{diag}$Nag_DiagTypeInput
On entry: specifies whether $A$ has nonunit or unit diagonal elements.
${\mathbf{diag}}=\mathrm{Nag_NonUnitDiag}$
The diagonal elements are stored explicitly.
${\mathbf{diag}}=\mathrm{Nag_UnitDiag}$
The diagonal elements are assumed to be $1$ and are not referenced.
Constraint: ${\mathbf{diag}}=\mathrm{Nag_NonUnitDiag}$ or $\mathrm{Nag_UnitDiag}$.
5:    $\mathbf{n}$IntegerInput
On entry: $n$, the order of the matrix $A$.
Constraint: ${\mathbf{n}}\ge 0$.
6:    $\mathbf{k}$IntegerInput
On entry: $k$, the number of subdiagonals or superdiagonals of the matrix $A$.
Constraint: ${\mathbf{k}}\ge 0$.
7:    $\mathbf{alpha}$ComplexInput
On entry: the scalar $\alpha$.
8:    $\mathbf{ab}\left[\mathit{dim}\right]$const ComplexInput
Note: the dimension, dim, of the array ab must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{pdab}}×{\mathbf{n}}\right)$.
On entry: the $n$ by $n$ triangular band matrix $A$.
This is stored as a notional two-dimensional array with row elements or column elements stored contiguously. The storage of elements of ${A}_{ij}$, depends on the order and uplo arguments as follows:
• if ${\mathbf{order}}=\mathrm{Nag_ColMajor}$ and ${\mathbf{uplo}}=\mathrm{Nag_Upper}$,
${A}_{ij}$ is stored in ${\mathbf{ab}}\left[k+i-j+\left(j-1\right)×{\mathbf{pdab}}\right]$, for $j=1,\dots ,n$ and $i=\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,j-k\right),\dots ,j$;
• if ${\mathbf{order}}=\mathrm{Nag_ColMajor}$ and ${\mathbf{uplo}}=\mathrm{Nag_Lower}$,
${A}_{ij}$ is stored in ${\mathbf{ab}}\left[i-j+\left(j-1\right)×{\mathbf{pdab}}\right]$, for $j=1,\dots ,n$ and $i=j,\dots ,\mathrm{min}\phantom{\rule{0.125em}{0ex}}\left(n,j+k\right)$;
• if ${\mathbf{order}}=\mathrm{Nag_RowMajor}$ and ${\mathbf{uplo}}=\mathrm{Nag_Upper}$,
${A}_{ij}$ is stored in ${\mathbf{ab}}\left[j-i+\left(i-1\right)×{\mathbf{pdab}}\right]$, for $i=1,\dots ,n$ and $j=i,\dots ,\mathrm{min}\phantom{\rule{0.125em}{0ex}}\left(n,i+k\right)$;
• if ${\mathbf{order}}=\mathrm{Nag_RowMajor}$ and ${\mathbf{uplo}}=\mathrm{Nag_Lower}$,
${A}_{ij}$ is stored in ${\mathbf{ab}}\left[k+j-i+\left(i-1\right)×{\mathbf{pdab}}\right]$, for $i=1,\dots ,n$ and $j=\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,i-k\right),\dots ,i$.
If ${\mathbf{diag}}=\mathrm{Nag_UnitDiag}$, the diagonal elements of $\mathrm{AB}$ are assumed to be $1$, and are not referenced.
9:    $\mathbf{pdab}$IntegerInput
On entry: the stride separating row or column elements (depending on the value of order) of the matrix $A$ in the array ab.
Constraint: ${\mathbf{pdab}}\ge {\mathbf{k}}+1$.
10:  $\mathbf{x}\left[\mathit{dim}\right]$ComplexInput/Output
Note: the dimension, dim, of the array x must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,1+\left({\mathbf{n}}-1\right)\left|{\mathbf{incx}}\right|\right)$.
On entry: the vector $x$.
On exit: the solution vector $x$.
11:  $\mathbf{incx}$IntegerInput
On entry: the increment in the subscripts of x between successive elements of $x$.
Constraint: ${\mathbf{incx}}\ne 0$.
12:  $\mathbf{fail}$NagError *Input/Output
The NAG error argument (see Section 3.7 in How to Use the NAG Library and its Documentation).

6Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 2.3.1.2 in How to Use the NAG Library and its Documentation for further information.
On entry, argument $〈\mathit{\text{value}}〉$ had an illegal value.
NE_INT
On entry, ${\mathbf{incx}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{incx}}\ne 0$.
On entry, ${\mathbf{k}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{k}}\ge 0$.
On entry, ${\mathbf{n}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{n}}\ge 0$.
NE_INT_2
On entry, ${\mathbf{pdab}}=〈\mathit{\text{value}}〉$, ${\mathbf{k}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{pdab}}\ge {\mathbf{k}}+1$.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 2.7.5 in How to Use the NAG Library and its Documentation for further information.

7Accuracy

The BLAS standard requires accurate implementations which avoid unnecessary over/underflow (see Section 2.7 of Basic Linear Algebra Subprograms Technical (BLAST) Forum (2001)).

8Parallelism and Performance

nag_ztbsv (f16skc) is not threaded in any implementation.

None.

10Example

Solves complex triangular banded system of linear equations, $Ax=y$, where $A$ is a complex triangular $4$ by $4$ matrix, with $2$ subdiagonals, given by
 $A = -1.94+4.43i -3.39+3.44i 4.12-4.27i 1.62+3.68i -1.84+5.53i 0.43-2.66i .00i+0.00 -2.77-1.93i 1.74-0.04i 0.44+0.10i$
and
 $y = -8.86-03.88i -15.57-23.41i -7.63+22.78i -14.74-02.40i .$

10.1Program Text

Program Text (f16skce.c)

10.2Program Data

Program Data (f16skce.d)

10.3Program Results

Program Results (f16skce.r)

© The Numerical Algorithms Group Ltd, Oxford, UK. 2017