3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download ZGEBAK + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgebak.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgebak.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgebak.f">
21 * SUBROUTINE ZGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
24 * .. Scalar Arguments ..
26 * INTEGER IHI, ILO, INFO, LDV, M, N
28 * .. Array Arguments ..
29 * DOUBLE PRECISION SCALE( * )
30 * COMPLEX*16 V( LDV, * )
36 *>\details \b Purpose:
39 *> ZGEBAK forms the right or left eigenvectors of a complex general
40 *> matrix by backward transformation on the computed eigenvectors of the
41 *> balanced matrix output by ZGEBAL.
51 *> Specifies the type of backward transformation required:
52 *> = 'N', do nothing, return immediately;
53 *> = 'P', do backward transformation for permutation only;
54 *> = 'S', do backward transformation for scaling only;
55 *> = 'B', do backward transformations for both permutation and
57 *> JOB must be the same as the argument JOB supplied to ZGEBAL.
62 *> SIDE is CHARACTER*1
63 *> = 'R': V contains right eigenvectors;
64 *> = 'L': V contains left eigenvectors.
70 *> The number of rows of the matrix V. N >= 0.
81 *> The integers ILO and IHI determined by ZGEBAL.
82 *> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
87 *> SCALE is DOUBLE PRECISION array, dimension (N)
88 *> Details of the permutation and scaling factors, as returned
95 *> The number of columns of the matrix V. M >= 0.
100 *> V is COMPLEX*16 array, dimension (LDV,M)
101 *> On entry, the matrix of right or left eigenvectors to be
102 *> transformed, as returned by ZHSEIN or ZTREVC.
103 *> On exit, V is overwritten by the transformed eigenvectors.
109 *> The leading dimension of the array V. LDV >= max(1,N).
115 *> = 0: successful exit
116 *> < 0: if INFO = -i, the i-th argument had an illegal value.
123 *> \author Univ. of Tennessee
124 *> \author Univ. of California Berkeley
125 *> \author Univ. of Colorado Denver
128 *> \date November 2011
130 *> \ingroup complex16GEcomputational
132 * =====================================================================
133 SUBROUTINE ZGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
136 * -- LAPACK computational routine (version 3.2) --
137 * -- LAPACK is a software package provided by Univ. of Tennessee, --
138 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
141 * .. Scalar Arguments ..
143 INTEGER IHI, ILO, INFO, LDV, M, N
145 * .. Array Arguments ..
146 DOUBLE PRECISION SCALE( * )
147 COMPLEX*16 V( LDV, * )
150 * =====================================================================
154 PARAMETER ( ONE = 1.0D+0 )
156 * .. Local Scalars ..
157 LOGICAL LEFTV, RIGHTV
161 * .. External Functions ..
165 * .. External Subroutines ..
166 EXTERNAL XERBLA, ZDSCAL, ZSWAP
168 * .. Intrinsic Functions ..
171 * .. Executable Statements ..
173 * Decode and Test the input parameters
175 RIGHTV = LSAME( SIDE, 'R' )
176 LEFTV = LSAME( SIDE, 'L' )
179 IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND.
180 $ .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN
182 ELSE IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN
184 ELSE IF( N.LT.0 ) THEN
186 ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN
188 ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN
190 ELSE IF( M.LT.0 ) THEN
192 ELSE IF( LDV.LT.MAX( 1, N ) ) THEN
196 CALL XERBLA( 'ZGEBAK', -INFO )
200 * Quick return if possible
206 IF( LSAME( JOB, 'N' ) )
214 IF( LSAME( JOB, 'S' ) .OR. LSAME( JOB, 'B' ) ) THEN
219 CALL ZDSCAL( M, S, V( I, 1 ), LDV )
226 CALL ZDSCAL( M, S, V( I, 1 ), LDV )
232 * Backward permutation
234 * For I = ILO-1 step -1 until 1,
235 * IHI+1 step 1 until N do --
238 IF( LSAME( JOB, 'P' ) .OR. LSAME( JOB, 'B' ) ) THEN
242 IF( I.GE.ILO .AND. I.LE.IHI )
249 CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV )
256 IF( I.GE.ILO .AND. I.LE.IHI )
263 CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV )