hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_matop_ztfttp (f01vm)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

nag_matop_ztfttp (f01vm) copies a complex triangular matrix, stored in a Rectangular Full Packed (RFP) format array, to a standard packed format array.

Syntax

[ap, info] = f01vm(transr, uplo, n, ar)
[ap, info] = nag_matop_ztfttp(transr, uplo, n, ar)

Description

nag_matop_ztfttp (f01vm) packs a complex n by n triangular matrix A, stored in RFP format, to packed format. This function is intended for possible use in conjunction with functions from Chapters F07 and F16 where some functions that use triangular matrices store them in RFP format. The RFP storage format is described in Rectangular Full Packed (RFP) Storage in the F07 Chapter Introduction and the packed storage format is described in Packed storage in the F07 Chapter Introduction.

References

Gustavson F G, Waśniewski J, Dongarra J J and Langou J (2010) Rectangular full packed format for Cholesky's algorithm: factorization, solution, and inversion ACM Trans. Math. Software 37, 2

Parameters

Compulsory Input Parameters

1:     transr – string (length ≥ 1)
Specifies whether the normal RFP representation of A or its conjugate transpose is stored.
transr='N'
The RFP representation of the matrix A is stored.
transr='C'
The conjugate transpose of the RFP representation of the matrix A is stored.
Constraint: transr='N' or 'C'.
2:     uplo – string (length ≥ 1)
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'.
3:     n int64int32nag_int scalar
n, the order of the matrix A.
Constraint: n0.
4:     arn×n+1/2 – complex array
The upper or lower n by n triangular matrix A (as specified by uplo) in either normal or transposed RFP format (as specified by transr). The storage format is described in Rectangular Full Packed (RFP) Storage in the F07 Chapter Introduction.

Optional Input Parameters

None.

Output Parameters

1:     apn×n+1/2 – complex array
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.
2:     info int64int32nag_int scalar
info=0 unless the function detects an error (see Error Indicators and Warnings).

Error Indicators and Warnings

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

Accuracy

Not applicable.

Further Comments

None.

Example

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


fprintf('f01vm example results\n\n');

transr = 'n';
uplo   = 'u';
n      = int64(4);
ar = [1.3 + 1.3i;
      2.3 + 2.3i;
      3.3 + 3.3i;
      1.1 - 1.1i;
      1.2 - 1.2i;
      1.4 + 1.4i;
      2.4 + 2.4i;
      3.4 + 3.4i;
      4.4 + 4.4i;
      2.2 - 2.2i];
% Print the Rectangular Full Packed array
fprintf('\n');
[ifail] = x04db('g', 'x', ar, 'b', 'f5.2', 'RFP Packed Array ar:', 'i', ...
                'n', int64(80), int64(0));
% Convert to packed vector form
[ap, info] = f01vm(transr, uplo, n, ar);
% Print the packed vector
fprintf('\n');
[ifail] = x04db('g', 'x', ap, 'b', 'f5.2', 'Packed Array ap:', 'i', ...
                'n', int64(80), int64(0));


f01vm example results


 RFP Packed Array ar:
  1  ( 1.30, 1.30)
  2  ( 2.30, 2.30)
  3  ( 3.30, 3.30)
  4  ( 1.10,-1.10)
  5  ( 1.20,-1.20)
  6  ( 1.40, 1.40)
  7  ( 2.40, 2.40)
  8  ( 3.40, 3.40)
  9  ( 4.40, 4.40)
 10  ( 2.20,-2.20)

 Packed Array ap:
  1  ( 1.10, 1.10)
  2  ( 1.20, 1.20)
  3  ( 2.20, 2.20)
  4  ( 1.30, 1.30)
  5  ( 2.30, 2.30)
  6  ( 3.30, 3.30)
  7  ( 1.40, 1.40)
  8  ( 2.40, 2.40)
  9  ( 3.40, 3.40)
 10  ( 4.40, 4.40)

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015