annotate liboctave/CMatrix.h @ 3573:6ae6f1180e62

[project @ 2000-02-04 09:01:59 by jwe]
author jwe
date Fri, 04 Feb 2000 09:02:04 +0000
parents 5eef8a2294bd
children 2923f52d8fda
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
1 /*
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
2
2847
8b262e771614 [project @ 1997-03-27 16:18:26 by jwe]
jwe
parents: 2832
diff changeset
3 Copyright (C) 1996, 1997 John W. Eaton
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
4
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
6
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
10 later version.
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
11
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
15 for more details.
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
16
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
18 along with Octave; see the file COPYING. If not, write to the Free
1315
611d403c7f3d [project @ 1995-06-25 19:56:32 by jwe]
jwe
parents: 1296
diff changeset
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
20
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
21 */
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
22
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
23 #if !defined (octave_ComplexMatrix_h)
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
24 #define octave_ComplexMatrix_h 1
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
25
1296
f93b7fa5e113 [project @ 1995-05-01 18:30:08 by jwe]
jwe
parents: 1214
diff changeset
26 #if defined (__GNUG__)
f93b7fa5e113 [project @ 1995-05-01 18:30:08 by jwe]
jwe
parents: 1214
diff changeset
27 #pragma interface
f93b7fa5e113 [project @ 1995-05-01 18:30:08 by jwe]
jwe
parents: 1214
diff changeset
28 #endif
f93b7fa5e113 [project @ 1995-05-01 18:30:08 by jwe]
jwe
parents: 1214
diff changeset
29
1989
a4b0826e240c [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents: 1963
diff changeset
30 #include "MArray2.h"
a4b0826e240c [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents: 1963
diff changeset
31 #include "MDiagArray2.h"
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
32
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
33 #include "mx-defs.h"
2870
3241d0057e78 [project @ 1997-04-19 01:21:29 by jwe]
jwe
parents: 2847
diff changeset
34 #include "mx-op-defs.h"
1650
23aa282707e8 [project @ 1995-12-20 06:53:12 by jwe]
jwe
parents: 1574
diff changeset
35 #include "oct-cmplx.h"
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
36
1214
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
37 class ComplexMatrix : public MArray2<Complex>
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
38 {
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
39 public:
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
40
3480
45742a3b1f7c [project @ 2000-01-26 06:16:41 by jwe]
jwe
parents: 3248
diff changeset
41 typedef void (*solve_singularity_handler) (double rcond);
45742a3b1f7c [project @ 2000-01-26 06:16:41 by jwe]
jwe
parents: 3248
diff changeset
42
1214
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
43 ComplexMatrix (void) : MArray2<Complex> () { }
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
44 ComplexMatrix (int r, int c) : MArray2<Complex> (r, c) { }
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
45 ComplexMatrix (int r, int c, const Complex& val)
1214
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
46 : MArray2<Complex> (r, c, val) { }
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
47 ComplexMatrix (const Matrix& a);
1214
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
48 ComplexMatrix (const MArray2<Complex>& a) : MArray2<Complex> (a) { }
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
49 ComplexMatrix (const ComplexMatrix& a) : MArray2<Complex> (a) { }
2349
b369227ce3d2 [project @ 1996-07-27 07:59:20 by jwe]
jwe
parents: 1993
diff changeset
50 ComplexMatrix (const RowVector& rv);
b369227ce3d2 [project @ 1996-07-27 07:59:20 by jwe]
jwe
parents: 1993
diff changeset
51 ComplexMatrix (const ColumnVector& cv);
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
52 ComplexMatrix (const DiagMatrix& a);
1989
a4b0826e240c [project @ 1996-03-02 00:33:22 by jwe]
jwe
parents: 1963
diff changeset
53 // ComplexMatrix (const MDiagArray2<Complex>& a) : MArray2<Complex> (a) { }
2349
b369227ce3d2 [project @ 1996-07-27 07:59:20 by jwe]
jwe
parents: 1993
diff changeset
54 ComplexMatrix (const ComplexRowVector& rv);
b369227ce3d2 [project @ 1996-07-27 07:59:20 by jwe]
jwe
parents: 1993
diff changeset
55 ComplexMatrix (const ComplexColumnVector& cv);
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
56 ComplexMatrix (const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
57
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents: 2815
diff changeset
58 ComplexMatrix (const boolMatrix& a);
1574
dd7d27461567 [project @ 1995-10-19 04:34:20 by jwe]
jwe
parents: 1361
diff changeset
59 ComplexMatrix (const charMatrix& a);
dd7d27461567 [project @ 1995-10-19 04:34:20 by jwe]
jwe
parents: 1361
diff changeset
60
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
61 ComplexMatrix& operator = (const ComplexMatrix& a)
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
62 {
1214
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
63 MArray2<Complex>::operator = (a);
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
64 return *this;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
65 }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
66
2384
d9147efd1a93 [project @ 1996-10-12 17:56:38 by jwe]
jwe
parents: 2354
diff changeset
67 bool operator == (const ComplexMatrix& a) const;
d9147efd1a93 [project @ 1996-10-12 17:56:38 by jwe]
jwe
parents: 2354
diff changeset
68 bool operator != (const ComplexMatrix& a) const;
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
69
2815
33486d9e2d00 [project @ 1997-03-14 08:24:46 by jwe]
jwe
parents: 2676
diff changeset
70 bool is_hermitian (void) const;
33486d9e2d00 [project @ 1997-03-14 08:24:46 by jwe]
jwe
parents: 2676
diff changeset
71
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
72 // destructive insert/delete/reorder operations
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
73
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
74 ComplexMatrix& insert (const Matrix& a, int r, int c);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
75 ComplexMatrix& insert (const RowVector& a, int r, int c);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
76 ComplexMatrix& insert (const ColumnVector& a, int r, int c);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
77 ComplexMatrix& insert (const DiagMatrix& a, int r, int c);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
78
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
79 ComplexMatrix& insert (const ComplexMatrix& a, int r, int c);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
80 ComplexMatrix& insert (const ComplexRowVector& a, int r, int c);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
81 ComplexMatrix& insert (const ComplexColumnVector& a, int r, int c);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
82 ComplexMatrix& insert (const ComplexDiagMatrix& a, int r, int c);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
83
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
84 ComplexMatrix& fill (double val);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
85 ComplexMatrix& fill (const Complex& val);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
86 ComplexMatrix& fill (double val, int r1, int c1, int r2, int c2);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
87 ComplexMatrix& fill (const Complex& val, int r1, int c1, int r2, int c2);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
88
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
89 ComplexMatrix append (const Matrix& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
90 ComplexMatrix append (const RowVector& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
91 ComplexMatrix append (const ColumnVector& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
92 ComplexMatrix append (const DiagMatrix& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
93
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
94 ComplexMatrix append (const ComplexMatrix& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
95 ComplexMatrix append (const ComplexRowVector& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
96 ComplexMatrix append (const ComplexColumnVector& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
97 ComplexMatrix append (const ComplexDiagMatrix& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
98
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
99 ComplexMatrix stack (const Matrix& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
100 ComplexMatrix stack (const RowVector& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
101 ComplexMatrix stack (const ColumnVector& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
102 ComplexMatrix stack (const DiagMatrix& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
103
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
104 ComplexMatrix stack (const ComplexMatrix& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
105 ComplexMatrix stack (const ComplexRowVector& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
106 ComplexMatrix stack (const ComplexColumnVector& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
107 ComplexMatrix stack (const ComplexDiagMatrix& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
108
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
109 ComplexMatrix hermitian (void) const; // complex conjugate transpose
3225
7aae2c3636a7 [project @ 1998-12-04 23:20:12 by jwe]
jwe
parents: 2964
diff changeset
110 ComplexMatrix transpose (void) const
7aae2c3636a7 [project @ 1998-12-04 23:20:12 by jwe]
jwe
parents: 2964
diff changeset
111 { return MArray2<Complex>::transpose (); }
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
112
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
113 friend ComplexMatrix conj (const ComplexMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
114
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
115 // resize is the destructive equivalent for this one
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
116
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
117 ComplexMatrix extract (int r1, int c1, int r2, int c2) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
118
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
119 // extract row or column i.
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
120
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
121 ComplexRowVector row (int i) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
122 ComplexRowVector row (char *s) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
123
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
124 ComplexColumnVector column (int i) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
125 ComplexColumnVector column (char *s) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
126
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
127 ComplexMatrix inverse (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
128 ComplexMatrix inverse (int& info) const;
1656
5a8ad3d12304 [project @ 1995-12-20 10:58:39 by jwe]
jwe
parents: 1650
diff changeset
129 ComplexMatrix inverse (int& info, double& rcond, int force = 0) const;
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
130
740
d8295febb0df [project @ 1994-09-30 14:42:37 by jwe]
jwe
parents: 677
diff changeset
131 ComplexMatrix pseudo_inverse (double tol = 0.0);
d8295febb0df [project @ 1994-09-30 14:42:37 by jwe]
jwe
parents: 677
diff changeset
132
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
133 ComplexMatrix fourier (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
134 ComplexMatrix ifourier (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
135
677
01da6806197b [project @ 1994-09-08 04:43:13 by jwe]
jwe
parents: 536
diff changeset
136 ComplexMatrix fourier2d (void) const;
01da6806197b [project @ 1994-09-08 04:43:13 by jwe]
jwe
parents: 536
diff changeset
137 ComplexMatrix ifourier2d (void) const;
01da6806197b [project @ 1994-09-08 04:43:13 by jwe]
jwe
parents: 536
diff changeset
138
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
139 ComplexDET determinant (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
140 ComplexDET determinant (int& info) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
141 ComplexDET determinant (int& info, double& rcond) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
142
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
143 ComplexMatrix solve (const Matrix& b) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
144 ComplexMatrix solve (const Matrix& b, int& info) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
145 ComplexMatrix solve (const Matrix& b, int& info, double& rcond) const;
3480
45742a3b1f7c [project @ 2000-01-26 06:16:41 by jwe]
jwe
parents: 3248
diff changeset
146 ComplexMatrix solve (const Matrix& b, int& info, double& rcond,
45742a3b1f7c [project @ 2000-01-26 06:16:41 by jwe]
jwe
parents: 3248
diff changeset
147 solve_singularity_handler sing_handler) const;
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
148
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
149 ComplexMatrix solve (const ComplexMatrix& b) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
150 ComplexMatrix solve (const ComplexMatrix& b, int& info) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
151 ComplexMatrix solve (const ComplexMatrix& b, int& info, double& rcond) const;
3480
45742a3b1f7c [project @ 2000-01-26 06:16:41 by jwe]
jwe
parents: 3248
diff changeset
152 ComplexMatrix solve (const ComplexMatrix& b, int& info, double& rcond,
45742a3b1f7c [project @ 2000-01-26 06:16:41 by jwe]
jwe
parents: 3248
diff changeset
153 solve_singularity_handler sing_handler) const;
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
154
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
155 ComplexColumnVector solve (const ComplexColumnVector& b) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
156 ComplexColumnVector solve (const ComplexColumnVector& b, int& info) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
157 ComplexColumnVector solve (const ComplexColumnVector& b, int& info,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
158 double& rcond) const;
3480
45742a3b1f7c [project @ 2000-01-26 06:16:41 by jwe]
jwe
parents: 3248
diff changeset
159 ComplexColumnVector solve (const ComplexColumnVector& b, int& info,
45742a3b1f7c [project @ 2000-01-26 06:16:41 by jwe]
jwe
parents: 3248
diff changeset
160 double& rcond,
45742a3b1f7c [project @ 2000-01-26 06:16:41 by jwe]
jwe
parents: 3248
diff changeset
161 solve_singularity_handler sing_handler) const;
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
162
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
163 ComplexMatrix lssolve (const ComplexMatrix& b) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
164 ComplexMatrix lssolve (const ComplexMatrix& b, int& info) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
165 ComplexMatrix lssolve (const ComplexMatrix& b, int& info,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
166 int& rank) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
167
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
168 ComplexColumnVector lssolve (const ComplexColumnVector& b) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
169 ComplexColumnVector lssolve (const ComplexColumnVector& b, int& info) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
170 ComplexColumnVector lssolve (const ComplexColumnVector& b, int& info,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
171 int& rank) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
172
1819
8b8498bf8ec5 [project @ 1996-01-31 11:29:17 by jwe]
jwe
parents: 1656
diff changeset
173 ComplexMatrix expm (void) const;
8b8498bf8ec5 [project @ 1996-01-31 11:29:17 by jwe]
jwe
parents: 1656
diff changeset
174
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
175 // column vector by row vector -> matrix operations
1205
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1011
diff changeset
176
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1011
diff changeset
177 friend ComplexMatrix operator * (const ColumnVector& a,
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1011
diff changeset
178 const ComplexRowVector& b);
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1011
diff changeset
179
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1011
diff changeset
180 friend ComplexMatrix operator * (const ComplexColumnVector& a,
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1011
diff changeset
181 const RowVector& b);
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1011
diff changeset
182
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1011
diff changeset
183 friend ComplexMatrix operator * (const ComplexColumnVector& a,
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1011
diff changeset
184 const ComplexRowVector& b);
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1011
diff changeset
185
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
186 // matrix by diagonal matrix -> matrix operations
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
187
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
188 ComplexMatrix& operator += (const DiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
189 ComplexMatrix& operator -= (const DiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
190
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
191 ComplexMatrix& operator += (const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
192 ComplexMatrix& operator -= (const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
193
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
194 // matrix by matrix -> matrix operations
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
195
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
196 ComplexMatrix& operator += (const Matrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
197 ComplexMatrix& operator -= (const Matrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
198
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
199 ComplexMatrix& operator += (const ComplexMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
200 ComplexMatrix& operator -= (const ComplexMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
201
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
202 // unary operations
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
203
2964
0a2551ec7004 [project @ 1997-05-12 07:26:50 by jwe]
jwe
parents: 2870
diff changeset
204 boolMatrix operator ! (void) const;
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
205
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
206 // other operations
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
207
2676
a5a300c61159 [project @ 1997-02-14 03:16:06 by jwe]
jwe
parents: 2408
diff changeset
208 ComplexMatrix map (c_c_Mapper f) const;
a5a300c61159 [project @ 1997-02-14 03:16:06 by jwe]
jwe
parents: 2408
diff changeset
209 Matrix map (d_c_Mapper f) const;
3248
68259f410026 [project @ 1999-07-13 03:34:54 by jwe]
jwe
parents: 3225
diff changeset
210 boolMatrix map (b_c_Mapper f) const;
2676
a5a300c61159 [project @ 1997-02-14 03:16:06 by jwe]
jwe
parents: 2408
diff changeset
211
a5a300c61159 [project @ 1997-02-14 03:16:06 by jwe]
jwe
parents: 2408
diff changeset
212 ComplexMatrix& apply (c_c_Mapper f);
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
213
2384
d9147efd1a93 [project @ 1996-10-12 17:56:38 by jwe]
jwe
parents: 2354
diff changeset
214 bool any_element_is_inf_or_nan (void) const;
2408
e22aae3ccfad [project @ 1996-10-15 16:37:52 by jwe]
jwe
parents: 2384
diff changeset
215 bool all_elements_are_real (void) const;
2384
d9147efd1a93 [project @ 1996-10-12 17:56:38 by jwe]
jwe
parents: 2354
diff changeset
216 bool all_integers (double& max_val, double& min_val) const;
d9147efd1a93 [project @ 1996-10-12 17:56:38 by jwe]
jwe
parents: 2354
diff changeset
217 bool too_large_for_float (void) const;
1963
665a44bb6a56 [project @ 1996-02-16 04:34:40 by jwe]
jwe
parents: 1882
diff changeset
218
2832
4dff308e9acc [project @ 1997-03-26 05:16:58 by jwe]
jwe
parents: 2828
diff changeset
219 boolMatrix all (void) const;
4dff308e9acc [project @ 1997-03-26 05:16:58 by jwe]
jwe
parents: 2828
diff changeset
220 boolMatrix any (void) const;
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
221
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
222 ComplexMatrix cumprod (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
223 ComplexMatrix cumsum (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
224 ComplexMatrix prod (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
225 ComplexMatrix sum (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
226 ComplexMatrix sumsq (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
227
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
228 ComplexColumnVector diag (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
229 ComplexColumnVector diag (int k) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
230
2354
2ce6e1ec9b53 [project @ 1996-08-20 22:44:25 by jwe]
jwe
parents: 2349
diff changeset
231 bool row_is_real_only (int) const;
2ce6e1ec9b53 [project @ 1996-08-20 22:44:25 by jwe]
jwe
parents: 2349
diff changeset
232 bool column_is_real_only (int) const;
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
233
2354
2ce6e1ec9b53 [project @ 1996-08-20 22:44:25 by jwe]
jwe
parents: 2349
diff changeset
234 ComplexColumnVector row_min (void) const;
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
235 ComplexColumnVector row_max (void) const;
2354
2ce6e1ec9b53 [project @ 1996-08-20 22:44:25 by jwe]
jwe
parents: 2349
diff changeset
236
2ce6e1ec9b53 [project @ 1996-08-20 22:44:25 by jwe]
jwe
parents: 2349
diff changeset
237 ComplexColumnVector row_min (Array<int>& index) const;
2ce6e1ec9b53 [project @ 1996-08-20 22:44:25 by jwe]
jwe
parents: 2349
diff changeset
238 ComplexColumnVector row_max (Array<int>& index) const;
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
239
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
240 ComplexRowVector column_min (void) const;
2354
2ce6e1ec9b53 [project @ 1996-08-20 22:44:25 by jwe]
jwe
parents: 2349
diff changeset
241 ComplexRowVector column_max (void) const;
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
242
2354
2ce6e1ec9b53 [project @ 1996-08-20 22:44:25 by jwe]
jwe
parents: 2349
diff changeset
243 ComplexRowVector column_min (Array<int>& index) const;
2ce6e1ec9b53 [project @ 1996-08-20 22:44:25 by jwe]
jwe
parents: 2349
diff changeset
244 ComplexRowVector column_max (Array<int>& index) const;
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
245
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
246 // i/o
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
247
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 3480
diff changeset
248 friend std::ostream& operator << (std::ostream& os, const ComplexMatrix& a);
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 3480
diff changeset
249 friend std::istream& operator >> (std::istream& is, ComplexMatrix& a);
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
250
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
251 private:
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
252
1214
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
253 ComplexMatrix (Complex *d, int r, int c) : MArray2<Complex> (d, r, c) { }
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
254 };
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
255
1819
8b8498bf8ec5 [project @ 1996-01-31 11:29:17 by jwe]
jwe
parents: 1656
diff changeset
256 ComplexMatrix Givens (const Complex&, const Complex&);
8b8498bf8ec5 [project @ 1996-01-31 11:29:17 by jwe]
jwe
parents: 1656
diff changeset
257
8b8498bf8ec5 [project @ 1996-01-31 11:29:17 by jwe]
jwe
parents: 1656
diff changeset
258 ComplexMatrix Sylvester (const ComplexMatrix&, const ComplexMatrix&,
8b8498bf8ec5 [project @ 1996-01-31 11:29:17 by jwe]
jwe
parents: 1656
diff changeset
259 const ComplexMatrix&);
8b8498bf8ec5 [project @ 1996-01-31 11:29:17 by jwe]
jwe
parents: 1656
diff changeset
260
2828
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents: 2815
diff changeset
261 extern ComplexMatrix operator * (const Matrix&, const ComplexMatrix&);
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents: 2815
diff changeset
262 extern ComplexMatrix operator * (const ComplexMatrix&, const Matrix&);
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents: 2815
diff changeset
263 extern ComplexMatrix operator * (const ComplexMatrix&, const ComplexMatrix&);
92826d6e8bd9 [project @ 1997-03-25 23:41:41 by jwe]
jwe
parents: 2815
diff changeset
264
2870
3241d0057e78 [project @ 1997-04-19 01:21:29 by jwe]
jwe
parents: 2847
diff changeset
265 MS_CMP_OP_DECLS (ComplexMatrix, Complex)
3241d0057e78 [project @ 1997-04-19 01:21:29 by jwe]
jwe
parents: 2847
diff changeset
266 MS_BOOL_OP_DECLS (ComplexMatrix, Complex)
3241d0057e78 [project @ 1997-04-19 01:21:29 by jwe]
jwe
parents: 2847
diff changeset
267
3241d0057e78 [project @ 1997-04-19 01:21:29 by jwe]
jwe
parents: 2847
diff changeset
268 SM_CMP_OP_DECLS (Complex, ComplexMatrix)
3241d0057e78 [project @ 1997-04-19 01:21:29 by jwe]
jwe
parents: 2847
diff changeset
269 SM_BOOL_OP_DECLS (Complex, ComplexMatrix)
3241d0057e78 [project @ 1997-04-19 01:21:29 by jwe]
jwe
parents: 2847
diff changeset
270
3241d0057e78 [project @ 1997-04-19 01:21:29 by jwe]
jwe
parents: 2847
diff changeset
271 MM_CMP_OP_DECLS (ComplexMatrix, ComplexMatrix)
3241d0057e78 [project @ 1997-04-19 01:21:29 by jwe]
jwe
parents: 2847
diff changeset
272 MM_BOOL_OP_DECLS (ComplexMatrix, ComplexMatrix)
3241d0057e78 [project @ 1997-04-19 01:21:29 by jwe]
jwe
parents: 2847
diff changeset
273
3573
6ae6f1180e62 [project @ 2000-02-04 09:01:59 by jwe]
jwe
parents: 3504
diff changeset
274 MARRAY_FORWARD_DEFS (MArray2, ComplexMatrix, Complex)
6ae6f1180e62 [project @ 2000-02-04 09:01:59 by jwe]
jwe
parents: 3504
diff changeset
275
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
276 #endif
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
277
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
278 /*
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
279 ;;; Local Variables: ***
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
280 ;;; mode: C++ ***
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
281 ;;; End: ***
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
282 */