NAG Library Routine Document

f01vbf  (ztrttp)

 Contents

    1  Purpose
    7  Accuracy

1
Purpose

f01vbf (ztrttp) copies a complex triangular matrix, stored in a full format array, to a packed format array.

2
Specification

Fortran Interface
Subroutine f01vbf ( uplo, n, a, lda, ap, info)
Integer, Intent (In):: n, lda
Integer, Intent (Out):: info
Complex (Kind=nag_wp), Intent (In):: a(lda,*)
Complex (Kind=nag_wp), Intent (Out):: ap(n*(n+1)/2)
Character (1), Intent (In):: uplo
C Header Interface
#include nagmk26.h
void  f01vbf_ ( const char *uplo, const Integer *n, const Complex a[], const Integer *lda, Complex ap[], Integer *info, const Charlen length_uplo)
The routine may be called by its LAPACK name ztrttp.

3
Description

f01vbf (ztrttp) packs a complex n by n triangular matrix A, stored conventionally in a full format array, into an array of length nn+1/2. The matrix is packed by columns. 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.

4
References

None.

5
Arguments

1:     uplo – Character(1)Input
On entry: specifies whether A is upper or lower triangular.
uplo='U'
A is upper triangular.
uplo='L'
A is lower triangular.
Constraint: uplo='U' or 'L'.
2:     n – IntegerInput
On entry: n, the order of the matrix A.
Constraint: n0.
3:     alda* – Complex (Kind=nag_wp) arrayInput
Note: the second dimension of the array a must be at least n.
On entry: the triangular matrix A.
  • If uplo='U', A is upper triangular and the elements of the array below the diagonal are not referenced.
  • If uplo='L', A is lower triangular and the elements of the array above the diagonal are not referenced.
4:     lda – IntegerInput
On entry: the first dimension of the array a as declared in the (sub)program from which f01vbf (ztrttp) is called.
Constraint: ldamax1,n.
5:     apn×n+1/2 – Complex (Kind=nag_wp) arrayOutput
On exit: the n by n triangular matrix A, packed by columns.
More precisely,
  • if uplo='U', the upper triangle of A is stored with element Aij in api+jj-1/2 for ij;
  • if uplo='L', the lower triangle of A is stored with element Aij in api+2n-jj-1/2 for ij.
6:     info – IntegerOutput
On exit: info=0 unless the routine detects an error (see Section 6).

6
Error Indicators and Warnings

info<0
If info=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.

7
Accuracy

Not applicable.

8
Parallelism and Performance

f01vbf (ztrttp) is not threaded in any implementation.

9
Further Comments

None.

10
Example

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

10.1
Program Text

Program Text (f01vbfe.f90)

10.2
Program Data

Program Data (f01vbfe.d)

10.3
Program Results

Program Results (f01vbfe.r)

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