Debian Codegraph @

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

raw
1 subroutine eltran(nm,n,low,igh,a,int,z)
2 c
3 integer i,j,n,kl,mm,mp,nm,igh,low,mp1
4 double precision a(nm,igh),z(nm,n)
5 integer int(igh)
6 c
7 c this subroutine is a translation of the algol procedure elmtrans,
8 c num. math. 16, 181-204(1970) by peters and wilkinson.
9 c handbook for auto. comp., vol.ii-linear algebra, 372-395(1971).
10 c
11 c this subroutine accumulates the stabilized elementary
12 c similarity transformations used in the reduction of a
13 c real general matrix to upper hessenberg form by elmhes.
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 the balancing
24 c subroutine balanc. if balanc has not been used,
25 c set low=1, igh=n.
26 c
27 c a contains the multipliers which were used in the
28 c reduction by elmhes in its lower triangle
29 c below the subdiagonal.
30 c
31 c int contains information on the rows and columns
32 c interchanged in the reduction by elmhes.
33 c only elements low through igh are used.
34 c
35 c on output
36 c
37 c z contains the transformation matrix produced in the
38 c reduction by elmhes.
39 c
40 c questions and comments should be directed to burton s. garbow,
41 c mathematics and computer science div, argonne national laboratory
42 c
43 c this version dated august 1983.
44 c
45 c ------------------------------------------------------------------
46 c
47 c .......... initialize z to identity matrix ..........
48 do 80 j = 1, n
49 c
50 do 60 i = 1, n
51 60 z(i,j) = 0.0d0
52 c
53 z(j,j) = 1.0d0
54 80 continue
55 c
56 kl = igh - low - 1
57 if (kl .lt. 1) go to 200
58 c .......... for mp=igh-1 step -1 until low+1 do -- ..........
59 do 140 mm = 1, kl
60 mp = igh - mm
61 mp1 = mp + 1
62 c
63 do 100 i = mp1, igh
64 100 z(i,mp) = a(i,mp-1)
65 c
66 i = int(mp)
67 if (i .eq. mp) go to 140
68 c
69 do 130 j = mp, igh
70 z(mp,j) = z(i,j)
71 z(i,j) = 0.0d0
72 130 continue
73 c
74 z(i,mp) = 1.0d0
75 140 continue
76 c
77 200 return
78 end