Description:
This routine returns a list of column sorted indices to an array (rows and columns
span the first and second dimensions, respectively). This means that the data in the first
column is sorted, any tied positions are then sorted by the corresponding values of the data
in the second column, any tied values here are then sorted using the values in the third
column and so on until the array is completely value ordered, or all columns have been
used.
The sort is stable so any completely tied columns preserve their original order.
Invocation
CALL
PDA_SAAC[x]( A, NDEC, N, M, IP, LINK, IFAIL )
Arguments
A( NDEC, M ) = ? (Given)
The matrix to be ranked column by column.
NDEC = INTEGER (Given)
The declared
size of the first dimension of A.
N = INTEGER (Given)
The number of rows of A to be
used.
M = INTEGER (Given)
The number of columns of A to be used. The declared
size of this array should be at least two larger than this value (i.e. A should be at least
A(NDEC,M2)).
IP( M
2 ) = INTEGER (Returned)
The indices of A when ranked into ascending order.
LINK( M
2 ) =
INTEGER (Given and Returned)
Workspace.
IFAIL = INTEGER (Returned)
Non zero if a bounds
error has been detected.
Notes:
-
There is a routine for each of the data types integer, real and double precision; replace [x] in the
routine name by I, R or D as appropriate. The data type of the A argument should match the routine
being used.