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