F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF06UKF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

F06UKF returns, via the function name, the value of the $1$-norm, the $\infty$-norm, the Frobenius norm, or the maximum absolute value of the elements of a complex $n$ by $n$ triangular matrix, stored in packed form.

## 2  Specification

 FUNCTION F06UKF ( NORM, UPLO, DIAG, N, AP, WORK)
 REAL (KIND=nag_wp) F06UKF
 INTEGER N REAL (KIND=nag_wp) WORK(*) COMPLEX (KIND=nag_wp) AP(*) CHARACTER(1) NORM, UPLO, DIAG

None.

None.

## 5  Parameters

1:     NORM – CHARACTER(1)Input
On entry: specifies the value to be returned.
${\mathbf{NORM}}=\text{'1'}$ or $\text{'O'}$
The $1$-norm.
${\mathbf{NORM}}=\text{'I'}$
The $\infty$-norm.
${\mathbf{NORM}}=\text{'F'}$ or $\text{'E'}$
The Frobenius (or Euclidean) norm.
${\mathbf{NORM}}=\text{'M'}$
The value $\underset{i,j}{\mathrm{max}}\phantom{\rule{0.25em}{0ex}}\left|{a}_{ij}\right|$ (not a norm).
Constraint: ${\mathbf{NORM}}=\text{'1'}$, $\text{'O'}$, $\text{'I'}$, $\text{'F'}$, $\text{'E'}$ or $\text{'M'}$.
2:     UPLO – CHARACTER(1)Input
On entry: specifies whether $A$ is upper or lower triangular.
${\mathbf{UPLO}}=\text{'U'}$
$A$ is upper triangular.
${\mathbf{UPLO}}=\text{'L'}$
$A$ is lower triangular.
Constraint: ${\mathbf{UPLO}}=\text{'U'}$ or $\text{'L'}$.
3:     DIAG – CHARACTER(1)Input
On entry: specifies whether $A$ has nonunit or unit diagonal elements.
${\mathbf{DIAG}}=\text{'N'}$
The diagonal elements are stored explicitly.
${\mathbf{DIAG}}=\text{'U'}$
The diagonal elements are assumed to be $1$, and are not referenced.
Constraint: ${\mathbf{DIAG}}=\text{'N'}$ or $\text{'U'}$.
4:     N – INTEGERInput
On entry: $n$, the order of the matrix $A$.
When ${\mathbf{N}}=0$, F06UKF returns zero.
Constraint: ${\mathbf{N}}\ge 0$.
5:     AP($*$) – COMPLEX (KIND=nag_wp) arrayInput
Note: the dimension of the array AP must be at least ${\mathbf{N}}×\left({\mathbf{N}}+1\right)/2$.
On entry: the $n$ by $n$ triangular matrix $A$, packed by columns.
More precisely,
• if ${\mathbf{UPLO}}=\text{'U'}$, the upper triangle of $A$ must be stored with element ${A}_{ij}$ in ${\mathbf{AP}}\left(i+j\left(j-1\right)/2\right)$ for $i\le j$;
• if ${\mathbf{UPLO}}=\text{'L'}$, the lower triangle of $A$ must be stored with element ${A}_{ij}$ in ${\mathbf{AP}}\left(i+\left(2n-j\right)\left(j-1\right)/2\right)$ for $i\ge j$.
If ${\mathbf{DIAG}}=\text{'U'}$, the diagonal elements of $A$ are assumed to be $1$, and are not referenced; the same storage scheme is used whether ${\mathbf{DIAG}}=\text{'N'}$ or ‘U’.
6:     WORK($*$) – REAL (KIND=nag_wp) arrayWorkspace
Note: the dimension of the array WORK must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$ if ${\mathbf{NORM}}=\text{'I'}$, and at least $1$ otherwise.

None.

Not applicable.

None.

None.