comparison liboctave/CmplxAEPBAL.cc @ 1253:bb67a902760b

[project @ 1995-04-11 16:35:23 by jwe]
author jwe
date Tue, 11 Apr 1995 16:35:23 +0000
parents 97eac19837dc
children f93b7fa5e113
comparison
equal deleted inserted replaced
1252:ccb22498f289 1253:bb67a902760b
29 #include "dMatrix.h" 29 #include "dMatrix.h"
30 #include "f77-uscore.h" 30 #include "f77-uscore.h"
31 31
32 extern "C" 32 extern "C"
33 { 33 {
34 int F77_FCN (zgebal) (const char*, const int&, Complex*, const int&, 34 int F77_FCN (zgebal, ZGEBAL) (const char*, const int&, Complex*,
35 int&, int&, double*, int&, long, long); 35 const int&, int&, int&, double*, int&,
36 long, long);
36 37
37 int F77_FCN (zgebak) (const char*, const char*, const int&, const int&, 38 int F77_FCN (zgebak, ZGEBAK) (const char*, const char*, const int&,
38 const int&, double*, const int&, Complex*, 39 const int&, const int&, double*, const
39 const int&, int&, long, long); 40 int&, Complex*, const int&, int&,
41 long, long);
40 } 42 }
41 43
42 int 44 int
43 ComplexAEPBALANCE::init (const ComplexMatrix& a, const char *balance_job) 45 ComplexAEPBALANCE::init (const ComplexMatrix& a, const char *balance_job)
44 { 46 {
54 56
55 // Copy matrix into local structure. 57 // Copy matrix into local structure.
56 58
57 balanced_mat = a; 59 balanced_mat = a;
58 60
59 F77_FCN (zgebal) (balance_job, n, balanced_mat.fortran_vec (), 61 F77_FCN (zgebal, ZGEBAL) (balance_job, n,
60 n, ilo, ihi, scale, info, 1L, 1L); 62 balanced_mat.fortran_vec (), n, ilo, ihi,
63 scale, info, 1L, 1L);
61 64
62 // Initialize balancing matrix to identity. 65 // Initialize balancing matrix to identity.
63 66
64 balancing_mat = Matrix (n, n, 0.0); 67 balancing_mat = Matrix (n, n, 0.0);
65 for (int i = 0; i < n; i++) 68 for (int i = 0; i < n; i++)
66 balancing_mat (i, i) = 1.0; 69 balancing_mat (i, i) = 1.0;
67 70
68 F77_FCN (zgebak) (balance_job, "R", n, ilo, ihi, scale, n, 71 F77_FCN (zgebak, ZGEBAK) (balance_job, "R", n, ilo, ihi, scale, n,
69 balancing_mat.fortran_vec (), n, info, 1L, 1L); 72 balancing_mat.fortran_vec (), n, info, 1L,
73 1L);
70 74
71 delete [] scale; 75 delete [] scale;
72 76
73 return info; 77 return info;
74 } 78 }