      SUBROUTINE BALGBK (N,MZ,Z,M,LOW,IGH,CSCALE,CPERM)
C
C     *****PARAMETERS:
      INTEGER IGH,LOW,M,MZ,N
      DOUBLE PRECISION CPERM(N),CSCALE(N),Z(MZ,N)
C
C     *****LOCAL VARIABLES:
C     NONE
C
C     *****FUNCTIONS:
C     NONE
C
C     *****SUBROUTINES CALLED:
C     GRADBK, SCALBK
C
C     ---------------------------------------------------------------
C
C     *****PURPOSE:
C     THIS SUBROUTINE BACK TRANSFORMS THE EIGENVECTORS OF A
C     GENERALIZED EIGENVALUE PROBLEM A*X = (LAMBDA)*B*X, THAT WAS
C     BALANCED BY SUBROUTINE BALGEN, TO THOSE OF THE ORIGINAL
C     PROBLEM.
C     REF.:  WARD, R. C., BALANCING THE GENERALIZED EIGENVALUE
C     PROBLEM, SIAM J. SCI. STAT. COMPUT., VOL. 2, NO. 2, JUNE 1981,
C     141-152.
C
C     *****PARAMETER DESCRIPTION:
C
C     ON INPUT:
C
C       MZ      INTEGER
C               ROW DIMENSION OF THE ARRAY Z AS SPECIFIED IN THE MAIN
C               CALLING PROGRAM DIMENSION STATEMENT;
C
C       N       INTEGER
C               ORDER OF THE MATRICES A AND B IN THE EIGENPROBLEM;
C
C       M       INTEGER
C               SPECIFIES THE NUMBER OF EIGENVECTORS TO BE TRANS-
C               FORMED;
C
C       Z       REAL(MZ,N)
C               CONTAINS THE EIGENVECTORS TO BE TRANSFORMED;
C
C       LOW     INTEGER
C               SPECIFIES THE BEGINNING INDEX OF THE SUBMATRICES OF
C               A AND B WHICH WERE BALANCED;
C
C       IGH     INTEGER
C               SPECIFIES THE ENDING INDEX OF THE SUBMATRICES OF
C               A AND B WHICH WERE BALANCED;
C
C       CSCALE  REAL(N)
C               CONTAINS THE REDUCING COLUMN PERMUTATIONS AND SCALING
C               INFORMATION AS RETURNED FROM BALGEN;
C
C       CPERM   REAL(N)
C               CONTAINS IN ITS LOW THROUGH IGH LOCATIONS THE COLUMN
C               PERMUTATIONS APPLIED IN GRADING THE A AND B
C               SUBMATRICES AS RETURNED FROM BALGEN.
C
C     ON OUTPUT:
C
C       Z       CONTAINS THE TRANSFORMED EIGENVECTORS.
C
C     *****ALGORITHM NOTES:
C     NONE
C
C     *****HISTORY:
C     WRITTEN BY R. C. WARD.......
C
C     ---------------------------------------------------------------
C
      CALL GRADBK (N,MZ,Z,M,LOW,IGH,CPERM)
      CALL SCALBK (N,MZ,Z,M,LOW,IGH,CSCALE)
      RETURN
C
C     LAST LINE OF BALGBK
C
      END
