1CTPTRI(1) LAPACK routine (version 3.2) CTPTRI(1)
2
3
4
6 CTPTRI - computes the inverse of a complex upper or lower triangular
7 matrix A stored in packed format
8
10 SUBROUTINE CTPTRI( UPLO, DIAG, N, AP, INFO )
11
12 CHARACTER DIAG, UPLO
13
14 INTEGER INFO, N
15
16 COMPLEX AP( * )
17
19 CTPTRI computes the inverse of a complex upper or lower triangular
20 matrix A stored in packed format.
21
23 UPLO (input) CHARACTER*1
24 = 'U': A is upper triangular;
25 = 'L': A is lower triangular.
26
27 DIAG (input) CHARACTER*1
28 = 'N': A is non-unit triangular;
29 = 'U': A is unit triangular.
30
31 N (input) INTEGER
32 The order of the matrix A. N >= 0.
33
34 AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
35 On entry, the upper or lower triangular matrix A, stored colum‐
36 nwise in a linear array. The j-th column of A is stored in the
37 array AP as follows: if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j)
38 for 1<=i<=j; if UPLO = 'L', AP(i + (j-1)*((2*n-j)/2) = A(i,j)
39 for j<=i<=n. See below for further details. On exit, the
40 (triangular) inverse of the original matrix, in the same packed
41 storage format.
42
43 INFO (output) INTEGER
44 = 0: successful exit
45 < 0: if INFO = -i, the i-th argument had an illegal value
46 > 0: if INFO = i, A(i,i) is exactly zero. The triangular
47 matrix is singular and its inverse can not be computed.
48
50 A triangular matrix A can be transferred to packed storage using one of
51 the following program segments:
52 UPLO = 'U': UPLO = 'L':
53 JC = 1 JC = 1
54 DO 2 J = 1, N DO 2 J = 1, N
55 DO 1 I = 1, J DO 1 I = J, N
56 AP(JC+I-1) = A(I,J) AP(JC+I-J) = A(I,J)
57 1 CONTINUE 1 CONTINUE
58 JC = JC + J JC = JC + N - J + 1
59 2 CONTINUE 2 CONTINUE
60
61
62
63 LAPACK routine (version 3.2) November 2008 CTPTRI(1)