F01 Chapter Contents
F01 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF01VJF (DTPTTF)

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

F01VJF (DTPTTF) copies a real triangular matrix stored in packed format to Rectangular Full Packed (RFP) format. The RFP storage format is described in Section 3.3.3 in the F07 Chapter Introduction and the packed storage format is described in Section 3.3.2 in the F07 Chapter Introduction.

## 2  Specification

 SUBROUTINE F01VJF ( TRANSR, UPLO, N, AP, ARF, INFO)
 INTEGER N, INFO REAL (KIND=nag_wp) AP(N*(N+1)/2), ARF(N*(N+1)/2) CHARACTER(1) TRANSR, UPLO
The routine may be called by its LAPACK name dtpttf.

## 3  Description

F01VJF (DTPTTF) copies a real $n$ by $n$ triangular matrix, $A$, stored packed format, to RFP format. This routine is intended for possible use in conjunction with routines from Chapters F06 and F07 where some routines that use triangular matrices store them in RFP format.

None.

## 5  Parameters

1:     TRANSR – CHARACTER(1)Input
On entry: specifies whether the RFP representation of $A$ is normal or transposed.
${\mathbf{TRANSR}}=\text{'N'}$
The matrix $A$ is stored in normal RFP format.
${\mathbf{TRANSR}}=\text{'T'}$
The matrix $A$ is stored in transposed RFP format.
Constraint: ${\mathbf{TRANSR}}=\text{'N'}$ or $\text{'T'}$.
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:     N – INTEGERInput
On entry: $n$, the order of the matrix $A$.
Constraint: ${\mathbf{N}}\ge 0$.
4:     AP(${\mathbf{N}}×\left({\mathbf{N}}+1\right)/2$) – REAL (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$.
5:     ARF(${\mathbf{N}}×\left({\mathbf{N}}+1\right)/2$) – REAL (KIND=nag_wp) arrayOutput
On exit: the triangular matrix $A$ in RFP format, as described in Section 3.3.3 in the F07 Chapter Introduction.
6:     INFO – INTEGEROutput
On exit: ${\mathbf{INFO}}=0$ unless the routine detects an error (see Section 6).

## 6  Error Indicators and Warnings

Errors or warnings detected by the routine:
${\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.

None.

## 9  Example

This example reads in a triangular matrix in packed format and copies it to RFP format.

### 9.1  Program Text

Program Text (f01vjfe.f90)

### 9.2  Program Data

Program Data (f01vjfe.d)

### 9.3  Program Results

Program Results (f01vjfe.r)