3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
8 *> Download ZGEBAK + dependencies
9 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgebak.f">
11 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgebak.f">
13 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgebak.f">
19 * SUBROUTINE ZGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
22 * .. Scalar Arguments ..
24 * INTEGER IHI, ILO, INFO, LDV, M, N
26 * .. Array Arguments ..
27 * DOUBLE PRECISION SCALE( * )
28 * COMPLEX*16 V( LDV, * )
34 *>\details \b Purpose:
37 *> ZGEBAK forms the right or left eigenvectors of a complex general
38 *> matrix by backward transformation on the computed eigenvectors of the
39 *> balanced matrix output by ZGEBAL.
49 *> Specifies the type of backward transformation required:
50 *> = 'N', do nothing, return immediately;
51 *> = 'P', do backward transformation for permutation only;
52 *> = 'S', do backward transformation for scaling only;
53 *> = 'B', do backward transformations for both permutation and
55 *> JOB must be the same as the argument JOB supplied to ZGEBAL.
60 *> SIDE is CHARACTER*1
61 *> = 'R': V contains right eigenvectors;
62 *> = 'L': V contains left eigenvectors.
68 *> The number of rows of the matrix V. N >= 0.
79 *> The integers ILO and IHI determined by ZGEBAL.
80 *> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
85 *> SCALE is DOUBLE PRECISION array, dimension (N)
86 *> Details of the permutation and scaling factors, as returned
93 *> The number of columns of the matrix V. M >= 0.
98 *> V is COMPLEX*16 array, dimension (LDV,M)
99 *> On entry, the matrix of right or left eigenvectors to be
100 *> transformed, as returned by ZHSEIN or ZTREVC.
101 *> On exit, V is overwritten by the transformed eigenvectors.
107 *> The leading dimension of the array V. LDV >= max(1,N).
113 *> = 0: successful exit
114 *> < 0: if INFO = -i, the i-th argument had an illegal value.
121 *> \author Univ. of Tennessee
122 *> \author Univ. of California Berkeley
123 *> \author Univ. of Colorado Denver
126 *> \date November 2011
128 *> \ingroup complex16GEcomputational
130 * =====================================================================
131 SUBROUTINE ZGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
134 * -- LAPACK computational routine (version 3.2) --
135 * -- LAPACK is a software package provided by Univ. of Tennessee, --
136 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
139 * .. Scalar Arguments ..
141 INTEGER IHI, ILO, INFO, LDV, M, N
143 * .. Array Arguments ..
144 DOUBLE PRECISION SCALE( * )
145 COMPLEX*16 V( LDV, * )
148 * =====================================================================
152 PARAMETER ( ONE = 1.0D+0 )
154 * .. Local Scalars ..
155 LOGICAL LEFTV, RIGHTV
159 * .. External Functions ..
163 * .. External Subroutines ..
164 EXTERNAL XERBLA, ZDSCAL, ZSWAP
166 * .. Intrinsic Functions ..
169 * .. Executable Statements ..
171 * Decode and Test the input parameters
173 RIGHTV = LSAME( SIDE, 'R' )
174 LEFTV = LSAME( SIDE, 'L' )
177 IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND.
178 $ .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN
180 ELSE IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN
182 ELSE IF( N.LT.0 ) THEN
184 ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN
186 ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN
188 ELSE IF( M.LT.0 ) THEN
190 ELSE IF( LDV.LT.MAX( 1, N ) ) THEN
194 CALL XERBLA( 'ZGEBAK', -INFO )
198 * Quick return if possible
204 IF( LSAME( JOB, 'N' ) )
212 IF( LSAME( JOB, 'S' ) .OR. LSAME( JOB, 'B' ) ) THEN
217 CALL ZDSCAL( M, S, V( I, 1 ), LDV )
224 CALL ZDSCAL( M, S, V( I, 1 ), LDV )
230 * Backward permutation
232 * For I = ILO-1 step -1 until 1,
233 * IHI+1 step 1 until N do --
236 IF( LSAME( JOB, 'P' ) .OR. LSAME( JOB, 'B' ) ) THEN
240 IF( I.GE.ILO .AND. I.LE.IHI )
247 CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV )
254 IF( I.GE.ILO .AND. I.LE.IHI )
261 CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV )