1 *> \brief \b DSYSWAPR applies an elementary permutation on the rows and columns of a symmetric matrix.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download DSYSWAPR + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyswapr.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyswapr.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyswapr.f">
21 * SUBROUTINE DSYSWAPR( UPLO, N, A, LDA, I1, I2)
23 * .. Scalar Arguments ..
25 * INTEGER I1, I2, LDA, N
27 * .. Array Arguments ..
28 * DOUBLE PRECISION A( LDA, N )
36 *> DSYSWAPR 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 DOUBLE PRECISION 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 DSYTRF.
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 doubleSYauxiliary
102 * =====================================================================
103 SUBROUTINE DSYSWAPR( 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 DOUBLE PRECISION 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 DSWAP( 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 DSWAP( 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 DSYSWAPR