Debian Codegraph @

Modules/ThirdParty/VNL/src/vxl/v3p/netlib/eispack/balbak.f

raw
1 subroutine balbak(nm,n,low,igh,scale,m,z)
2 c
3 integer i,j,k,m,n,ii,nm,igh,low
4 double precision scale(n),z(nm,m)
5 double precision s
6 c
7 c this subroutine is a translation of the algol procedure balbak,
8 c num. math. 13, 293-304(1969) by parlett and reinsch.
9 c handbook for auto. comp., vol.ii-linear algebra, 315-326(1971).
10 c
11 c this subroutine forms the eigenvectors of a real general
12 c matrix by back transforming those of the corresponding
13 c balanced matrix determined by balanc.
14 c
15 c on input
16 c
17 c nm must be set to the row dimension of two-dimensional
18 c array parameters as declared in the calling program
19 c dimension statement.
20 c
21 c n is the order of the matrix.
22 c
23 c low and igh are integers determined by balanc.
24 c
25 c scale contains information determining the permutations
26 c and scaling factors used by balanc.
27 c
28 c m is the number of columns of z to be back transformed.
29 c
30 c z contains the real and imaginary parts of the eigen-
31 c vectors to be back transformed in its first m columns.
32 c
33 c on output
34 c
35 c z contains the real and imaginary parts of the
36 c transformed eigenvectors in its first m columns.
37 c
38 c questions and comments should be directed to burton s. garbow,
39 c mathematics and computer science div, argonne national laboratory
40 c
41 c this version dated august 1983.
42 c
43 c ------------------------------------------------------------------
44 c
45 if (m .eq. 0) go to 200
46 if (igh .eq. low) go to 120
47 c
48 do 110 i = low, igh
49 s = scale(i)
50 c .......... left hand eigenvectors are back transformed
51 c if the foregoing statement is replaced by
52 c s=1.0d0/scale(i). ..........
53 do 100 j = 1, m
54 100 z(i,j) = z(i,j) * s
55 c
56 110 continue
57 c ......... for i=low-1 step -1 until 1,
58 c igh+1 step 1 until n do -- ..........
59 120 do 140 ii = 1, n
60 i = ii
61 if (i .ge. low .and. i .le. igh) go to 140
62 if (i .lt. low) i = low - ii
63 k = scale(i)
64 if (k .eq. i) go to 140
65 c
66 do 130 j = 1, m
67 s = z(i,j)
68 z(i,j) = z(k,j)
69 z(k,j) = s
70 130 continue
71 c
72 140 continue
73 c
74 200 return
75 end