1 *> \brief \b ZHESWAPR applies an elementary permutation on the rows and columns of a Hermitian matrix.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download ZHESWAPR + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zheswapr.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zheswapr.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zheswapr.f">
21 * SUBROUTINE ZHESWAPR( 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 *> ZHESWAPR applies an elementary permutation on the rows and the columns of
37 *> a hermitian 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 CSYTRF.
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 September 2012
100 *> \ingroup complex16HEauxiliary
102 * =====================================================================
103 SUBROUTINE ZHESWAPR( UPLO, N, A, LDA, I1, I2)
105 * -- LAPACK auxiliary routine (version 3.4.2) --
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
145 * - swap A(I2,I1) and A(I1,I2)
153 A(I1,I1+I)=DCONJG(A(I1+I,I2))
154 A(I1+I,I2)=DCONJG(TMP)
157 A(I1,I2)=DCONJG(A(I1,I2))
161 * - swap row I1 and I2 from I2+1 to N
172 * - swap row I1 and I2 from 1 to I1-1
173 CALL ZSWAP ( I1-1, A(I1,1), LDA, A(I2,1), LDA )
176 * - swap A(I1,I1) and A(I2,I2)
177 * - swap col I1 from I1+1 to I2-1 with row I2 from I1+1 to I2-1
178 * - swap A(I2,I1) and A(I1,I2)
186 A(I1+I,I1)=DCONJG(A(I2,I1+I))
187 A(I2,I1+I)=DCONJG(TMP)
190 A(I2,I1)=DCONJG(A(I2,I1))
193 * - swap col I1 and I2 from I2+1 to N
202 END SUBROUTINE ZHESWAPR