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