Trailing-Edge
-
PDP-10 Archives
-
decus_20tap2_198111
-
decus/20-0026/ctab.doc
There are 2 other files named ctab.doc in the archive. Click here to see a list.
SUBROUTINE CTAB
PURPOSE
TABULATE COLUMNS OF A MATRIX TO FORM A SUMMARY MATRIX
USAGE
CALL CTAB(A,B,R,S,N,M,MS,L)
DESCRIPTION OF PARAMETERS
A - NAME OF INPUT MATRIX
B - NAME OF INPUT VECTOR OF LENGTH M CONTAINING KEY
R - NAME OF OUTPUT MATRIX CONTAINING SUMMARY OF COLUMN DATA.
IT IS INITIALLY SET TO ZERO BY THIS SUBROUTINE.
S - NAME OF OUTPUT VECTOR OF LENGTH L+1 CONTAINING COUNTS
N - NUMBER OF ROWS IN A AND R
M - NUMBER OF COLUMNS IN A
L - NUMBER OF COLUMNS IN R
MS - ONE DIGIT NUMBER FOR STORAGE MODE OF MATRIX A
0 - GENERAL
1 - SYMMETRIC
2 - DIAGONAL
REMARKS
MATRIX R IS ALWAYS A GENERAL MATRIX
SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
LOC
CADD
METHOD
COLUMNS OF DATA IN MATRIX A ARE TABULATED BASED ON THE KEY
CONTAINED IN VECTOR B. THE FLOATING POINT NUMBER IN B(I) IS
TRUNCATED TO FORM J. THE ITH COLUMN OF A IS ADDED TO THE JTH
COLUMN OF MATRIX R AND ONE IS ADDED TO S(J). IF THE VALUE OF
J IS NOT BETWEEN 1 AND L, ONE IS ADDED TO S(L+1)
UPON COMPLETION, THE OUTPUT MATRIX R CONTAINS A SUMMARY OF
COLUMN DATA AS SPECIFIED BY VECTOR B. EACH ELEMENT IN VECTOR
S CONTAINS A COUNT OF THE NUMBER OF COLUMNS OF A USED TO
FORM R. ELEMENT S(L+1) CONTAINS THE NUMBER OF COLUMNS OF A
NOT INCLUDED IN R AS A RESULT OF J BEING LESS THAN ONE OR
GREATER THAN L.