Mercurial > hg > octave-lyh
annotate liboctave/CMatrix.h @ 7922:935be827eaf8
error for NaN values in & and | expressions
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 11 Jul 2008 14:56:30 -0400 |
parents | 5861b95e9879 |
children | 64cf956a109c |
rev | line source |
---|---|
458 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, |
4 2004, 2005, 2006, 2007 John W. Eaton | |
458 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
458 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
458 | 21 |
22 */ | |
23 | |
24 #if !defined (octave_ComplexMatrix_h) | |
25 #define octave_ComplexMatrix_h 1 | |
26 | |
1989 | 27 #include "MArray2.h" |
28 #include "MDiagArray2.h" | |
5785 | 29 #include "MatrixType.h" |
458 | 30 |
31 #include "mx-defs.h" | |
2870 | 32 #include "mx-op-defs.h" |
1650 | 33 #include "oct-cmplx.h" |
458 | 34 |
3585 | 35 class |
6108 | 36 OCTAVE_API |
3585 | 37 ComplexMatrix : public MArray2<Complex> |
458 | 38 { |
39 public: | |
40 | |
7788 | 41 typedef void (*solve_singularity_handler) (double rcon); |
3480 | 42 |
1214 | 43 ComplexMatrix (void) : MArray2<Complex> () { } |
3585 | 44 |
5275 | 45 ComplexMatrix (octave_idx_type r, octave_idx_type c) : MArray2<Complex> (r, c) { } |
3585 | 46 |
5275 | 47 ComplexMatrix (octave_idx_type r, octave_idx_type c, const Complex& val) |
1214 | 48 : MArray2<Complex> (r, c, val) { } |
3585 | 49 |
6979 | 50 ComplexMatrix (const dim_vector& dv) : MArray2<Complex> (dv) { } |
51 | |
52 ComplexMatrix (const dim_vector& dv, const Complex& val) | |
53 : MArray2<Complex> (dv, val) { } | |
54 | |
1214 | 55 ComplexMatrix (const ComplexMatrix& a) : MArray2<Complex> (a) { } |
3585 | 56 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7788
diff
changeset
|
57 template <class U> |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7788
diff
changeset
|
58 ComplexMatrix (const MArray2<U>& a) : MArray2<Complex> (a) { } |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7788
diff
changeset
|
59 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7788
diff
changeset
|
60 template <class U> |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7788
diff
changeset
|
61 ComplexMatrix (const Array2<U>& a) : MArray2<Complex> (a) { } |
3585 | 62 |
63 explicit ComplexMatrix (const Matrix& a); | |
64 | |
65 explicit ComplexMatrix (const RowVector& rv); | |
66 | |
67 explicit ComplexMatrix (const ColumnVector& cv); | |
458 | 68 |
3585 | 69 explicit ComplexMatrix (const DiagMatrix& a); |
70 | |
71 explicit ComplexMatrix (const ComplexRowVector& rv); | |
72 | |
73 explicit ComplexMatrix (const ComplexColumnVector& cv); | |
74 | |
75 explicit ComplexMatrix (const ComplexDiagMatrix& a); | |
76 | |
77 explicit ComplexMatrix (const boolMatrix& a); | |
78 | |
79 explicit ComplexMatrix (const charMatrix& a); | |
1574 | 80 |
458 | 81 ComplexMatrix& operator = (const ComplexMatrix& a) |
82 { | |
1214 | 83 MArray2<Complex>::operator = (a); |
458 | 84 return *this; |
85 } | |
86 | |
2384 | 87 bool operator == (const ComplexMatrix& a) const; |
88 bool operator != (const ComplexMatrix& a) const; | |
458 | 89 |
2815 | 90 bool is_hermitian (void) const; |
91 | |
1359 | 92 // destructive insert/delete/reorder operations |
458 | 93 |
5275 | 94 ComplexMatrix& insert (const Matrix& a, octave_idx_type r, octave_idx_type c); |
95 ComplexMatrix& insert (const RowVector& a, octave_idx_type r, octave_idx_type c); | |
96 ComplexMatrix& insert (const ColumnVector& a, octave_idx_type r, octave_idx_type c); | |
97 ComplexMatrix& insert (const DiagMatrix& a, octave_idx_type r, octave_idx_type c); | |
458 | 98 |
5275 | 99 ComplexMatrix& insert (const ComplexMatrix& a, octave_idx_type r, octave_idx_type c); |
100 ComplexMatrix& insert (const ComplexRowVector& a, octave_idx_type r, octave_idx_type c); | |
101 ComplexMatrix& insert (const ComplexColumnVector& a, octave_idx_type r, octave_idx_type c); | |
102 ComplexMatrix& insert (const ComplexDiagMatrix& a, octave_idx_type r, octave_idx_type c); | |
458 | 103 |
104 ComplexMatrix& fill (double val); | |
105 ComplexMatrix& fill (const Complex& val); | |
5275 | 106 ComplexMatrix& fill (double val, octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2); |
107 ComplexMatrix& fill (const Complex& val, octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2); | |
458 | 108 |
109 ComplexMatrix append (const Matrix& a) const; | |
110 ComplexMatrix append (const RowVector& a) const; | |
111 ComplexMatrix append (const ColumnVector& a) const; | |
112 ComplexMatrix append (const DiagMatrix& a) const; | |
113 | |
114 ComplexMatrix append (const ComplexMatrix& a) const; | |
115 ComplexMatrix append (const ComplexRowVector& a) const; | |
116 ComplexMatrix append (const ComplexColumnVector& a) const; | |
117 ComplexMatrix append (const ComplexDiagMatrix& a) const; | |
118 | |
119 ComplexMatrix stack (const Matrix& a) const; | |
120 ComplexMatrix stack (const RowVector& a) const; | |
121 ComplexMatrix stack (const ColumnVector& a) const; | |
122 ComplexMatrix stack (const DiagMatrix& a) const; | |
123 | |
124 ComplexMatrix stack (const ComplexMatrix& a) const; | |
125 ComplexMatrix stack (const ComplexRowVector& a) const; | |
126 ComplexMatrix stack (const ComplexColumnVector& a) const; | |
127 ComplexMatrix stack (const ComplexDiagMatrix& a) const; | |
128 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7788
diff
changeset
|
129 ComplexMatrix hermitian (void) const |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7788
diff
changeset
|
130 { return MArray2<Complex>::hermitian (std::conj); } |
3225 | 131 ComplexMatrix transpose (void) const |
132 { return MArray2<Complex>::transpose (); } | |
458 | 133 |
134 friend ComplexMatrix conj (const ComplexMatrix& a); | |
135 | |
1359 | 136 // resize is the destructive equivalent for this one |
458 | 137 |
5275 | 138 ComplexMatrix extract (octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2) const; |
458 | 139 |
5275 | 140 ComplexMatrix extract_n (octave_idx_type r1, octave_idx_type c1, octave_idx_type nr, octave_idx_type nc) const; |
4316 | 141 |
1359 | 142 // extract row or column i. |
458 | 143 |
5275 | 144 ComplexRowVector row (octave_idx_type i) const; |
458 | 145 |
5275 | 146 ComplexColumnVector column (octave_idx_type i) const; |
458 | 147 |
6207 | 148 private: |
149 ComplexMatrix tinverse (MatrixType &mattype, octave_idx_type& info, | |
7788 | 150 double& rcon, int force, int calc_cond) const; |
6207 | 151 |
152 ComplexMatrix finverse (MatrixType &mattype, octave_idx_type& info, | |
7788 | 153 double& rcon, int force, int calc_cond) const; |
6207 | 154 |
155 public: | |
458 | 156 ComplexMatrix inverse (void) const; |
6479 | 157 ComplexMatrix inverse (octave_idx_type& info) const; |
7788 | 158 ComplexMatrix inverse (octave_idx_type& info, double& rcon, int force = 0, |
6479 | 159 int calc_cond = 1) const; |
160 | |
6207 | 161 ComplexMatrix inverse (MatrixType &mattype) const; |
162 ComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info) const; | |
163 ComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info, | |
7788 | 164 double& rcon, int force = 0, |
4329 | 165 int calc_cond = 1) const; |
458 | 166 |
4384 | 167 ComplexMatrix pseudo_inverse (double tol = 0.0) const; |
740 | 168 |
458 | 169 ComplexMatrix fourier (void) const; |
170 ComplexMatrix ifourier (void) const; | |
171 | |
677 | 172 ComplexMatrix fourier2d (void) const; |
173 ComplexMatrix ifourier2d (void) const; | |
174 | |
458 | 175 ComplexDET determinant (void) const; |
5275 | 176 ComplexDET determinant (octave_idx_type& info) const; |
7788 | 177 ComplexDET determinant (octave_idx_type& info, double& rcon, int calc_cond = 1) const; |
178 | |
179 double rcond (void) const; | |
180 double rcond (MatrixType &mattype) const; | |
458 | 181 |
5785 | 182 private: |
183 // Upper triangular matrix solvers | |
184 ComplexMatrix utsolve (MatrixType &typ, const ComplexMatrix& b, | |
7788 | 185 octave_idx_type& info, double& rcon, |
5785 | 186 solve_singularity_handler sing_handler, |
187 bool calc_cond = false) const; | |
188 | |
189 // Lower triangular matrix solvers | |
190 ComplexMatrix ltsolve (MatrixType &typ, const ComplexMatrix& b, | |
7788 | 191 octave_idx_type& info, double& rcon, |
5785 | 192 solve_singularity_handler sing_handler, |
193 bool calc_cond = false) const; | |
194 | |
195 // Full matrix solvers (umfpack/cholesky) | |
196 ComplexMatrix fsolve (MatrixType &typ, const ComplexMatrix& b, | |
7788 | 197 octave_idx_type& info, double& rcon, |
5785 | 198 solve_singularity_handler sing_handler, |
199 bool calc_cond = false) const; | |
200 | |
201 public: | |
202 // Generic interface to solver with no probing of type | |
203 ComplexMatrix solve (MatrixType &typ, const Matrix& b) const; | |
204 ComplexMatrix solve (MatrixType &typ, const Matrix& b, | |
205 octave_idx_type& info) const; | |
206 ComplexMatrix solve (MatrixType &typ, const Matrix& b, | |
7788 | 207 octave_idx_type& info, double& rcon) const; |
5785 | 208 ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
7788 | 209 double& rcon, solve_singularity_handler sing_handler, |
5785 | 210 bool singular_fallback = true) const; |
211 | |
212 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b) const; | |
213 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, | |
214 octave_idx_type& info) const; | |
215 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, | |
7788 | 216 octave_idx_type& info, double& rcon) const; |
5785 | 217 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, |
7788 | 218 octave_idx_type& info, double& rcon, |
5785 | 219 solve_singularity_handler sing_handler, |
220 bool singular_fallback = true) const; | |
221 | |
222 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b) const; | |
223 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, | |
224 octave_idx_type& info) const; | |
225 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, | |
7788 | 226 octave_idx_type& info, double& rcon) const; |
5785 | 227 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, |
7788 | 228 octave_idx_type& info, double& rcon, |
5785 | 229 solve_singularity_handler sing_handler) const; |
230 | |
231 ComplexColumnVector solve (MatrixType &typ, | |
232 const ComplexColumnVector& b) const; | |
233 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, | |
234 octave_idx_type& info) const; | |
235 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, | |
7788 | 236 octave_idx_type& info, double& rcon) const; |
5785 | 237 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, |
7788 | 238 octave_idx_type& info, double& rcon, |
5785 | 239 solve_singularity_handler sing_handler) const; |
240 | |
241 // Generic interface to solver with probing of type | |
458 | 242 ComplexMatrix solve (const Matrix& b) const; |
5275 | 243 ComplexMatrix solve (const Matrix& b, octave_idx_type& info) const; |
7788 | 244 ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcon) const; |
245 ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcon, | |
3480 | 246 solve_singularity_handler sing_handler) const; |
458 | 247 |
248 ComplexMatrix solve (const ComplexMatrix& b) const; | |
5275 | 249 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const; |
7788 | 250 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, double& rcon) const; |
251 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, double& rcon, | |
3480 | 252 solve_singularity_handler sing_handler) const; |
458 | 253 |
3585 | 254 ComplexColumnVector solve (const ColumnVector& b) const; |
5275 | 255 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info) const; |
256 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, | |
7788 | 257 double& rcon) const; |
258 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, double& rcon, | |
3585 | 259 solve_singularity_handler sing_handler) const; |
260 | |
458 | 261 ComplexColumnVector solve (const ComplexColumnVector& b) const; |
5275 | 262 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info) const; |
263 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, | |
7788 | 264 double& rcon) const; |
5275 | 265 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, |
7788 | 266 double& rcon, |
3480 | 267 solve_singularity_handler sing_handler) const; |
458 | 268 |
3585 | 269 ComplexMatrix lssolve (const Matrix& b) const; |
5275 | 270 ComplexMatrix lssolve (const Matrix& b, octave_idx_type& info) const; |
7076 | 271 ComplexMatrix lssolve (const Matrix& b, octave_idx_type& info, |
272 octave_idx_type& rank) const; | |
273 ComplexMatrix lssolve (const Matrix& b, octave_idx_type& info, | |
7788 | 274 octave_idx_type& rank, double& rcon) const; |
3585 | 275 |
458 | 276 ComplexMatrix lssolve (const ComplexMatrix& b) const; |
5275 | 277 ComplexMatrix lssolve (const ComplexMatrix& b, octave_idx_type& info) const; |
278 ComplexMatrix lssolve (const ComplexMatrix& b, octave_idx_type& info, | |
279 octave_idx_type& rank) const; | |
7076 | 280 ComplexMatrix lssolve (const ComplexMatrix& b, octave_idx_type& info, |
7788 | 281 octave_idx_type& rank, double& rcon) const; |
458 | 282 |
3585 | 283 ComplexColumnVector lssolve (const ColumnVector& b) const; |
7076 | 284 ComplexColumnVector lssolve (const ColumnVector& b, |
285 octave_idx_type& info) const; | |
5275 | 286 ComplexColumnVector lssolve (const ColumnVector& b, octave_idx_type& info, |
287 octave_idx_type& rank) const; | |
7076 | 288 ComplexColumnVector lssolve (const ColumnVector& b, octave_idx_type& info, |
7788 | 289 octave_idx_type& rank, double& rcon) const; |
3585 | 290 |
458 | 291 ComplexColumnVector lssolve (const ComplexColumnVector& b) const; |
7076 | 292 ComplexColumnVector lssolve (const ComplexColumnVector& b, |
293 octave_idx_type& info) const; | |
294 ComplexColumnVector lssolve (const ComplexColumnVector& b, | |
295 octave_idx_type& info, | |
5275 | 296 octave_idx_type& rank) const; |
7076 | 297 ComplexColumnVector lssolve (const ComplexColumnVector& b, |
298 octave_idx_type& info, | |
7788 | 299 octave_idx_type& rank, double& rcon) const; |
458 | 300 |
1819 | 301 ComplexMatrix expm (void) const; |
302 | |
1359 | 303 // matrix by diagonal matrix -> matrix operations |
458 | 304 |
305 ComplexMatrix& operator += (const DiagMatrix& a); | |
306 ComplexMatrix& operator -= (const DiagMatrix& a); | |
307 | |
308 ComplexMatrix& operator += (const ComplexDiagMatrix& a); | |
309 ComplexMatrix& operator -= (const ComplexDiagMatrix& a); | |
310 | |
1359 | 311 // matrix by matrix -> matrix operations |
458 | 312 |
313 ComplexMatrix& operator += (const Matrix& a); | |
314 ComplexMatrix& operator -= (const Matrix& a); | |
315 | |
1359 | 316 // unary operations |
458 | 317 |
2964 | 318 boolMatrix operator ! (void) const; |
458 | 319 |
1359 | 320 // other operations |
458 | 321 |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7076
diff
changeset
|
322 typedef double (*dmapper) (const Complex&); |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7076
diff
changeset
|
323 typedef Complex (*cmapper) (const Complex&); |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7076
diff
changeset
|
324 typedef bool (*bmapper) (const Complex&); |
2676 | 325 |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7076
diff
changeset
|
326 Matrix map (dmapper fcn) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7076
diff
changeset
|
327 ComplexMatrix map (cmapper fcn) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7076
diff
changeset
|
328 boolMatrix map (bmapper fcn) const; |
458 | 329 |
7922
935be827eaf8
error for NaN values in & and | expressions
John W. Eaton <jwe@octave.org>
parents:
7800
diff
changeset
|
330 bool any_element_is_nan (void) const; |
2384 | 331 bool any_element_is_inf_or_nan (void) const; |
2408 | 332 bool all_elements_are_real (void) const; |
2384 | 333 bool all_integers (double& max_val, double& min_val) const; |
334 bool too_large_for_float (void) const; | |
1963 | 335 |
4017 | 336 boolMatrix all (int dim = -1) const; |
337 boolMatrix any (int dim = -1) const; | |
458 | 338 |
4017 | 339 ComplexMatrix cumprod (int dim = -1) const; |
340 ComplexMatrix cumsum (int dim = -1) const; | |
341 ComplexMatrix prod (int dim = -1) const; | |
342 ComplexMatrix sum (int dim = -1) const; | |
343 ComplexMatrix sumsq (int dim = -1) const; | |
4329 | 344 Matrix abs (void) const; |
458 | 345 |
7620
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7503
diff
changeset
|
346 ComplexMatrix diag (octave_idx_type k = 0) const; |
458 | 347 |
5275 | 348 bool row_is_real_only (octave_idx_type) const; |
349 bool column_is_real_only (octave_idx_type) const; | |
458 | 350 |
2354 | 351 ComplexColumnVector row_min (void) const; |
458 | 352 ComplexColumnVector row_max (void) const; |
2354 | 353 |
5275 | 354 ComplexColumnVector row_min (Array<octave_idx_type>& index) const; |
355 ComplexColumnVector row_max (Array<octave_idx_type>& index) const; | |
458 | 356 |
357 ComplexRowVector column_min (void) const; | |
2354 | 358 ComplexRowVector column_max (void) const; |
458 | 359 |
5275 | 360 ComplexRowVector column_min (Array<octave_idx_type>& index) const; |
361 ComplexRowVector column_max (Array<octave_idx_type>& index) const; | |
458 | 362 |
1359 | 363 // i/o |
458 | 364 |
6108 | 365 friend OCTAVE_API std::ostream& operator << (std::ostream& os, const ComplexMatrix& a); |
366 friend OCTAVE_API std::istream& operator >> (std::istream& is, ComplexMatrix& a); | |
458 | 367 |
3933 | 368 static Complex resize_fill_value (void) { return Complex (0.0, 0.0); } |
369 | |
458 | 370 private: |
371 | |
5275 | 372 ComplexMatrix (Complex *d, octave_idx_type r, octave_idx_type c) : MArray2<Complex> (d, r, c) { } |
458 | 373 }; |
374 | |
5508 | 375 // column vector by row vector -> matrix operations |
376 | |
6108 | 377 extern OCTAVE_API ComplexMatrix |
5508 | 378 operator * (const ColumnVector& a, const ComplexRowVector& b); |
379 | |
6108 | 380 extern OCTAVE_API ComplexMatrix |
5508 | 381 operator * (const ComplexColumnVector& a, const RowVector& b); |
1819 | 382 |
6108 | 383 extern OCTAVE_API ComplexMatrix |
5508 | 384 operator * (const ComplexColumnVector& a, const ComplexRowVector& b); |
385 | |
6108 | 386 extern OCTAVE_API ComplexMatrix |
5508 | 387 Givens (const Complex&, const Complex&); |
388 | |
6108 | 389 extern OCTAVE_API ComplexMatrix |
5508 | 390 Sylvester (const ComplexMatrix&, const ComplexMatrix&, const ComplexMatrix&); |
1819 | 391 |
7800
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
392 extern OCTAVE_API ComplexMatrix |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
393 xgemm (bool transa, bool conja, const ComplexMatrix& a, |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
394 bool transb, bool conjb, const ComplexMatrix& b); |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
395 |
6108 | 396 extern OCTAVE_API ComplexMatrix operator * (const Matrix&, const ComplexMatrix&); |
397 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&, const Matrix&); | |
398 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&, const ComplexMatrix&); | |
2828 | 399 |
6108 | 400 extern OCTAVE_API ComplexMatrix min (const Complex& c, const ComplexMatrix& m); |
401 extern OCTAVE_API ComplexMatrix min (const ComplexMatrix& m, const Complex& c); | |
402 extern OCTAVE_API ComplexMatrix min (const ComplexMatrix& a, const ComplexMatrix& b); | |
4309 | 403 |
6108 | 404 extern OCTAVE_API ComplexMatrix max (const Complex& c, const ComplexMatrix& m); |
405 extern OCTAVE_API ComplexMatrix max (const ComplexMatrix& m, const Complex& c); | |
406 extern OCTAVE_API ComplexMatrix max (const ComplexMatrix& a, const ComplexMatrix& b); | |
4309 | 407 |
6708 | 408 MS_CMP_OP_DECLS (ComplexMatrix, Complex, OCTAVE_API) |
409 MS_BOOL_OP_DECLS (ComplexMatrix, Complex, OCTAVE_API) | |
2870 | 410 |
6708 | 411 SM_CMP_OP_DECLS (Complex, ComplexMatrix, OCTAVE_API) |
412 SM_BOOL_OP_DECLS (Complex, ComplexMatrix, OCTAVE_API) | |
2870 | 413 |
6708 | 414 MM_CMP_OP_DECLS (ComplexMatrix, ComplexMatrix, OCTAVE_API) |
415 MM_BOOL_OP_DECLS (ComplexMatrix, ComplexMatrix, OCTAVE_API) | |
2870 | 416 |
3573 | 417 MARRAY_FORWARD_DEFS (MArray2, ComplexMatrix, Complex) |
418 | |
458 | 419 #endif |
420 | |
421 /* | |
422 ;;; Local Variables: *** | |
423 ;;; mode: C++ *** | |
424 ;;; End: *** | |
425 */ |