F06VKF (PDF version)
F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F06VKF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

+ Contents

    1  Purpose
    7  Accuracy
    9  Example

1  Purpose

F06VKF permutes the rows or columns of a complex rectangular matrix using a real array of permutations.

2  Specification

SUBROUTINE F06VKF ( SIDE, TRANS, N, PERM, K, B, LDB)
INTEGER  N, K, LDB
REAL (KIND=nag_wp)  PERM(*)
COMPLEX (KIND=nag_wp)  B(LDB,*)
CHARACTER(1)  SIDE, TRANS

3  Description

F06VKF performs one of the permutation operations
BPTB, BPB, BBPT  or BBP,
where B is a complex matrix, and P is a permutation matrix.
P is represented in the form
P=P1,p1P2,p2Pn,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 a real array (the routine takes the integer part of the array elements); F06VJF performs the same operation with the indices supplied in an integer array.

4  References

None.

5  Parameters

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 – INTEGERInput
On entry: n, the number of interchanges in the representation of P.
Constraint: N0.
4:     PERM(*) – REAL (KIND=nag_wp) arrayInput
Note: the dimension of the array PERM must be at least max1,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: 1PERMim.
5:     K – INTEGERInput
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,*) – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array B must be at least max1,K if SIDE='L' and at least max1,maxkintPERMk  if SIDE='R'.
On entry: the original matrix B; B is m by k if SIDE='L', or k by m if SIDE='R'.
On exit: the permuted matrix B.
7:     LDB – INTEGERInput
On entry: the first dimension of the array B as declared in the (sub)program from which F06VKF is called.
Constraints:
  • if SIDE='L', LDB max1,m ;
  • if SIDE='R', LDB max1,K .

6  Error Indicators and Warnings

None.

7  Accuracy

Not applicable.

8  Further Comments

None.

9  Example

None.

F06VKF (PDF version)
F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012