1DGGES(1)              LAPACK driver routine (version 3.2)             DGGES(1)
2
3
4

NAME

6       DGGES - computes for a pair of N-by-N real nonsymmetric matrices (A,B),
7

SYNOPSIS

9       SUBROUTINE DGGES( JOBVSL,  JOBVSR,  SORT,  SELCTG,  N,  A, LDA, B, LDB,
10                         SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL,  VSR,  LDVSR,
11                         WORK, LWORK, BWORK, INFO )
12
13           CHARACTER     JOBVSL, JOBVSR, SORT
14
15           INTEGER       INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N, SDIM
16
17           LOGICAL       BWORK( * )
18
19           DOUBLE        PRECISION  A(  LDA, * ), ALPHAI( * ), ALPHAR( * ), B(
20                         LDB, * ), BETA( * ), VSL( LDVSL, * ), VSR(  LDVSR,  *
21                         ), WORK( * )
22
23           LOGICAL       SELCTG
24
25           EXTERNAL      SELCTG
26

PURPOSE

28       DGGES  computes  for a pair of N-by-N real nonsymmetric matrices (A,B),
29       the generalized eigenvalues, the generalized  real  Schur  form  (S,T),
30       optionally,  the  left  and/or right matrices of Schur vectors (VSL and
31       VSR). This gives the generalized Schur factorization
32                (A,B) = ( (VSL)*S*(VSR)**T, (VSL)*T*(VSR)**T )
33       Optionally, it also orders the eigenvalues so that a  selected  cluster
34       of  eigenvalues  appears  in  the  leading diagonal blocks of the upper
35       quasi-triangular matrix S and the upper triangular matrix T.The leading
36       columns  of  VSL  and VSR then form an orthonormal basis for the corre‐
37       sponding left and right eigenspaces (deflating  subspaces).   (If  only
38       the  generalized  eigenvalues are needed, use the driver DGGEV instead,
39       which is faster.)
40       A generalized eigenvalue for a pair of matrices (A,B) is a scalar w  or
41       a  ratio alpha/beta = w, such that  A - w*B is singular.  It is usually
42       represented as the pair (alpha,beta), as there is a  reasonable  inter‐
43       pretation for beta=0 or both being zero.
44       A  pair  of  matrices  (S,T)  is in generalized real Schur form if T is
45       upper triangular with non-negative diagonal and S is block upper trian‐
46       gular  with 1-by-1 and 2-by-2 blocks.  1-by-1 blocks correspond to real
47       generalized eigenvalues, while 2-by-2 blocks of S  will  be  "standard‐
48       ized" by making the corresponding elements of T have the form:
49               [  a  0  ]
50               [  0  b  ]
51       and the pair of corresponding 2-by-2 blocks in S and T will have a com‐
52       plex conjugate pair of generalized eigenvalues.
53

ARGUMENTS

