Author(s): F. Carminati | Library: KERNLIB |
Submitter: | Submitted: 09.02.1989 |
Language: Fortran | Revised: |
SORTR re-arranges the row order of a matrix in such a way that the elements of a selected column are either in increasing or decreasing order as described. When these elements are equal, the rows are kept in their original order.
Structure:
SUBROUTINE subprogram
User Entry Names: SORTR, SORTI, SORTD
External References: VECMAN, USWOP
(not on all machines)
Usage:
For (type INTEGER), (type REAL), (type DOUBLE PRECISION),
CALL SORTt(MX,NC,NR,NCS)performs an ordering operation on the matrix MX of type t, dimensioned (NC,NR), using the NCS-th element of each row as ordering criterion.
The matrix MX is stored by rows, the first element of a row following immediately after the last element of the preceding row.
Obviously, is a condition. If this is not met or if , SORTX will do nothing.
If , the subroutine re-orders the rows of
MX in such
a way that the NCS-th element of each row is greater than or
equal to the NCS-th element of the preceding row. If
, the rows of MX are re-ordered in such a way that
the NCS-th element of each row is smaller than or equal to the
NCS-th element of the preceding row.