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