1
SUBROUTINE DLAPMT( FORWRD, M, N, X, LDX, K )
3
* -- LAPACK auxiliary routine (version 2.0) --
4
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
5
* Courant Institute, Argonne National Lab, and Rice University
8
* .. Scalar Arguments ..
12
* .. Array Arguments ..
14
DOUBLE PRECISION X( LDX, * )
20
* DLAPMT rearranges the columns of the M by N matrix X as specified
21
* by the permutation K(1),K(2),...,K(N) of the integers 1,...,N.
22
* If FORWRD = .TRUE., forward permutation:
24
* X(*,K(J)) is moved X(*,J) for J = 1,2,...,N.
26
* If FORWRD = .FALSE., backward permutation:
28
* X(*,J) is moved to X(*,K(J)) for J = 1,2,...,N.
33
* FORWRD (input) LOGICAL
34
* = .TRUE., forward permutation
35
* = .FALSE., backward permutation
38
* The number of rows of the matrix X. M >= 0.
41
* The number of columns of the matrix X. N >= 0.
43
* X (input/output) DOUBLE PRECISION array, dimension (LDX,N)
44
* On entry, the M by N matrix X.
45
* On exit, X contains the permuted matrix X.
48
* The leading dimension of the array X, LDX >= MAX(1,M).
50
* K (input) INTEGER array, dimension (N)
51
* On entry, K contains the permutation vector.
53
* =====================================================================
59
* .. Executable Statements ..
87
X( II, J ) = X( II, IN )
102
* Backward permutation
117
X( II, I ) = X( II, J )