F01 Chapter Contents
F01 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF01VDF (ZTPTTR)

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

F01VDF (ZTPTTR) unpacks a complex triangular matrix, stored in a standard packed format array, to a full format array.

## 2  Specification

 SUBROUTINE F01VDF ( UPLO, N, AP, A, LDA, INFO)
 INTEGER N, LDA, INFO COMPLEX (KIND=nag_wp) AP(N*(N+1)/2), A(LDA,*) CHARACTER(1) UPLO
The routine may be called by its LAPACK name ztpttr.

## 3  Description

F01VDF (ZTPTTR) unpacks a complex $n$ by $n$ triangular matrix $A$, stored in an array of length $n\left(n+1\right)/2$, to conventional storage in a full format array. This routine is intended for possible use in conjunction with routines from Chapters F06, F07, F08 and F16 where some routines use triangular matrices stored in the packed form. Packed storage format is described in Section 3.3.2 in the F07 Chapter Introduction.

None.

## 5  Parameters

1:     $\mathrm{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'}$.
2:     $\mathrm{N}$ – INTEGERInput
On entry: $n$, the order of the matrix $A$.
Constraint: ${\mathbf{N}}\ge 0$.
3:     $\mathrm{AP}\left({\mathbf{N}}×\left({\mathbf{N}}+1\right)/2\right)$ – COMPLEX (KIND=nag_wp) arrayInput
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$.
4:     $\mathrm{A}\left({\mathbf{LDA}},*\right)$ – COMPLEX (KIND=nag_wp) arrayOutput
Note: the second dimension of the array A must be at least ${\mathbf{N}}$.
On exit: the triangular matrix $A$.
• If ${\mathbf{UPLO}}=\text{'U'}$, $A$ is upper triangular and the elements of the array below the diagonal are not referenced.
• If ${\mathbf{UPLO}}=\text{'L'}$, $A$ is lower triangular and the elements of the array above the diagonal are not referenced.
5:     $\mathrm{LDA}$ – INTEGERInput
On entry: the first dimension of the array A as declared in the (sub)program from which F01VDF (ZTPTTR) is called.
Constraint: ${\mathbf{LDA}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.
6:     $\mathrm{INFO}$ – INTEGEROutput
On exit: ${\mathbf{INFO}}=0$ unless the routine detects an error (see Section 6).

## 6  Error Indicators and Warnings

${\mathbf{INFO}}<0$
If ${\mathbf{INFO}}=-i$, argument $i$ had an illegal value. An explanatory message is output, and execution of the program is terminated.

Not applicable.

Not applicable.

None.

## 10  Example

This example reads in a triangular matrix packed by columns and unpacks it to full format.

### 10.1  Program Text

Program Text (f01vdfe.f90)

### 10.2  Program Data

Program Data (f01vdfe.d)

### 10.3  Program Results

Program Results (f01vdfe.r)