5164
|
1 /* |
|
2 |
|
3 Copyright (C) 2004 David Bateman |
7016
|
4 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Andy Adler |
|
5 |
|
6 This file is part of Octave. |
5164
|
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. |
5164
|
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/>. |
5164
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_CSparse_h) |
|
25 #define octave_CSparse_h 1 |
|
26 |
|
27 #include "dMatrix.h" |
|
28 #include "dNDArray.h" |
|
29 #include "CNDArray.h" |
|
30 #include "dColVector.h" |
|
31 #include "CColVector.h" |
|
32 #include "oct-cmplx.h" |
|
33 |
|
34 #include "CmplxDET.h" |
|
35 #include "MSparse.h" |
|
36 #include "MSparse-defs.h" |
|
37 #include "Sparse-op-defs.h" |
5785
|
38 #include "MatrixType.h" |
5164
|
39 |
|
40 class SparseMatrix; |
|
41 class SparseBoolMatrix; |
|
42 |
|
43 class |
6108
|
44 OCTAVE_API |
5164
|
45 SparseComplexMatrix : public MSparse<Complex> |
|
46 { |
|
47 public: |
|
48 |
|
49 typedef void (*solve_singularity_handler) (double rcond); |
|
50 |
|
51 SparseComplexMatrix (void) : MSparse<Complex> () { } |
|
52 |
5275
|
53 SparseComplexMatrix (octave_idx_type r, octave_idx_type c) : MSparse<Complex> (r, c) { } |
5164
|
54 |
6823
|
55 SparseComplexMatrix (const dim_vector& dv, octave_idx_type nz = 0) : |
|
56 MSparse<Complex> (dv, nz) { } |
|
57 |
5275
|
58 explicit SparseComplexMatrix (octave_idx_type r, octave_idx_type c, Complex val) |
5164
|
59 : MSparse<Complex> (r, c, val) { } |
|
60 |
5275
|
61 SparseComplexMatrix (octave_idx_type r, octave_idx_type c, double val) |
5164
|
62 : MSparse<Complex> (r, c, Complex (val)) { } |
|
63 |
|
64 SparseComplexMatrix (const SparseComplexMatrix& a) |
|
65 : MSparse<Complex> (a) { } |
|
66 |
|
67 SparseComplexMatrix (const SparseComplexMatrix& a, const dim_vector& dv) |
|
68 : MSparse<Complex> (a, dv) { } |
|
69 |
|
70 SparseComplexMatrix (const MSparse<Complex>& a) : MSparse<Complex> (a) { } |
|
71 |
|
72 explicit SparseComplexMatrix (const ComplexMatrix& a) |
|
73 : MSparse<Complex> (a) { } |
|
74 |
|
75 explicit SparseComplexMatrix (const ComplexNDArray& a) |
|
76 : MSparse<Complex> (a) { } |
|
77 |
5275
|
78 explicit SparseComplexMatrix (const Array<Complex> a, const Array<octave_idx_type>& r, |
|
79 const Array<octave_idx_type>& c, octave_idx_type nr = -1, |
|
80 octave_idx_type nc = -1, bool sum_terms = true) |
5164
|
81 : MSparse<Complex> (a, r, c, nr, nc, sum_terms) { } |
|
82 |
|
83 explicit SparseComplexMatrix (const Array<Complex> a, |
|
84 const Array<double>& r, |
5275
|
85 const Array<double>& c, octave_idx_type nr = -1, |
|
86 octave_idx_type nc = -1, bool sum_terms = true) |
5164
|
87 : MSparse<Complex> (a, r, c, nr, nc, sum_terms) { } |
|
88 |
|
89 explicit SparseComplexMatrix (const SparseMatrix& a); |
|
90 |
|
91 explicit SparseComplexMatrix (const SparseBoolMatrix& a); |
|
92 |
5275
|
93 SparseComplexMatrix (octave_idx_type r, octave_idx_type c, octave_idx_type num_nz) |
5164
|
94 : MSparse<Complex> (r, c, num_nz) { } |
|
95 |
|
96 SparseComplexMatrix& operator = (const SparseComplexMatrix& a) |
|
97 { |
|
98 MSparse<Complex>::operator = (a); |
|
99 return *this; |
|
100 } |
|
101 |
|
102 bool operator == (const SparseComplexMatrix& a) const; |
|
103 bool operator != (const SparseComplexMatrix& a) const; |
|
104 |
|
105 bool is_hermitian (void) const; |
|
106 |
|
107 SparseComplexMatrix max (int dim = 0) const; |
5275
|
108 SparseComplexMatrix max (Array2<octave_idx_type>& index, int dim = 0) const; |
5164
|
109 SparseComplexMatrix min (int dim = 0) const; |
5275
|
110 SparseComplexMatrix min (Array2<octave_idx_type>& index, int dim = 0) const; |
5164
|
111 |
5275
|
112 SparseComplexMatrix& insert (const SparseComplexMatrix& a, octave_idx_type r, octave_idx_type c); |
|
113 SparseComplexMatrix& insert (const SparseMatrix& a, octave_idx_type r, octave_idx_type c); |
6823
|
114 SparseComplexMatrix& insert (const SparseComplexMatrix& a, const Array<octave_idx_type>& indx); |
|
115 SparseComplexMatrix& insert (const SparseMatrix& a, const Array<octave_idx_type>& indx); |
5164
|
116 |
|
117 SparseComplexMatrix concat (const SparseComplexMatrix& rb, |
5275
|
118 const Array<octave_idx_type>& ra_idx); |
5164
|
119 SparseComplexMatrix concat (const SparseMatrix& rb, |
5275
|
120 const Array<octave_idx_type>& ra_idx); |
5164
|
121 |
|
122 ComplexMatrix matrix_value (void) const; |
|
123 |
|
124 SparseComplexMatrix hermitian (void) const; // complex conjugate transpose |
|
125 SparseComplexMatrix transpose (void) const |
|
126 { return MSparse<Complex>::transpose (); } |
|
127 |
|
128 friend SparseComplexMatrix conj (const SparseComplexMatrix& a); |
|
129 |
5506
|
130 private: |
5785
|
131 SparseComplexMatrix dinverse (MatrixType &mattyp, octave_idx_type& info, |
5506
|
132 double& rcond, const bool force = false, |
|
133 const bool calccond = true) const; |
|
134 |
5785
|
135 SparseComplexMatrix tinverse (MatrixType &mattyp, octave_idx_type& info, |
5506
|
136 double& rcond, const bool force = false, |
|
137 const bool calccond = true) const; |
|
138 |
|
139 public: |
5164
|
140 SparseComplexMatrix inverse (void) const; |
5785
|
141 SparseComplexMatrix inverse (MatrixType& mattype) const; |
|
142 SparseComplexMatrix inverse (MatrixType& mattype, |
5506
|
143 octave_idx_type& info) const; |
5785
|
144 SparseComplexMatrix inverse (MatrixType& mattype, octave_idx_type& info, |
5506
|
145 double& rcond, int force = 0, |
5164
|
146 int calc_cond = 1) const; |
|
147 |
|
148 ComplexDET determinant (void) const; |
5275
|
149 ComplexDET determinant (octave_idx_type& info) const; |
|
150 ComplexDET determinant (octave_idx_type& info, double& rcond, |
5164
|
151 int calc_cond = 1) const; |
|
152 |
|
153 private: |
|
154 // Diagonal matrix solvers |
5785
|
155 ComplexMatrix dsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
5681
|
156 double& rcond, solve_singularity_handler sing_handler, |
|
157 bool calc_cond = false) const; |
5164
|
158 |
5785
|
159 ComplexMatrix dsolve (MatrixType &typ, const ComplexMatrix& b, |
5681
|
160 octave_idx_type& info, double& rcond, |
|
161 solve_singularity_handler sing_handler, |
|
162 bool calc_cond = false) const; |
5164
|
163 |
5785
|
164 SparseComplexMatrix dsolve (MatrixType &typ, const SparseMatrix& b, |
5681
|
165 octave_idx_type& info, double& rcond, |
|
166 solve_singularity_handler sing_handler, |
|
167 bool calc_cond = false) const; |
5164
|
168 |
5785
|
169 SparseComplexMatrix dsolve (MatrixType &typ, const SparseComplexMatrix& b, |
5275
|
170 octave_idx_type& info, double& rcond, |
5681
|
171 solve_singularity_handler sing_handler, |
|
172 bool calc_cond = false) const; |
5164
|
173 |
|
174 // Upper triangular matrix solvers |
5785
|
175 ComplexMatrix utsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
5681
|
176 double& rcond, solve_singularity_handler sing_handler, |
|
177 bool calc_cond = false) const; |
5164
|
178 |
5785
|
179 ComplexMatrix utsolve (MatrixType &typ, const ComplexMatrix& b, |
5681
|
180 octave_idx_type& info, double& rcond, |
|
181 solve_singularity_handler sing_handler, |
|
182 bool calc_cond = false) const; |
5164
|
183 |
5785
|
184 SparseComplexMatrix utsolve (MatrixType &typ, const SparseMatrix& b, |
5681
|
185 octave_idx_type& info, double& rcond, |
|
186 solve_singularity_handler sing_handler, |
|
187 bool calc_cond = false) const; |
5164
|
188 |
5785
|
189 SparseComplexMatrix utsolve (MatrixType &typ, const SparseComplexMatrix& b, |
5275
|
190 octave_idx_type& info, double& rcond, |
5681
|
191 solve_singularity_handler sing_handler, |
|
192 bool calc_cond = false) const; |
5164
|
193 |
|
194 // Lower triangular matrix solvers |
5785
|
195 ComplexMatrix ltsolve (MatrixType &typ, const Matrix& b, |
5681
|
196 octave_idx_type& info, double& rcond, |
|
197 solve_singularity_handler sing_handler, |
|
198 bool calc_cond = false) const; |
5164
|
199 |
5785
|
200 ComplexMatrix ltsolve (MatrixType &typ, const ComplexMatrix& b, |
5681
|
201 octave_idx_type& info, double& rcond, |
|
202 solve_singularity_handler sing_handler, |
|
203 bool calc_cond = false) const; |
5164
|
204 |
5785
|
205 SparseComplexMatrix ltsolve (MatrixType &typ, const SparseMatrix& b, |
5681
|
206 octave_idx_type& info, double& rcond, |
|
207 solve_singularity_handler sing_handler, |
|
208 bool calc_cond = false) const; |
5164
|
209 |
5785
|
210 SparseComplexMatrix ltsolve (MatrixType &typ, const SparseComplexMatrix& b, |
5275
|
211 octave_idx_type& info, double& rcond, |
5681
|
212 solve_singularity_handler sing_handler, |
|
213 bool calc_cond = false) const; |
5164
|
214 |
|
215 // Tridiagonal matrix solvers |
5785
|
216 ComplexMatrix trisolve (MatrixType &typ, const Matrix& b, |
5681
|
217 octave_idx_type& info, double& rcond, |
|
218 solve_singularity_handler sing_handler, |
|
219 bool calc_cond = false) const; |
5164
|
220 |
5785
|
221 ComplexMatrix trisolve (MatrixType &typ, const ComplexMatrix& b, |
5681
|
222 octave_idx_type& info, double& rcond, |
|
223 solve_singularity_handler sing_handler, |
|
224 bool calc_cond = false) const; |
5164
|
225 |
5785
|
226 SparseComplexMatrix trisolve (MatrixType &typ, const SparseMatrix& b, |
5681
|
227 octave_idx_type& info, double& rcond, |
|
228 solve_singularity_handler sing_handler, |
|
229 bool calc_cond = false) const; |
5164
|
230 |
5785
|
231 SparseComplexMatrix trisolve (MatrixType &typ, const SparseComplexMatrix& b, |
5275
|
232 octave_idx_type& info, double& rcond, |
5681
|
233 solve_singularity_handler sing_handler, |
|
234 bool calc_cond = false) const; |
5164
|
235 |
|
236 // Banded matrix solvers (umfpack/cholesky) |
5785
|
237 ComplexMatrix bsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
5681
|
238 double& rcond, solve_singularity_handler sing_handler, |
|
239 bool calc_cond = false) const; |
5164
|
240 |
5785
|
241 ComplexMatrix bsolve (MatrixType &typ, const ComplexMatrix& b, |
5681
|
242 octave_idx_type& info, double& rcond, |
|
243 solve_singularity_handler sing_handler, |
|
244 bool calc_cond = false) const; |
5164
|
245 |
5785
|
246 SparseComplexMatrix bsolve (MatrixType &typ, const SparseMatrix& b, |
5681
|
247 octave_idx_type& info, double& rcond, |
|
248 solve_singularity_handler sing_handler, |
|
249 bool calc_cond = false) const; |
5164
|
250 |
5785
|
251 SparseComplexMatrix bsolve (MatrixType &typ, const SparseComplexMatrix& b, |
5275
|
252 octave_idx_type& info, double& rcond, |
5681
|
253 solve_singularity_handler sing_handler, |
|
254 bool calc_cond = false) const; |
5164
|
255 |
|
256 // Full matrix solvers (umfpack/cholesky) |
5681
|
257 void * factorize (octave_idx_type& err, double &rcond, Matrix &Control, |
|
258 Matrix &Info, solve_singularity_handler sing_handler, |
|
259 bool calc_cond) const; |
5164
|
260 |
5785
|
261 ComplexMatrix fsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
5681
|
262 double& rcond, solve_singularity_handler sing_handler, |
|
263 bool calc_cond = false) const; |
5164
|
264 |
5785
|
265 ComplexMatrix fsolve (MatrixType &typ, const ComplexMatrix& b, |
5681
|
266 octave_idx_type& info, double& rcond, |
|
267 solve_singularity_handler sing_handler, |
|
268 bool calc_cond = false) const; |
5164
|
269 |
5785
|
270 SparseComplexMatrix fsolve (MatrixType &typ, const SparseMatrix& b, |
5681
|
271 octave_idx_type& info, double& rcond, |
|
272 solve_singularity_handler sing_handler, |
|
273 bool calc_cond = false) const; |
5164
|
274 |
5785
|
275 SparseComplexMatrix fsolve (MatrixType &typ, const SparseComplexMatrix& b, |
5275
|
276 octave_idx_type& info, double& rcond, |
5681
|
277 solve_singularity_handler sing_handler, |
|
278 bool calc_cond = false) const; |
5164
|
279 |
|
280 public: |
|
281 // Generic interface to solver with no probing of type |
5785
|
282 ComplexMatrix solve (MatrixType &typ, const Matrix& b) const; |
|
283 ComplexMatrix solve (MatrixType &typ, const Matrix& b, |
5697
|
284 octave_idx_type& info) const; |
5785
|
285 ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
5697
|
286 double& rcond) const; |
5785
|
287 ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
5697
|
288 double& rcond, solve_singularity_handler sing_handler, |
|
289 bool singular_fallback = true) const; |
5164
|
290 |
5785
|
291 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b) const; |
|
292 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, |
5275
|
293 octave_idx_type& info) const; |
5785
|
294 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, |
5697
|
295 octave_idx_type& info, double& rcond) const; |
5785
|
296 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, |
5697
|
297 octave_idx_type& info, double& rcond, |
|
298 solve_singularity_handler sing_handler, |
|
299 bool singular_fallback = true) const; |
5164
|
300 |
5785
|
301 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b) const; |
|
302 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b, |
5697
|
303 octave_idx_type& info) const; |
5785
|
304 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b, |
5697
|
305 octave_idx_type& info, double& rcond) const; |
5785
|
306 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b, |
5697
|
307 octave_idx_type& info, double& rcond, |
|
308 solve_singularity_handler sing_handler, |
|
309 bool singular_fallback = true) const; |
5164
|
310 |
5785
|
311 SparseComplexMatrix solve (MatrixType &typ, |
5164
|
312 const SparseComplexMatrix& b) const; |
5785
|
313 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, |
5275
|
314 octave_idx_type& info) const; |
5785
|
315 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, |
5275
|
316 octave_idx_type& info, double& rcond) const; |
5785
|
317 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, |
5697
|
318 octave_idx_type& info, double& rcond, |
|
319 solve_singularity_handler sing_handler, |
|
320 bool singular_fallback = true) const; |
5164
|
321 |
5785
|
322 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b) const; |
|
323 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, |
5697
|
324 octave_idx_type& info) const; |
5785
|
325 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, |
5697
|
326 octave_idx_type& info, double& rcond) const; |
5785
|
327 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, |
5697
|
328 octave_idx_type& info, double& rcond, |
|
329 solve_singularity_handler sing_handler) const; |
5164
|
330 |
5785
|
331 ComplexColumnVector solve (MatrixType &typ, |
5164
|
332 const ComplexColumnVector& b) const; |
5785
|
333 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, |
5697
|
334 octave_idx_type& info) const; |
5785
|
335 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, |
5275
|
336 octave_idx_type& info, double& rcond) const; |
5785
|
337 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, |
5275
|
338 octave_idx_type& info, double& rcond, |
5164
|
339 solve_singularity_handler sing_handler) const; |
|
340 |
|
341 // Generic interface to solver with probing of type |
|
342 ComplexMatrix solve (const Matrix& b) const; |
5275
|
343 ComplexMatrix solve (const Matrix& b, octave_idx_type& info) const; |
5697
|
344 ComplexMatrix solve (const Matrix& b, octave_idx_type& info, |
|
345 double& rcond) const; |
5275
|
346 ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcond, |
5164
|
347 solve_singularity_handler sing_handler) const; |
|
348 |
|
349 ComplexMatrix solve (const ComplexMatrix& b) const; |
5275
|
350 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const; |
|
351 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, |
5164
|
352 double& rcond) const; |
5697
|
353 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, |
|
354 double& rcond, solve_singularity_handler sing_handler) const; |
5164
|
355 |
|
356 SparseComplexMatrix solve (const SparseMatrix& b) const; |
5275
|
357 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info) const; |
|
358 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info, |
5164
|
359 double& rcond) const; |
5275
|
360 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info, |
5164
|
361 double& rcond, |
5697
|
362 solve_singularity_handler sing_handler) const; |
5164
|
363 |
|
364 SparseComplexMatrix solve (const SparseComplexMatrix& b) const; |
5697
|
365 SparseComplexMatrix solve (const SparseComplexMatrix& b, |
|
366 octave_idx_type& info) const; |
|
367 SparseComplexMatrix solve (const SparseComplexMatrix& b, |
|
368 octave_idx_type& info, double& rcond) const; |
|
369 SparseComplexMatrix solve (const SparseComplexMatrix& b, |
|
370 octave_idx_type& info, double& rcond, |
5164
|
371 solve_singularity_handler sing_handler) const; |
|
372 |
|
373 ComplexColumnVector solve (const ColumnVector& b) const; |
5275
|
374 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info) const; |
|
375 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, |
5164
|
376 double& rcond) const; |
5697
|
377 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, |
|
378 double& rcond, |
5164
|
379 solve_singularity_handler sing_handler) const; |
|
380 |
|
381 ComplexColumnVector solve (const ComplexColumnVector& b) const; |
5697
|
382 ComplexColumnVector solve (const ComplexColumnVector& b, |
|
383 octave_idx_type& info) const; |
5275
|
384 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, |
5164
|
385 double& rcond) const; |
5275
|
386 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, |
5164
|
387 double& rcond, |
|
388 solve_singularity_handler sing_handler) const; |
|
389 |
|
390 SparseComplexMatrix squeeze (void) const; |
|
391 |
|
392 SparseComplexMatrix index (idx_vector& i, int resize_ok) const; |
|
393 |
|
394 SparseComplexMatrix index (idx_vector& i, idx_vector& j, int resize_ok) const; |
|
395 |
|
396 SparseComplexMatrix index (Array<idx_vector>& ra_idx, int resize_ok) const; |
|
397 |
|
398 SparseComplexMatrix reshape (const dim_vector& new_dims) const; |
|
399 |
5697
|
400 SparseComplexMatrix permute (const Array<octave_idx_type>& vec, |
|
401 bool inv = false) const; |
5164
|
402 |
5275
|
403 SparseComplexMatrix ipermute (const Array<octave_idx_type>& vec) const; |
5164
|
404 |
|
405 SparseComplexMatrix map (c_c_Mapper f) const; |
|
406 SparseMatrix map (d_c_Mapper f) const; |
|
407 SparseBoolMatrix map (b_c_Mapper f) const; |
|
408 |
|
409 SparseComplexMatrix& apply (c_c_Mapper f); |
|
410 |
|
411 bool any_element_is_inf_or_nan (void) const; |
|
412 bool all_elements_are_real (void) const; |
|
413 bool all_integers (double& max_val, double& min_val) const; |
|
414 bool too_large_for_float (void) const; |
|
415 |
|
416 SparseBoolMatrix operator ! (void) const; |
|
417 |
|
418 SparseBoolMatrix all (int dim = -1) const; |
|
419 SparseBoolMatrix any (int dim = -1) const; |
|
420 |
|
421 SparseComplexMatrix cumprod (int dim = -1) const; |
|
422 SparseComplexMatrix cumsum (int dim = -1) const; |
|
423 SparseComplexMatrix prod (int dim = -1) const; |
|
424 SparseComplexMatrix sum (int dim = -1) const; |
|
425 SparseComplexMatrix sumsq (int dim = -1) const; |
|
426 SparseMatrix abs (void) const; |
|
427 |
5275
|
428 SparseComplexMatrix diag (octave_idx_type k = 0) const; |
5164
|
429 |
|
430 // i/o |
6108
|
431 friend OCTAVE_API std::ostream& operator << (std::ostream& os, |
5164
|
432 const SparseComplexMatrix& a); |
6108
|
433 friend OCTAVE_API std::istream& operator >> (std::istream& is, |
5164
|
434 SparseComplexMatrix& a); |
|
435 }; |
|
436 |
6108
|
437 extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&, |
5164
|
438 const SparseComplexMatrix&); |
6108
|
439 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, |
5164
|
440 const SparseMatrix&); |
6108
|
441 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, |
5164
|
442 const SparseComplexMatrix&); |
|
443 |
6108
|
444 extern OCTAVE_API ComplexMatrix operator * (const Matrix&, |
5429
|
445 const SparseComplexMatrix&); |
6108
|
446 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&, |
5429
|
447 const SparseMatrix&); |
6108
|
448 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&, |
5429
|
449 const SparseComplexMatrix&); |
|
450 |
6108
|
451 extern OCTAVE_API ComplexMatrix operator * (const SparseMatrix&, |
5429
|
452 const ComplexMatrix&); |
6108
|
453 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&, |
5429
|
454 const Matrix&); |
6108
|
455 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&, |
5429
|
456 const ComplexMatrix&); |
|
457 |
6108
|
458 extern OCTAVE_API SparseComplexMatrix min (const Complex& c, |
5164
|
459 const SparseComplexMatrix& m); |
6108
|
460 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& m, |
5164
|
461 const Complex& c); |
6108
|
462 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& a, |
5164
|
463 const SparseComplexMatrix& b); |
|
464 |
6108
|
465 extern OCTAVE_API SparseComplexMatrix max (const Complex& c, |
5164
|
466 const SparseComplexMatrix& m); |
6108
|
467 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& m, |
5164
|
468 const Complex& c); |
6108
|
469 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& a, |
5164
|
470 const SparseComplexMatrix& b); |
|
471 |
6708
|
472 SPARSE_SMS_CMP_OP_DECLS (SparseComplexMatrix, Complex, OCTAVE_API) |
|
473 SPARSE_SMS_BOOL_OP_DECLS (SparseComplexMatrix, Complex, OCTAVE_API) |
5164
|
474 |
6708
|
475 SPARSE_SSM_CMP_OP_DECLS (Complex, SparseComplexMatrix, OCTAVE_API) |
|
476 SPARSE_SSM_BOOL_OP_DECLS (Complex, SparseComplexMatrix, OCTAVE_API) |
5164
|
477 |
6708
|
478 SPARSE_SMSM_CMP_OP_DECLS (SparseComplexMatrix, SparseComplexMatrix, OCTAVE_API) |
|
479 SPARSE_SMSM_BOOL_OP_DECLS (SparseComplexMatrix, SparseComplexMatrix, OCTAVE_API) |
5164
|
480 |
|
481 SPARSE_FORWARD_DEFS (MSparse, SparseComplexMatrix, ComplexMatrix, Complex) |
|
482 |
5351
|
483 #ifdef IDX_TYPE_LONG |
5322
|
484 #define UMFPACK_ZNAME(name) umfpack_zl_ ## name |
|
485 #else |
|
486 #define UMFPACK_ZNAME(name) umfpack_zi_ ## name |
|
487 #endif |
|
488 |
5164
|
489 #endif |
|
490 |
|
491 /* |
|
492 ;;; Local Variables: *** |
|
493 ;;; mode: C++ *** |
|
494 ;;; End: *** |
|
495 */ |