55       JOBVSL  (input) CHARACTER*1
56               = 'N':  do not compute the left Schur vectors;
57               = 'V':  compute the left Schur vectors.
58
59       JOBVSR  (input) CHARACTER*1
60               = 'N':  do not compute the right Schur vectors;
61               = 'V':  compute the right Schur vectors.
62
63       SORT    (input) CHARACTER*1
64               Specifies whether or not to order the eigenvalues on the diago‐
65               nal of the generalized Schur form.  = 'N':  Eigenvalues are not
66               ordered;
67               = 'S':  Eigenvalues are ordered (see SELCTG);
68
69       SELCTG  (external procedure) LOGICAL FUNCTION of three DOUBLE PRECISION
70       arguments
71               SELCTG must be declared EXTERNAL in the calling subroutine.  If
72               SORT = 'N', SELCTG is not referenced.  If SORT = 'S', SELCTG is
73               used to select eigenvalues to sort to the top left of the Schur
74               form.  An eigenvalue (ALPHAR(j)+ALPHAI(j))/BETA(j) is  selected
75               if  SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) is true; i.e. if either
76               one of a complex conjugate pair  of  eigenvalues  is  selected,
77               then  both  complex eigenvalues are selected.  Note that in the
78               ill-conditioned case, a  selected  complex  eigenvalue  may  no
79               longer  satisfy  SELCTG(ALPHAR(j),ALPHAI(j),  BETA(j)) = .TRUE.
80               after ordering. INFO is to be set to N+2 in this case.
81
82       N       (input) INTEGER
83               The order of the matrices A, B, VSL, and VSR.  N >= 0.
84
85       A       (input/output) DOUBLE PRECISION array, dimension (LDA, N)
86               On entry, the first of the pair of matrices.  On  exit,  A  has
87               been overwritten by its generalized Schur form S.
88
89       LDA     (input) INTEGER
90               The leading dimension of A.  LDA >= max(1,N).
91
92       B       (input/output) DOUBLE PRECISION array, dimension (LDB, N)
93               On  entry,  the second of the pair of matrices.  On exit, B has
94               been overwritten by its generalized Schur form T.
95
96       LDB     (input) INTEGER
97               The leading dimension of B.  LDB >= max(1,N).
98
99       SDIM    (output) INTEGER
100               If SORT = 'N', SDIM = 0.  If SORT = 'S', SDIM = number  of  ei‐
101               genvalues  (after  sorting) for which SELCTG is true.  (Complex
102               conjugate pairs for which SELCTG is true for either  eigenvalue
103               count as 2.)
104
105       ALPHAR  (output) DOUBLE PRECISION array, dimension (N)
106               ALPHAI   (output)  DOUBLE  PRECISION  array, dimension (N) BETA
107               (output)  DOUBLE  PRECISION  array,  dimension  (N)  On   exit,
108               (ALPHAR(j)  + ALPHAI(j)*i)/BETA(j), j=1,...,N, will be the gen‐
109               eralized   eigenvalues.    ALPHAR(j)   +    ALPHAI(j)*i,    and
110               BETA(j),j=1,...,N  are  the diagonals of the complex Schur form
111               (S,T) that would result if the 2-by-2 diagonal  blocks  of  the
112               real  Schur  form  of  (A,B) were further reduced to triangular
113               form  using  2-by-2  complex   unitary   transformations.    If
114               ALPHAI(j)  is  zero, then the j-th eigenvalue is real; if posi‐
115               tive, then the j-th and (j+1)-st eigenvalues are a complex con‐
116               jugate  pair,  with  ALPHAI(j+1) negative.  Note: the quotients
117               ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)  may  easily  over-  or
118               underflow, and BETA(j) may even be zero.  Thus, the user should
119               avoid naively computing the ratio.  However, ALPHAR and  ALPHAI
120               will be always less than and usually comparable with norm(A) in
121               magnitude, and BETA always less  than  and  usually  comparable
122               with norm(B).
123
124       VSL     (output) DOUBLE PRECISION array, dimension (LDVSL,N)
125               If  JOBVSL = 'V', VSL will contain the left Schur vectors.  Not
126               referenced if JOBVSL = 'N'.
127
128       LDVSL   (input) INTEGER
129               The leading dimension of the matrix VSL. LDVSL >=1, and if JOB‐
130               VSL = 'V', LDVSL >= N.
131
132       VSR     (output) DOUBLE PRECISION array, dimension (LDVSR,N)
133               If JOBVSR = 'V', VSR will contain the right Schur vectors.  Not
134               referenced if JOBVSR = 'N'.
135
136       LDVSR   (input) INTEGER
137               The leading dimension of the matrix VSR. LDVSR  >=  1,  and  if
138               JOBVSR = 'V', LDVSR >= N.
139
140       WORK       (workspace/output)   DOUBLE   PRECISION   array,   dimension
141       (MAX(1,LWORK))
142               On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
143
144       LWORK   (input) INTEGER
145               The dimension of the array WORK.  If N = 0, LWORK  >=  1,  else
146               LWORK  >=  8*N+16.  For good performance , LWORK must generally
147               be larger.  If LWORK = -1, then a workspace query  is  assumed;
148               the routine only calculates the optimal size of the WORK array,
149               returns this value as the first entry of the WORK array, and no
150               error message related to LWORK is issued by XERBLA.
151
152       BWORK   (workspace) LOGICAL array, dimension (N)
153               Not referenced if SORT = 'N'.
154
155       INFO    (output) INTEGER
156               = 0:  successful exit
157               < 0:  if INFO = -i, the i-th argument had an illegal value.
158               =  1,...,N:  The  QZ  iteration failed.  (A,B) are not in Schur
159               form, but ALPHAR(j), ALPHAI(j), and BETA(j) should  be  correct
160               for j=INFO+1,...,N.  > N:  =N+1: other than QZ iteration failed
161               in DHGEQZ.
162               =N+2: after reordering, roundoff changed values of some complex
163               eigenvalues  so  that  leading  eigenvalues  in the Generalized
164               Schur form no longer satisfy SELCTG=.TRUE.  This could also  be
165               caused due to scaling.  =N+3: reordering failed in DTGSEN.
166
167
168
169 LAPACK driver routine (version 3.N2o)vember 2008                        DGGES(1)
Impressum