This manual relates to an old release of the Library.
The documentation for the current release is also available on this site.

NAG FL Interface
f06qjf (dgeap)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

f06qjf permutes the rows or columns of a real rectangular matrix using an integer array of permutations.

2 Specification

Fortran Interface
Subroutine f06qjf ( side, trans, n, perm, k, b, ldb)
Integer, Intent (In) :: n, perm(*), k, ldb
Real (Kind=nag_wp), Intent (Inout) :: b(ldb,*)
Character (1), Intent (In) :: side, trans
C Header Interface
#include <nag.h>
void  f06qjf_ (const char *side, const char *trans, const Integer *n, const Integer perm[], const Integer *k, double b[], const Integer *ldb, const Charlen length_side, const Charlen length_trans)
The routine may be called by the names f06qjf or nagf_blas_dgeap.

3 Description

f06qjf performs one of the permutation operations
BPTB, BPB, BBPT  or BBP,  
where B is a real matrix, and P is a permutation matrix.
P is represented in the form
P = P 1,p1 P 2,p2 P n,pn ,  
where Pi,j is the permutation matrix that interchanges items i and j; that is, Pi,j is the unit matrix with rows and columns i and j interchanged. If i=j, Pi,j=I.
Let m denote the number of rows of B if side='L', or the number of columns of B if side='R': the routine does not require m to be passed as an argument, but assumes that mpi, for i=1,2,,n.
This routine requires the indices pi to be supplied in an integer array; f06qkf performs the same operation with the indices supplied in a real array.

4 References

None.

5 Arguments

1: side Character(1) Input
2: trans Character(1) Input
On entry: specifies the operation to be performed.
side='L' and trans='T'
BPTB.
side='L' and trans='N'
BPB.
side='R' and trans='T'
BBPT.
side='R' and trans='N'
BBP.
Constraints:
  • side='L' or 'R';
  • trans='N' or 'T'.
3: n Integer Input
On entry: n, the number of interchanges in the representation of P.
Constraint: n0.
4: perm(*) Integer array Input
Note: the dimension of the array perm must be at least max(1,n) .
On entry: the n indices pi which define the interchanges in the representation of P. It is usual to have pii, but this is not necessary.
Constraint: 1perm(i)m, where m= maxk{perm(k)} .
5: k Integer Input
On entry: k, the number of columns of B if side='L', or the number of rows of B if side='R'.
Constraint: k0.
6: b(ldb,*) Real (Kind=nag_wp) array Input/Output
Note: the second dimension of the array b must be at least max(1,k) if side='L' and at least max(n,maxk{perm(k)}) if side='R'.
On entry: the original matrix B; B is m×k, where m= maxk{perm(k)} if side='L', or k×m, where m= maxk{perm(k)} if side='R'.
On exit: the permuted matrix B.
7: ldb Integer Input
On entry: the first dimension of the array b as declared in the (sub)program from which f06qjf is called.
Constraints:
  • if side='L', ldb max(n,m) ;
  • if side='R', ldb max(1,k) .

6 Error Indicators and Warnings

None.

7 Accuracy

Not applicable.

8 Parallelism and Performance

f06qjf is not threaded in any implementation.

9 Further Comments

None.

10 Example

None.