NAG Library Routine Document
F01CRF transposes a rectangular matrix in-situ.
||M, N, MN, MOVE(LMOVE), LMOVE, IFAIL
F01CRF requires that the elements of an
are stored consecutively by columns in a one-dimensional array. It reorders the elements so that on exit the array holds the transpose of
stored in the same way. For example, if
, on entry the array must hold:
and on exit it holds
Cate E G and Twigg D W (1977) Algorithm 513: Analysis of in-situ transposition ACM Trans. Math. Software 3 104–110
- 1: A(MN) – REAL (KIND=nag_wp) arrayInput/Output
On entry: the elements of the by matrix , stored by columns.
On exit: the elements of the transpose matrix, also stored by columns.
- 2: M – INTEGERInput
On entry: , the number of rows of the matrix .
- 3: N – INTEGERInput
On entry: , the number of columns of the matrix .
- 4: MN – INTEGERInput
On entry: , the value .
- 5: MOVE(LMOVE) – INTEGER arrayWorkspace
- 6: LMOVE – INTEGERInput
: the dimension of the array MOVE
as declared in the (sub)program from which F01CRF is called.
- 7: IFAIL – INTEGERInput/Output
must be set to
. If you are unfamiliar with this parameter you should refer to Section 3.3
in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
. When the value is used it is essential to test the value of IFAIL on exit.
unless the routine detects an error or a warning has been flagged (see Section 6
6 Error Indicators and Warnings
If on entry
, explanatory error messages are output on the current error message unit (as defined by X04AAF
Errors or warnings detected by the routine:
A serious error has occurred. Check all subroutine calls and array sizes. Seek expert help.
Exact results are produced.
The time taken by F01CRF is approximately proportional to .
This example transposes a by matrix and prints out, for convenience, its transpose.
9.1 Program Text
Program Text (f01crfe.f90)
9.2 Program Data
Program Data (f01crfe.d)
9.3 Program Results
Program Results (f01crfe.r)