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" |
|
37 #include "SparseType.h" |
|
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: |
|
124 SparseComplexMatrix dinverse (SparseType &mattyp, octave_idx_type& info, |
|
125 double& rcond, const bool force = false, |
|
126 const bool calccond = true) const; |
|
127 |
|
128 SparseComplexMatrix tinverse (SparseType &mattyp, octave_idx_type& info, |
|
129 double& rcond, const bool force = false, |
|
130 const bool calccond = true) const; |
|
131 |
|
132 public: |
5164
|
133 SparseComplexMatrix inverse (void) const; |
5506
|
134 SparseComplexMatrix inverse (SparseType& mattype) const; |
|
135 SparseComplexMatrix inverse (SparseType& mattype, |
|
136 octave_idx_type& info) const; |
|
137 SparseComplexMatrix inverse (SparseType& mattype, octave_idx_type& info, |
|
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 |
5275
|
148 ComplexMatrix dsolve (SparseType &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 |
5681
|
152 ComplexMatrix dsolve (SparseType &typ, const ComplexMatrix& b, |
|
153 octave_idx_type& info, double& rcond, |
|
154 solve_singularity_handler sing_handler, |
|
155 bool calc_cond = false) const; |
5164
|
156 |
5681
|
157 SparseComplexMatrix dsolve (SparseType &typ, const SparseMatrix& b, |
|
158 octave_idx_type& info, double& rcond, |
|
159 solve_singularity_handler sing_handler, |
|
160 bool calc_cond = false) const; |
5164
|
161 |
|
162 SparseComplexMatrix dsolve (SparseType &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 |
5275
|
168 ComplexMatrix utsolve (SparseType &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 |
5681
|
172 ComplexMatrix utsolve (SparseType &typ, const ComplexMatrix& b, |
|
173 octave_idx_type& info, double& rcond, |
|
174 solve_singularity_handler sing_handler, |
|
175 bool calc_cond = false) const; |
5164
|
176 |
5681
|
177 SparseComplexMatrix utsolve (SparseType &typ, const SparseMatrix& b, |
|
178 octave_idx_type& info, double& rcond, |
|
179 solve_singularity_handler sing_handler, |
|
180 bool calc_cond = false) const; |
5164
|
181 |
|
182 SparseComplexMatrix utsolve (SparseType &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 |
5681
|
188 ComplexMatrix ltsolve (SparseType &typ, const Matrix& b, |
|
189 octave_idx_type& info, double& rcond, |
|
190 solve_singularity_handler sing_handler, |
|
191 bool calc_cond = false) const; |
5164
|
192 |
5681
|
193 ComplexMatrix ltsolve (SparseType &typ, const ComplexMatrix& b, |
|
194 octave_idx_type& info, double& rcond, |
|
195 solve_singularity_handler sing_handler, |
|
196 bool calc_cond = false) const; |
5164
|
197 |
5681
|
198 SparseComplexMatrix ltsolve (SparseType &typ, const SparseMatrix& b, |
|
199 octave_idx_type& info, double& rcond, |
|
200 solve_singularity_handler sing_handler, |
|
201 bool calc_cond = false) const; |
5164
|
202 |
|
203 SparseComplexMatrix ltsolve (SparseType &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 |
5681
|
209 ComplexMatrix trisolve (SparseType &typ, const Matrix& b, |
|
210 octave_idx_type& info, double& rcond, |
|
211 solve_singularity_handler sing_handler, |
|
212 bool calc_cond = false) const; |
5164
|
213 |
5681
|
214 ComplexMatrix trisolve (SparseType &typ, const ComplexMatrix& b, |
|
215 octave_idx_type& info, double& rcond, |
|
216 solve_singularity_handler sing_handler, |
|
217 bool calc_cond = false) const; |
5164
|
218 |
5681
|
219 SparseComplexMatrix trisolve (SparseType &typ, const SparseMatrix& b, |
|
220 octave_idx_type& info, double& rcond, |
|
221 solve_singularity_handler sing_handler, |
|
222 bool calc_cond = false) const; |
5164
|
223 |
|
224 SparseComplexMatrix trisolve (SparseType &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) |
5275
|
230 ComplexMatrix bsolve (SparseType &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 |
5681
|
234 ComplexMatrix bsolve (SparseType &typ, const ComplexMatrix& b, |
|
235 octave_idx_type& info, double& rcond, |
|
236 solve_singularity_handler sing_handler, |
|
237 bool calc_cond = false) const; |
5164
|
238 |
5681
|
239 SparseComplexMatrix bsolve (SparseType &typ, const SparseMatrix& b, |
|
240 octave_idx_type& info, double& rcond, |
|
241 solve_singularity_handler sing_handler, |
|
242 bool calc_cond = false) const; |
5164
|
243 |
|
244 SparseComplexMatrix bsolve (SparseType &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 |
5275
|
254 ComplexMatrix fsolve (SparseType &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 |
5681
|
258 ComplexMatrix fsolve (SparseType &typ, const ComplexMatrix& b, |
|
259 octave_idx_type& info, double& rcond, |
|
260 solve_singularity_handler sing_handler, |
|
261 bool calc_cond = false) const; |
5164
|
262 |
5681
|
263 SparseComplexMatrix fsolve (SparseType &typ, const SparseMatrix& b, |
|
264 octave_idx_type& info, double& rcond, |
|
265 solve_singularity_handler sing_handler, |
|
266 bool calc_cond = false) const; |
5164
|
267 |
|
268 SparseComplexMatrix fsolve (SparseType &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 |
|
275 ComplexMatrix solve (SparseType &typ, const Matrix& b) const; |
5275
|
276 ComplexMatrix solve (SparseType &typ, const Matrix& b, octave_idx_type& info) const; |
|
277 ComplexMatrix solve (SparseType &typ, const Matrix& b, octave_idx_type& info, |
5164
|
278 double& rcond) const; |
5275
|
279 ComplexMatrix solve (SparseType &typ, const Matrix& b, octave_idx_type& info, |
5164
|
280 double& rcond, solve_singularity_handler sing_handler) const; |
|
281 |
|
282 ComplexMatrix solve (SparseType &typ, const ComplexMatrix& b) const; |
|
283 ComplexMatrix solve (SparseType &typ, const ComplexMatrix& b, |
5275
|
284 octave_idx_type& info) const; |
|
285 ComplexMatrix solve (SparseType &typ, const ComplexMatrix& b, octave_idx_type& info, |
5164
|
286 double& rcond) const; |
5275
|
287 ComplexMatrix solve (SparseType &typ, const ComplexMatrix& b, octave_idx_type& info, |
5164
|
288 double& rcond, solve_singularity_handler sing_handler) const; |
|
289 |
|
290 SparseComplexMatrix solve (SparseType &typ, const SparseMatrix& b) const; |
|
291 SparseComplexMatrix solve (SparseType &typ, const SparseMatrix& b, |
5275
|
292 octave_idx_type& info) const; |
|
293 SparseComplexMatrix solve (SparseType &typ, const SparseMatrix& b, octave_idx_type& info, |
5164
|
294 double& rcond) const; |
5275
|
295 SparseComplexMatrix solve (SparseType &typ, const SparseMatrix& b, octave_idx_type& info, |
5164
|
296 double& rcond, solve_singularity_handler sing_handler) const; |
|
297 |
|
298 SparseComplexMatrix solve (SparseType &typ, |
|
299 const SparseComplexMatrix& b) const; |
|
300 SparseComplexMatrix solve (SparseType &typ, const SparseComplexMatrix& b, |
5275
|
301 octave_idx_type& info) const; |
5164
|
302 SparseComplexMatrix solve (SparseType &typ, const SparseComplexMatrix& b, |
5275
|
303 octave_idx_type& info, double& rcond) const; |
|
304 SparseComplexMatrix solve (SparseType &typ, const SparseComplexMatrix& b, octave_idx_type& info, |
5164
|
305 double& rcond, solve_singularity_handler sing_handler) const; |
|
306 |
|
307 ComplexColumnVector solve (SparseType &typ, const ColumnVector& b) const; |
|
308 ComplexColumnVector solve (SparseType &typ, const ColumnVector& b, |
5275
|
309 octave_idx_type& info) const; |
5164
|
310 ComplexColumnVector solve (SparseType &typ, const ColumnVector& b, |
5275
|
311 octave_idx_type& info, double& rcond) const; |
|
312 ComplexColumnVector solve (SparseType &typ, const ColumnVector& b, octave_idx_type& info, |
5164
|
313 double& rcond, solve_singularity_handler sing_handler) const; |
|
314 |
|
315 ComplexColumnVector solve (SparseType &typ, |
|
316 const ComplexColumnVector& b) const; |
|
317 ComplexColumnVector solve (SparseType &typ, |
5275
|
318 const ComplexColumnVector& b, octave_idx_type& info) const; |
5164
|
319 ComplexColumnVector solve (SparseType &typ, const ComplexColumnVector& b, |
5275
|
320 octave_idx_type& info, double& rcond) const; |
5164
|
321 ComplexColumnVector solve (SparseType &typ, const ComplexColumnVector& b, |
5275
|
322 octave_idx_type& info, double& rcond, |
5164
|
323 solve_singularity_handler sing_handler) const; |
|
324 |
|
325 // Generic interface to solver with probing of type |
|
326 ComplexMatrix solve (const Matrix& b) const; |
5275
|
327 ComplexMatrix solve (const Matrix& b, octave_idx_type& info) const; |
|
328 ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcond) const; |
|
329 ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcond, |
5164
|
330 solve_singularity_handler sing_handler) const; |
|
331 |
|
332 ComplexMatrix solve (const ComplexMatrix& b) const; |
5275
|
333 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const; |
|
334 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, |
5164
|
335 double& rcond) const; |
5275
|
336 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, double& rcond, |
5164
|
337 solve_singularity_handler sing_handler) const; |
|
338 |
|
339 SparseComplexMatrix solve (const SparseMatrix& b) const; |
5275
|
340 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info) const; |
|
341 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info, |
5164
|
342 double& rcond) const; |
5275
|
343 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info, |
5164
|
344 double& rcond, |
|
345 solve_singularity_handler sing_handler) const; |
|
346 |
|
347 SparseComplexMatrix solve (const SparseComplexMatrix& b) const; |
5275
|
348 SparseComplexMatrix solve (const SparseComplexMatrix& b, octave_idx_type& info) const; |
|
349 SparseComplexMatrix solve (const SparseComplexMatrix& b, octave_idx_type& info, |
5164
|
350 double& rcond) const; |
5275
|
351 SparseComplexMatrix solve (const SparseComplexMatrix& b, octave_idx_type& info, |
5164
|
352 double& rcond, |
|
353 solve_singularity_handler sing_handler) const; |
|
354 |
|
355 ComplexColumnVector solve (const ColumnVector& b) const; |
5275
|
356 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info) const; |
|
357 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, |
5164
|
358 double& rcond) const; |
5275
|
359 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, double& rcond, |
5164
|
360 solve_singularity_handler sing_handler) const; |
|
361 |
|
362 ComplexColumnVector solve (const ComplexColumnVector& b) const; |
5275
|
363 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info) const; |
|
364 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, |
5164
|
365 double& rcond) const; |
5275
|
366 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, |
5164
|
367 double& rcond, |
|
368 solve_singularity_handler sing_handler) const; |
|
369 |
|
370 SparseComplexMatrix squeeze (void) const; |
|
371 |
|
372 SparseComplexMatrix index (idx_vector& i, int resize_ok) const; |
|
373 |
|
374 SparseComplexMatrix index (idx_vector& i, idx_vector& j, int resize_ok) const; |
|
375 |
|
376 SparseComplexMatrix index (Array<idx_vector>& ra_idx, int resize_ok) const; |
|
377 |
|
378 SparseComplexMatrix reshape (const dim_vector& new_dims) const; |
|
379 |
5275
|
380 SparseComplexMatrix permute (const Array<octave_idx_type>& vec, bool inv = false) const; |
5164
|
381 |
5275
|
382 SparseComplexMatrix ipermute (const Array<octave_idx_type>& vec) const; |
5164
|
383 |
|
384 SparseComplexMatrix map (c_c_Mapper f) const; |
|
385 SparseMatrix map (d_c_Mapper f) const; |
|
386 SparseBoolMatrix map (b_c_Mapper f) const; |
|
387 |
|
388 SparseComplexMatrix& apply (c_c_Mapper f); |
|
389 |
|
390 bool any_element_is_inf_or_nan (void) const; |
|
391 bool all_elements_are_real (void) const; |
|
392 bool all_integers (double& max_val, double& min_val) const; |
|
393 bool too_large_for_float (void) const; |
|
394 |
|
395 SparseBoolMatrix operator ! (void) const; |
|
396 |
|
397 SparseBoolMatrix all (int dim = -1) const; |
|
398 SparseBoolMatrix any (int dim = -1) const; |
|
399 |
|
400 SparseComplexMatrix cumprod (int dim = -1) const; |
|
401 SparseComplexMatrix cumsum (int dim = -1) const; |
|
402 SparseComplexMatrix prod (int dim = -1) const; |
|
403 SparseComplexMatrix sum (int dim = -1) const; |
|
404 SparseComplexMatrix sumsq (int dim = -1) const; |
|
405 SparseMatrix abs (void) const; |
|
406 |
5275
|
407 SparseComplexMatrix diag (octave_idx_type k = 0) const; |
5164
|
408 |
|
409 // i/o |
|
410 friend std::ostream& operator << (std::ostream& os, |
|
411 const SparseComplexMatrix& a); |
|
412 friend std::istream& operator >> (std::istream& is, |
|
413 SparseComplexMatrix& a); |
|
414 }; |
|
415 |
|
416 extern SparseComplexMatrix operator * (const SparseMatrix&, |
|
417 const SparseComplexMatrix&); |
|
418 extern SparseComplexMatrix operator * (const SparseComplexMatrix&, |
|
419 const SparseMatrix&); |
|
420 extern SparseComplexMatrix operator * (const SparseComplexMatrix&, |
|
421 const SparseComplexMatrix&); |
|
422 |
5429
|
423 extern ComplexMatrix operator * (const Matrix&, |
|
424 const SparseComplexMatrix&); |
|
425 extern ComplexMatrix operator * (const ComplexMatrix&, |
|
426 const SparseMatrix&); |
|
427 extern ComplexMatrix operator * (const ComplexMatrix&, |
|
428 const SparseComplexMatrix&); |
|
429 |
|
430 extern ComplexMatrix operator * (const SparseMatrix&, |
|
431 const ComplexMatrix&); |
|
432 extern ComplexMatrix operator * (const SparseComplexMatrix&, |
|
433 const Matrix&); |
|
434 extern ComplexMatrix operator * (const SparseComplexMatrix&, |
|
435 const ComplexMatrix&); |
|
436 |
5164
|
437 extern SparseComplexMatrix min (const Complex& c, |
|
438 const SparseComplexMatrix& m); |
|
439 extern SparseComplexMatrix min (const SparseComplexMatrix& m, |
|
440 const Complex& c); |
|
441 extern SparseComplexMatrix min (const SparseComplexMatrix& a, |
|
442 const SparseComplexMatrix& b); |
|
443 |
|
444 extern SparseComplexMatrix max (const Complex& c, |
|
445 const SparseComplexMatrix& m); |
|
446 extern SparseComplexMatrix max (const SparseComplexMatrix& m, |
|
447 const Complex& c); |
|
448 extern SparseComplexMatrix max (const SparseComplexMatrix& a, |
|
449 const SparseComplexMatrix& b); |
|
450 |
|
451 SPARSE_SMS_CMP_OP_DECLS (SparseComplexMatrix, Complex) |
|
452 SPARSE_SMS_BOOL_OP_DECLS (SparseComplexMatrix, Complex) |
|
453 |
|
454 SPARSE_SSM_CMP_OP_DECLS (Complex, SparseComplexMatrix) |
|
455 SPARSE_SSM_BOOL_OP_DECLS (Complex, SparseComplexMatrix) |
|
456 |
|
457 SPARSE_SMSM_CMP_OP_DECLS (SparseComplexMatrix, SparseComplexMatrix) |
|
458 SPARSE_SMSM_BOOL_OP_DECLS (SparseComplexMatrix, SparseComplexMatrix) |
|
459 |
|
460 SPARSE_FORWARD_DEFS (MSparse, SparseComplexMatrix, ComplexMatrix, Complex) |
|
461 |
5351
|
462 #ifdef IDX_TYPE_LONG |
5322
|
463 #define UMFPACK_ZNAME(name) umfpack_zl_ ## name |
|
464 #else |
|
465 #define UMFPACK_ZNAME(name) umfpack_zi_ ## name |
|
466 #endif |
|
467 |
5164
|
468 #endif |
|
469 |
|
470 /* |
|
471 ;;; Local Variables: *** |
|
472 ;;; mode: C++ *** |
|
473 ;;; End: *** |
|
474 */ |