annotate src/qzval.cc @ 712:36ba0576bd1b

[project @ 1994-09-19 14:18:15 by jwe]
author jwe
date Mon, 19 Sep 1994 14:18:48 +0000
parents 0a81458ef677
children e81d3a66725e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
519
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 516
diff changeset
1 // f-qzval.cc -*- C++ -*-
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
2 /*
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
3
453
393e95f46b51 [project @ 1994-06-06 00:05:20 by jwe]
jwe
parents: 240
diff changeset
4 Copyright (C) 1993, 1994 John W. Eaton
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
5
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
6 This file is part of Octave.
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
7
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
8 Octave is free software; you can redistribute it and/or modify it
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
10 Free Software Foundation; either version 2, or (at your option) any
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
11 later version.
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
12
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
13 Octave is distributed in the hope that it will be useful, but WITHOUT
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
16 for more details.
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
17
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
19 along with Octave; see the file COPYING. If not, write to the Free
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
21
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
22 */
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
23
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
24 // Written by A. S. Hodel <scotte@eng.auburn.edu>
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
25
240
a99f28f5e351 [project @ 1993-11-30 20:24:36 by jwe]
jwe
parents: 234
diff changeset
26 #ifdef HAVE_CONFIG_H
a99f28f5e351 [project @ 1993-11-30 20:24:36 by jwe]
jwe
parents: 234
diff changeset
27 #include "config.h"
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
28 #endif
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
29
112
3438ee77fea2 [project @ 1993-09-17 06:11:35 by jwe]
jwe
parents: 99
diff changeset
30 #include <float.h>
3438ee77fea2 [project @ 1993-09-17 06:11:35 by jwe]
jwe
parents: 99
diff changeset
31
453
393e95f46b51 [project @ 1994-06-06 00:05:20 by jwe]
jwe
parents: 240
diff changeset
32 #include "dMatrix.h"
393e95f46b51 [project @ 1994-06-06 00:05:20 by jwe]
jwe
parents: 240
diff changeset
33 #include "dColVector.h"
393e95f46b51 [project @ 1994-06-06 00:05:20 by jwe]
jwe
parents: 240
diff changeset
34 #include "CColVector.h"
234
a366eb563bf2 [project @ 1993-11-16 11:10:08 by jwe]
jwe
parents: 162
diff changeset
35 #include "f77-uscore.h"
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
36
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
37 #include "tree-const.h"
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
38 #include "user-prefs.h"
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
39 #include "gripes.h"
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
40 #include "error.h"
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
41 #include "utils.h"
544
20fbad23ae51 [project @ 1994-07-22 05:04:44 by jwe]
jwe
parents: 519
diff changeset
42 #include "help.h"
519
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 516
diff changeset
43 #include "defun-dld.h"
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
44
47
ed620db95182 [project @ 1993-08-10 23:02:53 by jwe]
jwe
parents: 44
diff changeset
45 extern "C"
ed620db95182 [project @ 1993-08-10 23:02:53 by jwe]
jwe
parents: 44
diff changeset
46 {
ed620db95182 [project @ 1993-08-10 23:02:53 by jwe]
jwe
parents: 44
diff changeset
47 int F77_FCN (qzhes) (const int*, const int*, double*, double*, const
ed620db95182 [project @ 1993-08-10 23:02:53 by jwe]
jwe
parents: 44
diff changeset
48 long*, double*);
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
49
47
ed620db95182 [project @ 1993-08-10 23:02:53 by jwe]
jwe
parents: 44
diff changeset
50 int F77_FCN (qzit) (const int*, const int*, double*, double*, const
ed620db95182 [project @ 1993-08-10 23:02:53 by jwe]
jwe
parents: 44
diff changeset
51 double*, const long*, double*, int*);
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
52
47
ed620db95182 [project @ 1993-08-10 23:02:53 by jwe]
jwe
parents: 44
diff changeset
53 int F77_FCN (qzval) (const int*, const int*, double*, double*,
ed620db95182 [project @ 1993-08-10 23:02:53 by jwe]
jwe
parents: 44
diff changeset
54 double*, double*, double*, const long*, double*);
ed620db95182 [project @ 1993-08-10 23:02:53 by jwe]
jwe
parents: 44
diff changeset
55 }
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
56
701
0a81458ef677 [project @ 1994-09-15 02:23:24 by jwe]
jwe
parents: 636
diff changeset
57 DEFUN_DLD_BUILTIN ("qzvalue", Fqzvalue, Sqzvalue, 3, 1,
519
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 516
diff changeset
58 "X = qzval (A, B)\n\
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 516
diff changeset
59 \n\
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 516
diff changeset
60 compute generalized eigenvalues of the matrix pencil (A - lambda B).\n\
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 516
diff changeset
61 A and B must be real matrices.")
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
62 {
497
88614b380d6e [project @ 1994-07-08 02:00:57 by jwe]
jwe
parents: 453
diff changeset
63 Octave_object retval;
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
64
712
36ba0576bd1b [project @ 1994-09-19 14:18:15 by jwe]
jwe
parents: 701
diff changeset
65 int nargin = args.length ();
36ba0576bd1b [project @ 1994-09-19 14:18:15 by jwe]
jwe
parents: 701
diff changeset
66
36ba0576bd1b [project @ 1994-09-19 14:18:15 by jwe]
jwe
parents: 701
diff changeset
67 if (nargin != 2 || nargout > 1)
519
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 516
diff changeset
68 {
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 516
diff changeset
69 print_usage ("qzvalue");
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 516
diff changeset
70 return retval;
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 516
diff changeset
71 }
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 516
diff changeset
72
712
36ba0576bd1b [project @ 1994-09-19 14:18:15 by jwe]
jwe
parents: 701
diff changeset
73 tree_constant arg_a = args(0);
36ba0576bd1b [project @ 1994-09-19 14:18:15 by jwe]
jwe
parents: 701
diff changeset
74 tree_constant arg_b = args(1);
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
75
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
76 int a_nr = arg_a.rows();
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
77 int a_nc = arg_a.columns();
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
78
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
79 int b_nr = arg_b.rows();
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
80 int b_nc = arg_b.columns();
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
81
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
82 if (empty_arg ("qzvalue", a_nr, a_nc) < 0
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
83 || empty_arg ("qzvalue", b_nr, b_nc) < 0)
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
84 return retval;
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
85
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
86 // Arguments are not empty, so check for correct dimensions.
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
87
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
88 if (a_nr != a_nc || b_nr != b_nc)
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
89 {
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
90 gripe_square_matrix_required ("qzvalue: first two parameters:");
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
91 return retval;
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
92 }
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
93
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
94 if (a_nr != b_nr)
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
95 {
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
96 gripe_nonconformant ();
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
97 return retval;
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
98 }
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
99
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
100 // Dimensions look o.k., let's solve the problem.
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
101
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
102 if (arg_a.is_complex_type () || arg_b.is_complex_type ())
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
103 {
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
104 error ("qzvalue: cannot yet do complex matrix arguments\n");
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
105 return retval;
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
106 }
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
107
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
108 // Do everything in real arithmetic.
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
109
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
110 Matrix jnk (a_nr, a_nr, 0.0);
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
111
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
112 ColumnVector alfr (a_nr);
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
113 ColumnVector alfi (a_nr);
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
114 ColumnVector beta (a_nr);
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
115
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
116 long matz = 0;
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
117 int info;
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
118
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
119 // XXX FIXME ??? XXX
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
120 double eps = DBL_EPSILON;
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
121
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
122 Matrix ca = arg_a.matrix_value ();
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
123
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
124 if (error_state)
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
125 return retval;
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
126
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
127 Matrix cb = arg_b.matrix_value ();
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
128
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
129 if (error_state)
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
130 return retval;
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
131
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
132 // Use EISPACK qz functions.
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
133
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
134 F77_FCN (qzhes) (&a_nr, &a_nr, ca.fortran_vec (),
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
135 cb.fortran_vec (), &matz, jnk.fortran_vec ());
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
136
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
137 F77_FCN (qzit) (&a_nr, &a_nr, ca.fortran_vec (),
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
138 cb.fortran_vec (), &eps, &matz,
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
139 jnk.fortran_vec (), &info);
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
140
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
141 if (info)
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
142 error ("qzvalue: trouble in qzit, info = %d", info);
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
143
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
144 F77_FCN (qzval) (&a_nr, &a_nr, ca.fortran_vec (),
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
145 cb.fortran_vec (), alfr.fortran_vec (),
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
146 alfi.fortran_vec (), beta.fortran_vec (),
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
147 &matz, jnk.fortran_vec ());
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
148
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
149 // Count and extract finite generalized eigenvalues.
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
150
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
151 int i;
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
152 int cnt = 0;
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
153
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
154 Complex Im (0, 1);
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
155
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
156 for (i = 0; i < a_nr; i++)
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
157 if (beta (i) != 0)
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
158 cnt++;
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
159
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
160 ComplexColumnVector cx (cnt, 0.0);
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
161
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
162 for (i = 0; i < a_nr; i++)
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
163 {
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
164 if (beta (i) != 0)
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
165 {
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
166
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
167 // Finite generalized eigenvalue.
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
168
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
169 cnt--;
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
170 cx (cnt) = (alfr (i) + Im * alfi (i)) / beta (i);
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
171 }
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
172 }
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
173
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
174 retval = cx;
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
175
44
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
176 return retval;
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
177 }
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
178
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
179 /*
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
180 ;;; Local Variables: ***
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
181 ;;; mode: C++ ***
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
182 ;;; page-delimiter: "^/\\*" ***
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
183 ;;; End: ***
f3215b07c171 [project @ 1993-08-10 22:33:20 by jwe]
jwe
parents:
diff changeset
184 */