1 *> \brief \b CLAPMT performs a forward or backward permutation of the columns of a matrix.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download CLAPMT + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clapmt.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clapmt.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clapmt.f">
21 * SUBROUTINE CLAPMT( FORWRD, M, N, X, LDX, K )
23 * .. Scalar Arguments ..
27 * .. Array Arguments ..
38 *> CLAPMT rearranges the columns of the M by N matrix X as specified
39 *> by the permutation K(1),K(2),...,K(N) of the integers 1,...,N.
40 *> If FORWRD = .TRUE., forward permutation:
42 *> X(*,K(J)) is moved X(*,J) for J = 1,2,...,N.
44 *> If FORWRD = .FALSE., backward permutation:
46 *> X(*,J) is moved to X(*,K(J)) for J = 1,2,...,N.
55 *> = .TRUE., forward permutation
56 *> = .FALSE., backward permutation
62 *> The number of rows of the matrix X. M >= 0.
68 *> The number of columns of the matrix X. N >= 0.
73 *> X is COMPLEX array, dimension (LDX,N)
74 *> On entry, the M by N matrix X.
75 *> On exit, X contains the permuted matrix X.
81 *> The leading dimension of the array X, LDX >= MAX(1,M).
86 *> K is INTEGER array, dimension (N)
87 *> On entry, K contains the permutation vector. K is used as
88 *> internal workspace, but reset to its original value on
95 *> \author Univ. of Tennessee
96 *> \author Univ. of California Berkeley
97 *> \author Univ. of Colorado Denver
100 *> \date September 2012
102 *> \ingroup complexOTHERauxiliary
104 * =====================================================================
105 SUBROUTINE CLAPMT( FORWRD, M, N, X, LDX, K )
107 * -- LAPACK auxiliary routine (version 3.4.2) --
108 * -- LAPACK is a software package provided by Univ. of Tennessee, --
109 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
112 * .. Scalar Arguments ..
116 * .. Array Arguments ..
121 * =====================================================================
123 * .. Local Scalars ..
127 * .. Executable Statements ..
138 * Forward permutation
155 X( II, J ) = X( II, IN )
170 * Backward permutation
185 X( II, I ) = X( II, J )