1CGEBAL(1) LAPACK routine (version 3.2) CGEBAL(1)
2
3
4
6 CGEBAL - balances a general complex matrix A
7
9 SUBROUTINE CGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
10
11 CHARACTER JOB
12
13 INTEGER IHI, ILO, INFO, LDA, N
14
15 REAL SCALE( * )
16
17 COMPLEX A( LDA, * )
18
20 CGEBAL balances a general complex matrix A. This involves, first, per‐
21 muting A by a similarity transformation to isolate eigenvalues in the
22 first 1 to ILO-1 and last IHI+1 to N elements on the diagonal; and sec‐
23 ond, applying a diagonal similarity transformation to rows and columns
24 ILO to IHI to make the rows and columns as close in norm as possible.
25 Both steps are optional.
26 Balancing may reduce the 1-norm of the matrix, and improve the accuracy
27 of the computed eigenvalues and/or eigenvectors.
28
30 JOB (input) CHARACTER*1
31 Specifies the operations to be performed on A:
32 = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0 for
33 i = 1,...,N; = 'P': permute only;
34 = 'S': scale only;
35 = 'B': both permute and scale.
36
37 N (input) INTEGER
38 The order of the matrix A. N >= 0.
39
40 A (input/output) COMPLEX array, dimension (LDA,N)
41 On entry, the input matrix A. On exit, A is overwritten by
42 the balanced matrix. If JOB = 'N', A is not referenced. See
43 Further Details. LDA (input) INTEGER The leading dimension
44 of the array A. LDA >= max(1,N).
45
46 ILO (output) INTEGER
47 IHI (output) INTEGER ILO and IHI are set to integers such
48 that on exit A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I =
49 IHI+1,...,N. If JOB = 'N' or 'S', ILO = 1 and IHI = N.
50
51 SCALE (output) REAL array, dimension (N)
52 Details of the permutations and scaling factors applied to A.
53 If P(j) is the index of the row and column interchanged with
54 row and column j and D(j) is the scaling factor applied to row
55 and column j, then SCALE(j) = P(j) for j = 1,...,ILO-1 =
56 D(j) for j = ILO,...,IHI = P(j) for j = IHI+1,...,N. The
57 order in which the interchanges are made is N to IHI+1, then 1
58 to ILO-1.
59
60 INFO (output) INTEGER
61 = 0: successful exit.
62 < 0: if INFO = -i, the i-th argument had an illegal value.
63
65 The permutations consist of row and column interchanges which put the
66 matrix in the form
67 ( T1 X Y )
68 P A P = ( 0 B Z )
69 ( 0 0 T2 )
70 where T1 and T2 are upper triangular matrices whose eigenvalues lie
71 along the diagonal. The column indices ILO and IHI mark the starting
72 and ending columns of the submatrix B. Balancing consists of applying a
73 diagonal similarity transformation inv(D) * B * D to make the 1-norms
74 of each row of B and its corresponding column nearly equal. The output
75 matrix is
76 ( T1 X*D Y )
77 ( 0 inv(D)*B*D inv(D)*Z ).
78 ( 0 0 T2 )
79 Information about the permutations P and the diagonal matrix D is
80 returned in the vector SCALE.
81 This subroutine is based on the EISPACK routine CBAL.
82 Modified by Tzu-Yi Chen, Computer Science Division, University of
83 California at Berkeley, USA
84
85
86
87 LAPACK routine (version 3.2) November 2008 CGEBAL(1)