1STFTTP(1)LAPACK routine (version 3.2) STFTTP(1)
2
3
4
6 STFTTP - copies a triangular matrix A from rectangular full packed for‐
7 mat (TF) to standard packed format (TP)
8
10 SUBROUTINE STFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
11
12 CHARACTER TRANSR, UPLO
13
14 INTEGER INFO, N
15
16 REAL AP( 0: * ), ARF( 0: * )
17
19 STFTTP copies a triangular matrix A from rectangular full packed format
20 (TF) to standard packed format (TP).
21
23 TRANSR (input) CHARACTER
24 = 'N': ARF is in Normal format;
25 = 'T': ARF is in Transpose format;
26
27 UPLO (input) CHARACTER
28 = 'U': A is upper triangular;
29 = 'L': A is lower triangular.
30
31 N (input) INTEGER
32 The order of the matrix A. N >= 0.
33
34 ARF (input) REAL array, dimension ( N*(N+1)/2 ),
35 On entry, the upper or lower triangular matrix A stored in RFP
36 format. For a further discussion see Notes below.
37
38 AP (output) REAL array, dimension ( N*(N+1)/2 ),
39 On exit, the upper or lower triangular matrix A, packed column‐
40 wise in a linear array. The j-th column of A is stored in the
41 array AP as follows: if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j)
42 for 1<=i<=j; if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for
43 j<=i<=n.
44
45 INFO (output) INTEGER
46 = 0: successful exit
47 < 0: if INFO = -i, the i-th argument had an illegal value
48
50 We first consider Rectangular Full Packed (RFP) Format when N is even.
51 We give an example where N = 6.
52 AP is Upper AP is Lower
53 00 01 02 03 04 05 00
54 11 12 13 14 15 10 11
55 22 23 24 25 20 21 22
56 33 34 35 30 31 32 33
57 44 45 40 41 42 43 44
58 55 50 51 52 53 54 55
59 Let TRANSR = 'N'. RFP holds AP as follows:
60 For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
61 three columns of AP upper. The lower triangle A(4:6,0:2) consists of
62 the transpose of the first three columns of AP upper.
63 For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
64 three columns of AP lower. The upper triangle A(0:2,0:2) consists of
65 the transpose of the last three columns of AP lower.
66 This covers the case N even and TRANSR = 'N'.
67 RFP A RFP A
68 03 04 05 33 43 53
69 13 14 15 00 44 54
70 23 24 25 10 11 55
71 33 34 35 20 21 22
72 00 44 45 30 31 32
73 01 11 55 40 41 42
74 02 12 22 50 51 52
75 Now let TRANSR = 'T'. RFP A in both UPLO cases is just the transpose of
76 RFP A above. One therefore gets:
77 RFP A RFP A
78 03 13 23 33 00 01 02 33 00 10 20 30 40 50
79 04 14 24 34 44 11 12 43 44 11 21 31 41 51
80 05 15 25 35 45 55 22 53 54 55 22 32 42 52
81 We first consider Rectangular Full Packed (RFP) Format when N is odd.
82 We give an example where N = 5.
83 AP is Upper AP is Lower
84 00 01 02 03 04 00
85 11 12 13 14 10 11
86 22 23 24 20 21 22
87 33 34 30 31 32 33
88 44 40 41 42 43 44
89 Let TRANSR = 'N'. RFP holds AP as follows:
90 For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
91 three columns of AP upper. The lower triangle A(3:4,0:1) consists of
92 the transpose of the first two columns of AP upper.
93 For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
94 three columns of AP lower. The upper triangle A(0:1,1:2) consists of
95 the transpose of the last two columns of AP lower.
96 This covers the case N odd and TRANSR = 'N'.
97 RFP A RFP A
98 02 03 04 00 33 43
99 12 13 14 10 11 44
100 22 23 24 20 21 22
101 00 33 34 30 31 32
102 01 11 44 40 41 42
103 Now let TRANSR = 'T'. RFP A in both UPLO cases is just the transpose of
104 RFP A above. One therefore gets:
105 RFP A RFP A
106 02 12 22 00 01 00 10 20 30 40 50
107 03 13 23 33 11 33 11 21 31 41 51
108 04 14 24 34 44 43 44 22 32 42 52
109
110
111
112 LAPACK routine (version 3.2) November 2008 STFTTP(1)