Google
 

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

PURPOSE
   TO PERMUTE THE ROWS OR COLUMNS OF A GIVEN MATRIX ACCORDING
   TO A GIVEN TRANSPOSITION VECTOR OR ITS INVERSE.  (SEE THE
   DISCUSSION ON PERMUTATIONS FOR DEFINITIONS AND NOTATION.)

USAGE
   CALL DMPRC(A,M,N,ITRA,INV,IROCO,IER)

DESCRIPTION OF PARAMETERS
   A	 - GIVEN DOUBLE PRECISION M BY N MATRIX AND RESULTING
	   PERMUTED MATRIX
   M	 - NUMBER OF ROWS OF A
   N	 - NUMBER OF COLUMNS OF A
   ITRA  - GIVEN TRANSPOSITION VECTOR (DIMENSION M IF ROWS ARE
	   PERMUTED, N IF COLUMNS ARE PERMUTED)
   INV	 - INPUT PARAMETER
	   INV NON-ZERO  -  PERMUTE ACCORDING TO ITRA
	   INV	  =   0  -  PERMUTE ACCORDING TO ITRA INVERSE
   IROCO - INPUT PARAMETER
	   IROCO NON-ZERO  -  PERMUTE THE COLUMNS OF A
	   IROCO    =	0  -  PERMUTE THE ROWS OF A
   IER	 - RESULTING ERROR PARAMETER
	   IER = -1  -	M AND N ARE NOT BOTH POSITIVE
	   IER =  0  -	NO ERROR
	   IER =  1  -	ITRA IS NOT A TRANSPOSITION VECTOR ON
			1,...,M IF ROWS ARE PERMUTED, 1,...,N
			IF COLUMNS ARE PERMUTED

REMARKS
   (1)	IF IER=-1 THERE IS NO COMPUTATION.
   (2)	IF IER= 1, THEN COMPUTATION HAS BEEN UNSUCCESSFUL DUE
	TO ERROR, BUT THE MATRIX A WILL REFLECT THE ROW OR
	COLUMN INTERCHANGES PERFORMED BEFORE THE ERROR WAS
	DETECTED.
   (3)	THE MATRIX A IS ASSUMED TO BE STORED COLUMNWISE.

SUBROUTINES AND SUBPROGRAMS REQUIRED
   NONE

METHOD
   THE ROWS OR COLUMNS ARE PERMUTED ELEMENTWISE, INTERCHANGING
   ROW OR COLUMN 1 AND ITRA(1),...,ROW OR COLUMN K AND ITRA(K)
   IN THAT ORDER IF INV=0, AND OTHERWISE INTERCHANGING ROW OR
   COLUMN K AND ITRA(K),...,ROW OR COLUMN 1 AND ITRA(1), WHERE
   K IS M OR N DEPENDING ON WHETHER WE PERMUTE ROWS OR COLUMNS.