LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine zgebak ( character  JOB,
character  SIDE,
integer  N,
integer  ILO,
integer  IHI,
double precision, dimension( * )  SCALE,
integer  M,
complex*16, dimension( ldv, * )  V,
integer  LDV,
integer  INFO 
)

ZGEBAK

Download ZGEBAK + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 ZGEBAK forms the right or left eigenvectors of a complex general
 matrix by backward transformation on the computed eigenvectors of the
 balanced matrix output by ZGEBAL.
Parameters
[in]JOB
          JOB is CHARACTER*1
          Specifies the type of backward transformation required:
          = 'N', do nothing, return immediately;
          = 'P', do backward transformation for permutation only;
          = 'S', do backward transformation for scaling only;
          = 'B', do backward transformations for both permutation and
                 scaling.
          JOB must be the same as the argument JOB supplied to ZGEBAL.
[in]SIDE
          SIDE is CHARACTER*1
          = 'R':  V contains right eigenvectors;
          = 'L':  V contains left eigenvectors.
[in]N
          N is INTEGER
          The number of rows of the matrix V.  N >= 0.
[in]ILO
          ILO is INTEGER
[in]IHI
          IHI is INTEGER
          The integers ILO and IHI determined by ZGEBAL.
          1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
[in]SCALE
          SCALE is DOUBLE PRECISION array, dimension (N)
          Details of the permutation and scaling factors, as returned
          by ZGEBAL.
[in]M
          M is INTEGER
          The number of columns of the matrix V.  M >= 0.
[in,out]V
          V is COMPLEX*16 array, dimension (LDV,M)
          On entry, the matrix of right or left eigenvectors to be
          transformed, as returned by ZHSEIN or ZTREVC.
          On exit, V is overwritten by the transformed eigenvectors.
[in]LDV
          LDV is INTEGER
          The leading dimension of the array V. LDV >= max(1,N).
[out]INFO
          INFO is INTEGER
          = 0:  successful exit
          < 0:  if INFO = -i, the i-th argument had an illegal value.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 133 of file zgebak.f.

133 *
134 * -- LAPACK computational routine (version 3.4.0) --
135 * -- LAPACK is a software package provided by Univ. of Tennessee, --
136 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
137 * November 2011
138 *
139 * .. Scalar Arguments ..
140  CHARACTER job, side
141  INTEGER ihi, ilo, info, ldv, m, n
142 * ..
143 * .. Array Arguments ..
144  DOUBLE PRECISION scale( * )
145  COMPLEX*16 v( ldv, * )
146 * ..
147 *
148 * =====================================================================
149 *
150 * .. Parameters ..
151  DOUBLE PRECISION one
152  parameter ( one = 1.0d+0 )
153 * ..
154 * .. Local Scalars ..
155  LOGICAL leftv, rightv
156  INTEGER i, ii, k
157  DOUBLE PRECISION s
158 * ..
159 * .. External Functions ..
160  LOGICAL lsame
161  EXTERNAL lsame
162 * ..
163 * .. External Subroutines ..
164  EXTERNAL xerbla, zdscal, zswap
165 * ..
166 * .. Intrinsic Functions ..
167  INTRINSIC max, min
168 * ..
169 * .. Executable Statements ..
170 *
171 * Decode and Test the input parameters
172 *
173  rightv = lsame( side, 'R' )
174  leftv = lsame( side, 'L' )
175 *
176  info = 0
177  IF( .NOT.lsame( job, 'N' ) .AND. .NOT.lsame( job, 'P' ) .AND.
178  $ .NOT.lsame( job, 'S' ) .AND. .NOT.lsame( job, 'B' ) ) THEN
179  info = -1
180  ELSE IF( .NOT.rightv .AND. .NOT.leftv ) THEN
181  info = -2
182  ELSE IF( n.LT.0 ) THEN
183  info = -3
184  ELSE IF( ilo.LT.1 .OR. ilo.GT.max( 1, n ) ) THEN
185  info = -4
186  ELSE IF( ihi.LT.min( ilo, n ) .OR. ihi.GT.n ) THEN
187  info = -5
188  ELSE IF( m.LT.0 ) THEN
189  info = -7
190  ELSE IF( ldv.LT.max( 1, n ) ) THEN
191  info = -9
192  END IF
193  IF( info.NE.0 ) THEN
194  CALL xerbla( 'ZGEBAK', -info )
195  RETURN
196  END IF
197 *
198 * Quick return if possible
199 *
200  IF( n.EQ.0 )
201  $ RETURN
202  IF( m.EQ.0 )
203  $ RETURN
204  IF( lsame( job, 'N' ) )
205  $ RETURN
206 *
207  IF( ilo.EQ.ihi )
208  $ GO TO 30
209 *
210 * Backward balance
211 *
212  IF( lsame( job, 'S' ) .OR. lsame( job, 'B' ) ) THEN
213 *
214  IF( rightv ) THEN
215  DO 10 i = ilo, ihi
216  s = scale( i )
217  CALL zdscal( m, s, v( i, 1 ), ldv )
218  10 CONTINUE
219  END IF
220 *
221  IF( leftv ) THEN
222  DO 20 i = ilo, ihi
223  s = one / scale( i )
224  CALL zdscal( m, s, v( i, 1 ), ldv )
225  20 CONTINUE
226  END IF
227 *
228  END IF
229 *
230 * Backward permutation
231 *
232 * For I = ILO-1 step -1 until 1,
233 * IHI+1 step 1 until N do --
234 *
235  30 CONTINUE
236  IF( lsame( job, 'P' ) .OR. lsame( job, 'B' ) ) THEN
237  IF( rightv ) THEN
238  DO 40 ii = 1, n
239  i = ii
240  IF( i.GE.ilo .AND. i.LE.ihi )
241  $ GO TO 40
242  IF( i.LT.ilo )
243  $ i = ilo - ii
244  k = scale( i )
245  IF( k.EQ.i )
246  $ GO TO 40
247  CALL zswap( m, v( i, 1 ), ldv, v( k, 1 ), ldv )
248  40 CONTINUE
249  END IF
250 *
251  IF( leftv ) THEN
252  DO 50 ii = 1, n
253  i = ii
254  IF( i.GE.ilo .AND. i.LE.ihi )
255  $ GO TO 50
256  IF( i.LT.ilo )
257  $ i = ilo - ii
258  k = scale( i )
259  IF( k.EQ.i )
260  $ GO TO 50
261  CALL zswap( m, v( i, 1 ), ldv, v( k, 1 ), ldv )
262  50 CONTINUE
263  END IF
264  END IF
265 *
266  RETURN
267 *
268 * End of ZGEBAK
269 *
subroutine zswap(N, ZX, INCX, ZY, INCY)
ZSWAP
Definition: zswap.f:52
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
subroutine zdscal(N, DA, ZX, INCX)
ZDSCAL
Definition: zdscal.f:54
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function: