1CGGBAL(1)                LAPACK routine (version 3.1)                CGGBAL(1)
2
3
4

NAME

6       CGGBAL - a pair of general complex matrices (A,B)
7

SYNOPSIS

9       SUBROUTINE CGGBAL( JOB,  N,  A,  LDA, B, LDB, ILO, IHI, LSCALE, RSCALE,
10                          WORK, INFO )
11
12           CHARACTER      JOB
13
14           INTEGER        IHI, ILO, INFO, LDA, LDB, N
15
16           REAL           LSCALE( * ), RSCALE( * ), WORK( * )
17
18           COMPLEX        A( LDA, * ), B( LDB, * )
19

PURPOSE

21       CGGBAL balances  a  pair  of  general  complex  matrices  (A,B).   This
22       involves,  first,  permuting  A  and B by similarity transformations to
23       isolate eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N  ele‐
24       ments  on  the  diagonal;  and  second,  applying a diagonal similarity
25       transformation to rows and columns ILO to IHI to make the rows and col‐
26       umns as close in norm as possible. Both steps are optional.
27
28       Balancing  may reduce the 1-norm of the matrices, and improve the accu‐
29       racy of the computed eigenvalues and/or eigenvectors in the generalized
30       eigenvalue problem A*x = lambda*B*x.
31
32

ARGUMENTS

34       JOB     (input) CHARACTER*1
35               Specifies the operations to be performed on A and B:
36               = 'N':  none:  simply set ILO = 1, IHI = N, LSCALE(I) = 1.0 and
37               RSCALE(I) = 1.0 for i=1,...,N; = 'P':  permute only;
38               = 'S':  scale only;
39               = 'B':  both permute and scale.
40
41       N       (input) INTEGER
42               The order of the matrices A and B.  N >= 0.
43
44       A       (input/output) COMPLEX array, dimension (LDA,N)
45               On entry, the input matrix A.  On exit, A is overwritten by the
46               balanced matrix.  If JOB = 'N', A is not referenced.
47
48       LDA     (input) INTEGER
49               The leading dimension of the array A. LDA >= max(1,N).
50
51       B       (input/output) COMPLEX array, dimension (LDB,N)
52               On entry, the input matrix B.  On exit, B is overwritten by the
53               balanced matrix.  If JOB = 'N', B is not referenced.
54
55       LDB     (input) INTEGER
56               The leading dimension of the array B. LDB >= max(1,N).
57
58       ILO     (output) INTEGER
59               IHI     (output) INTEGER ILO and IHI are set to  integers  such
60               that  on  exit  A(i,j)  =  0  and  B(i,j)  = 0 if i > j and j =
61               1,...,ILO-1 or i = IHI+1,...,N.  If JOB = 'N' or 'S', ILO  =  1
62               and IHI = N.
63
64       LSCALE  (output) REAL array, dimension (N)
65               Details  of the permutations and scaling factors applied to the
66               left side of A and B.  If P(j) is the index of the  row  inter‐
67               changed  with  row j, and D(j) is the scaling factor applied to
68               row j, then LSCALE(j) = P(j)    for  J  =  1,...,ILO-1  =  D(j)
69               for  J  = ILO,...,IHI = P(j)    for J = IHI+1,...,N.  The order
70               in which the interchanges are made is N to  IHI+1,  then  1  to
71               ILO-1.
72
73       RSCALE  (output) REAL array, dimension (N)
74               Details  of the permutations and scaling factors applied to the
75               right side of A and B.  If P(j) is  the  index  of  the  column
76               interchanged  with  column  j,  and  D(j) is the scaling factor
77               applied  to  column  j,  then  RSCALE(j)  =  P(j)     for  J  =
78               1,...,ILO-1  =  D(j)     for  J = ILO,...,IHI = P(j)    for J =
79               IHI+1,...,N.  The order in which the interchanges are made is N
80               to IHI+1, then 1 to ILO-1.
81
82       WORK    (workspace) REAL array, dimension (lwork)
83               lwork must be at least max(1,6*N) when JOB = 'S' or 'B', and at
84               least 1 when JOB = 'N' or 'P'.
85
86       INFO    (output) INTEGER
87               = 0:  successful exit
88               < 0:  if INFO = -i, the i-th argument had an illegal value.
89

FURTHER DETAILS

91       See R.C. WARD, Balancing the generalized eigenvalue problem,
92                      SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
93
94
95
96
97 LAPACK routine (version 3.1)    November 2006                       CGGBAL(1)
Impressum