Copies a triangular matrix from the standard full format (TR) to the standard packed format (TP) .
FORTRAN 77:
call strttp( uplo, n, a, lda, ap, info )
call dtrttp( uplo, n, a, lda, ap, info )
call ctrttp( uplo, n, a, lda, ap, info )
call ztrttp( uplo, n, a, lda, ap, info )
C:
lapack_int LAPACKE_<?>trttp( int matrix_order, char uplo, lapack_int n, const <datatype>* a, lapack_int lda, <datatype>* ap );
The routine copies a triangular matrix A from the standard full format to the standard packed format.
The data types are given for the Fortran interface. A <datatype> placeholder, if present, is used for the C interface data types in the C interface section above. See C Interface Conventions for the C interface principal conventions and type defintions.
CHARACTER*1.
Specifies whether A is upper or lower triangular:
= 'U': A is upper triangular,
= 'L': A is lower triangular.
INTEGER. The order of the matrices a and ap. n ≥ 0.
REAL for strttp,
DOUBLE PRECISION for dtrttp,
COMPLEX for ctrttp,
DOUBLE COMPLEX for ztrttp.
Array, DIMENSION (lda, n).
On entry, the triangular matrix A. If uplo = 'U', the leading n-by-n upper triangular part of the array a contains the upper triangular matrix, and the strictly lower triangular part of a is not referenced. If uplo = 'L', the leading n-by-n lower triangular part of the array a contains the lower triangular matrix, and the strictly upper triangular part of a is not referenced.
INTEGER. The leading dimension of the array a. lda ≥ max(1,n).
REAL for strttp,
DOUBLE PRECISION for dtrttp,
COMPLEX for ctrttp,
DOUBLE COMPLEX for ztrttp.
Array, DIMENSION at least max (1, n*(n+1)/2).
On exit, the upper or lower triangular matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array ap as follows:
if uplo = 'U', ap(i + (j-1)*j/2) = A(i,j) for 1 ≤ i ≤ j,
if uplo = 'L', ap(i + (j-1)*(2n-j)/2) = A(i,j) for j ≤ i ≤ n.
INTEGER.
=0: successful exit,
< 0: if info = -i, the i-th parameter had an illegal value.