3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download ZSYSWAPR + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zsyswapr.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zsyswapr.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zsyswapr.f">
21 * SUBROUTINE ZSYSWAPR( UPLO, N, A, LDA, I1, I2)
23 * .. Scalar Arguments ..
25 * INTEGER I1, I2, LDA, N
27 * .. Array Arguments ..
28 * COMPLEX*16 A( LDA, N )
36 *> ZSYSWAPR applies an elementary permutation on the rows and the columns of
37 *> a symmetric matrix.
45 *> UPLO is CHARACTER*1
46 *> Specifies whether the details of the factorization are stored
47 *> as an upper or lower triangular matrix.
48 *> = 'U': Upper triangular, form is A = U*D*U**T;
49 *> = 'L': Lower triangular, form is A = L*D*L**T.
55 *> The order of the matrix A. N >= 0.
60 *> A is COMPLEX*16 array, dimension (LDA,N)
61 *> On entry, the NB diagonal matrix D and the multipliers
62 *> used to obtain the factor U or L as computed by ZSYTRF.
64 *> On exit, if INFO = 0, the (symmetric) inverse of the original
65 *> matrix. If UPLO = 'U', the upper triangular part of the
66 *> inverse is formed and the part of A below the diagonal is not
67 *> referenced; if UPLO = 'L' the lower triangular part of the
68 *> inverse is formed and the part of A above the diagonal is
75 *> The leading dimension of the array A. LDA >= max(1,N).
81 *> Index of the first row to swap
87 *> Index of the second row to swap
93 *> \author Univ. of Tennessee
94 *> \author Univ. of California Berkeley
95 *> \author Univ. of Colorado Denver
98 *> \date November 2011
100 *> \ingroup complex16SYauxiliary
102 * =====================================================================
103 SUBROUTINE ZSYSWAPR( UPLO, N, A, LDA, I1, I2)
105 * -- LAPACK auxiliary routine (version 3.4.0) --
106 * -- LAPACK is a software package provided by Univ. of Tennessee, --
107 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
110 * .. Scalar Arguments ..
112 INTEGER I1, I2, LDA, N
114 * .. Array Arguments ..
115 COMPLEX*16 A( LDA, N )
117 * =====================================================================
120 * .. Local Scalars ..
125 * .. External Functions ..
129 * .. External Subroutines ..
132 * .. Executable Statements ..
134 UPPER = LSAME( UPLO, 'U' )
139 * - swap column I1 and I2 from I1 to I1-1
140 CALL ZSWAP( I1-1, A(1,I1), 1, A(1,I2), 1 )
143 * - swap A(I1,I1) and A(I2,I2)
144 * - swap row I1 from I1+1 to I2-1 with col I2 from I1+1 to I2-1
151 A(I1,I1+I)=A(I1+I,I2)
156 * - swap row I1 and I2 from I2+1 to N
167 * - swap row I1 and I2 from I1 to I1-1
168 CALL ZSWAP( I1-1, A(I1,1), LDA, A(I2,1), LDA )
171 * - swap A(I1,I1) and A(I2,I2)
172 * - swap col I1 from I1+1 to I2-1 with row I2 from I1+1 to I2-1
179 A(I1+I,I1)=A(I2,I1+I)
184 * - swap col I1 and I2 from I2+1 to N
192 END SUBROUTINE ZSYSWAPR