Performs a forward or backward permutation of the columns of a matrix.
call slapmt( forwrd, m, n, x, ldx, k )
call dlapmt( forwrd, m, n, x, ldx, k )
call clapmt( forwrd, m, n, x, ldx, k )
call zlapmt( forwrd, m, n, x, ldx, k )
The routine ?lapmt rearranges the columns of the m-by-n matrix X as specified by the permutation k(1),k(2),...,k(n) of the integers 1,...,n.
If forwrd = .TRUE., forward permutation:
X(*,k(j)) is moved to X(*,j) for j=1,2,...,n.
If forwrd = .FALSE., backward permutation:
X(*,j) is moved to X(*,k(j)) for j = 1,2,...,n.
LOGICAL.
If forwrd = .TRUE., forward permutation
If forwrd = .FALSE., backward permutation
INTEGER. The number of rows of the matrix X. m ≥ 0.
INTEGER. The number of columns of the matrix X. n ≥ 0.
REAL for slapmt
DOUBLE PRECISION for dlapmt
COMPLEX for clapmt
DOUBLE COMPLEX for zlapmt
Array, DIMENSION (ldx,n). On entry, the m-by-n matrix X.
INTEGER. The leading dimension of the array X, ldx ≥ max(1,m).
INTEGER. Array, DIMENSION (n). On entry, k contains the permutation vector and is used as internal workspace.
On exit, x contains the permuted matrix X.
On exit, k is reset to its original value.