Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-02 - 43,50145/rsrt.doc
There are 2 other files named rsrt.doc in the archive. Click here to see a list.
SUBROUTINE RSRT

PURPOSE
   SORT ROWS OF A MATRIX

USAGE
   CALL RSRT(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 AND LENGTH OF B
   M - NUMBER OF COLUMNS IN A AND R
   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
   N MUST BE GREATER THAN ONE.

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   LOC

METHOD
   ROWS OF INPUT MATRIX A ARE SORTED TO FORM OUTPUT MATRIX R.
   THE SORTED ROW SEQUENCE IS DETERMINED BY THE VALUES OF
   ELEMENTS IN COLUMN VECTOR B. THE LOWEST VALUED ELEMENT IN
   B WILL CAUSE THE CORRESPONDING ROW OF A TO BE PLACED IN THE
   FIRST ROW OF R. THE HIGHEST VALUED ELEMENT OF B WILL CAUSE
   THE CORRESPONDING ROW OF A TO BE PLACED IN THE LAST ROW OF
   R. IF DUPLICATE VALUES EXIST IN B, THE CORRESPONDING ROWS
   OF A ARE MOVED TO R IN THE SAME ORDER AS IN A.