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

NAME

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

SYNOPSIS

9       SUBROUTINE SGGES( 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           REAL          A(  LDA,  * ), ALPHAI( * ), ALPHAR( * ), B( LDB, * ),
20                         BETA( * ), VSL( LDVSL, * ), VSR( LDVSR, * ), WORK(  *
21                         )
22
23           LOGICAL       SELCTG
24
25           EXTERNAL      SELCTG
26

PURPOSE

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