Rearranges rows of a matrix as specified by a permutation vector.
FORTRAN 77:
call slapmr( forwrd, m, n, x, ldx, k )
call dlapmr( forwrd, m, n, x, ldx, k )
call clapmr( forwrd, m, n, x, ldx, k )
call zlapmr( forwrd, m, n, x, ldx, k )
FORTRAN 95:
call lapmr( x,k[,forwrd] )
The ?lapmr routine rearranges the rows of the m-by-n matrix X as specified by the permutation k(1),k(2),...,k(m) of the integers 1,...,m.
If forwrd = .TRUE., forward permutation:
X(k(i,*)) is moved to X(i,*) for i= 1,2,...,m.
If forwrd = .FALSE., backward permutation:
X(i,*) is moved to X(k(i,*)) for i = 1,2,...,m.
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 slapmr
DOUBLE PRECISION for dlapmr
COMPLEX for clapmr
DOUBLE COMPLEX for zlapmr
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 (m). 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.
Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see Fortran 95 Interface Conventions.
Specific details for the routine ?lapmr interface are as follows:
Holds the matrix X of size (n, n).
Holds the vector of length m.
Specifies the permutation. Must be '.TRUE.' or '.FALSE.'.