Trailing-Edge
-
PDP-10 Archives
-
decuslib10-02
-
43,50145/csrt.doc
There are 2 other files named csrt.doc in the archive. Click here to see a list.
SUBROUTINE CSRT
PURPOSE
SORT COLUMNS OF A MATRIX
USAGE
CALL CSRT(A,B,R,N,M,MS)
DESCRIPTION OF PARAMETERS
A - NAME OF INPUT MATRIX TO BE SORTED
B - NAME OF INPUT VECTOR WHICH CONTAINS SORTING KEY
R - NAME OF SORTED OUTPUT MATRIX
N - NUMBER OF ROWS IN A AND R
M - NUMBER OF COLUMNS IN A AND R AND LENGTH OF B
MS - ONE DIGIT NUMBER FOR STORAGE MODE OF MATRIX A
0 - GENERAL
1 - SYMMETRIC
2 - DIAGONAL
REMARKS
MATRIX R CANNOT BE IN THE SAME LOCATION AS MATRIX A
MATRIX R IS ALWAYS A GENERAL MATRIX
M MUST BE GREATER THAN ONE.
SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
LOC
CCPY
METHOD
COLUMNS OF INPUT MATRIX A ARE SORTED TO FORM OUTPUT MATRIX
R. THE SORTED COLUMN SEQUENCE IS DETERMINED BY THE VALUES OF
ELEMENTS IN ROW VECTOR B. THE LOWEST VALUED ELEMENT IN
B WILL CAUSE THE CORRESPONDING COLUMN OF A TO BE PLACED IN
THE FIRST COLUMN OF R. THE HIGHEST VALUED ELEMENT OF B WILL
CAUSE THE CORRESPONDING ROW OF A TO BE PLACED IN THE LAST
COLUMN OF R. IF DUPLICATE VALUES EXIST IN B, THE
CORRESPONDING COLUMNS OF A ARE MOVED TO R IN THE SAME ORDER
AS IN A.