NAG Library Routine Document
f01vaf (dtrttp) copies a real triangular matrix, stored in a full format array, to a standard packed format array.
|Integer, Intent (In)||:: ||n, lda|
|Integer, Intent (Out)||:: ||info|
|Real (Kind=nag_wp), Intent (In)||:: ||a(lda,*)|
|Real (Kind=nag_wp), Intent (Out)||:: ||ap(n*(n+1)/2)|
|Character (1), Intent (In)||:: ||uplo|C Header Interface
f01vaf_ (const char *uplo, const Integer *n, const double a, const Integer *lda, double ap, Integer *info, const Charlen length_uplo)|
The routine may be called by its
packs a real
, stored conventionally in a full format array, into an array of length
. The matrix is packed by columns. This routine is intended for possible use in conjunction with routines from Chapters F06
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.
- 1: – Character(1)Input
: specifies whether
is upper or lower triangular.
- is upper triangular.
- is lower triangular.
- 2: – IntegerInput
On entry: , the order of the matrix .
- 3: – Real (Kind=nag_wp) arrayInput
the second dimension of the array a
must be at least
: the triangular matrix
- If , is upper triangular and the elements of the array below the diagonal are not referenced.
- If , is lower triangular and the elements of the array above the diagonal are not referenced.
- 4: – IntegerInput
: the first dimension of the array a
as declared in the (sub)program from which f01vaf (dtrttp)
- 5: – Real (Kind=nag_wp) arrayOutput
, packed by columns.
- if , the upper triangle of is stored with element in for ;
- if , the lower triangle of is stored with element in for .
- 6: – IntegerOutput
unless the routine detects an error (see Section 6
Error Indicators and Warnings
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
Parallelism and Performance
f01vaf (dtrttp) is not threaded in any implementation.
This example reads in a triangular matrix and copies it to packed format.
Program Text (f01vafe.f90)
Program Data (f01vafe.d)
Program Results (f01vafe.r)