?lapmr

Rearranges rows of a matrix as specified by a permutation vector.

Syntax

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] )

Include Files

Description

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.

Input Parameters

forwrd

LOGICAL.

If forwrd = .TRUE., forward permutation

If forwrd = .FALSE., backward permutation

m

INTEGER. The number of rows of the matrix X. m 0.

n

INTEGER. The number of columns of the matrix X. n 0.

x

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.

ldx

INTEGER. The leading dimension of the array X, ldx max(1,m).

k

INTEGER. Array, DIMENSION (m). On entry, k contains the permutation vector and is used as internal workspace.

Output Parameters

x

On exit, x contains the permuted matrix X.

k

On exit, k is reset to its original value.

Fortran 95 Interface Notes

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:

x

Holds the matrix X of size (n, n).

k

Holds the vector of length m.

forwrd

Specifies the permutation. Must be '.TRUE.' or '.FALSE.'.

See Also


Submit feedback on this help topic