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 |
|
123 SparseComplexMatrix inverse (void) const; |
5275
|
124 SparseComplexMatrix inverse (octave_idx_type& info) const; |
|
125 SparseComplexMatrix inverse (octave_idx_type& info, double& rcond, int force = 0, |
5164
|
126 int calc_cond = 1) const; |
|
127 |
|
128 ComplexDET determinant (void) const; |
5275
|
129 ComplexDET determinant (octave_idx_type& info) const; |
|
130 ComplexDET determinant (octave_idx_type& info, double& rcond, |
5164
|
131 int calc_cond = 1) const; |
|
132 |
|
133 private: |
|
134 // Diagonal matrix solvers |
5275
|
135 ComplexMatrix dsolve (SparseType &typ, const Matrix& b, octave_idx_type& info, |
5164
|
136 double& rcond, solve_singularity_handler sing_handler) const; |
|
137 |
5275
|
138 ComplexMatrix dsolve (SparseType &typ, const ComplexMatrix& b, octave_idx_type& info, |
5164
|
139 double& rcond, solve_singularity_handler sing_handler) const; |
|
140 |
5275
|
141 SparseComplexMatrix dsolve (SparseType &typ, const SparseMatrix& b, octave_idx_type& info, |
5164
|
142 double& rcond, solve_singularity_handler sing_handler) const; |
|
143 |
|
144 SparseComplexMatrix dsolve (SparseType &typ, const SparseComplexMatrix& b, |
5275
|
145 octave_idx_type& info, double& rcond, |
5164
|
146 solve_singularity_handler sing_handler) const; |
|
147 |
|
148 // Upper triangular matrix solvers |
5275
|
149 ComplexMatrix utsolve (SparseType &typ, const Matrix& b, octave_idx_type& info, |
5164
|
150 double& rcond, solve_singularity_handler sing_handler) const; |
|
151 |
5275
|
152 ComplexMatrix utsolve (SparseType &typ, const ComplexMatrix& b, octave_idx_type& info, |
5164
|
153 double& rcond, solve_singularity_handler sing_handler) const; |
|
154 |
5275
|
155 SparseComplexMatrix utsolve (SparseType &typ, const SparseMatrix& b, octave_idx_type& info, |
5164
|
156 double& rcond, solve_singularity_handler sing_handler) const; |
|
157 |
|
158 SparseComplexMatrix utsolve (SparseType &typ, const SparseComplexMatrix& b, |
5275
|
159 octave_idx_type& info, double& rcond, |
5164
|
160 solve_singularity_handler sing_handler) const; |
|
161 |
|
162 // Lower triangular matrix solvers |
5275
|
163 ComplexMatrix ltsolve (SparseType &typ, const Matrix& b, octave_idx_type& info, |
5164
|
164 double& rcond, solve_singularity_handler sing_handler) const; |
|
165 |
5275
|
166 ComplexMatrix ltsolve (SparseType &typ, const ComplexMatrix& b, octave_idx_type& info, |
5164
|
167 double& rcond, solve_singularity_handler sing_handler) const; |
|
168 |
5275
|
169 SparseComplexMatrix ltsolve (SparseType &typ, const SparseMatrix& b, octave_idx_type& info, |
5164
|
170 double& rcond, solve_singularity_handler sing_handler) const; |
|
171 |
|
172 SparseComplexMatrix ltsolve (SparseType &typ, const SparseComplexMatrix& b, |
5275
|
173 octave_idx_type& info, double& rcond, |
5164
|
174 solve_singularity_handler sing_handler) const; |
|
175 |
|
176 // Tridiagonal matrix solvers |
5275
|
177 ComplexMatrix trisolve (SparseType &typ, const Matrix& b, octave_idx_type& info, |
5164
|
178 double& rcond, solve_singularity_handler sing_handler) const; |
|
179 |
5275
|
180 ComplexMatrix trisolve (SparseType &typ, const ComplexMatrix& b, octave_idx_type& info, |
5164
|
181 double& rcond, solve_singularity_handler sing_handler) const; |
|
182 |
5275
|
183 SparseComplexMatrix trisolve (SparseType &typ, const SparseMatrix& b, octave_idx_type& info, |
5164
|
184 double& rcond, solve_singularity_handler sing_handler) const; |
|
185 |
|
186 SparseComplexMatrix trisolve (SparseType &typ, const SparseComplexMatrix& b, |
5275
|
187 octave_idx_type& info, double& rcond, |
5164
|
188 solve_singularity_handler sing_handler) const; |
|
189 |
|
190 // Banded matrix solvers (umfpack/cholesky) |
5275
|
191 ComplexMatrix bsolve (SparseType &typ, const Matrix& b, octave_idx_type& info, |
5164
|
192 double& rcond, solve_singularity_handler sing_handler) const; |
|
193 |
5275
|
194 ComplexMatrix bsolve (SparseType &typ, const ComplexMatrix& b, octave_idx_type& info, |
5164
|
195 double& rcond, solve_singularity_handler sing_handler) const; |
|
196 |
5275
|
197 SparseComplexMatrix bsolve (SparseType &typ, const SparseMatrix& b, octave_idx_type& info, |
5164
|
198 double& rcond, solve_singularity_handler sing_handler) const; |
|
199 |
|
200 SparseComplexMatrix bsolve (SparseType &typ, const SparseComplexMatrix& b, |
5275
|
201 octave_idx_type& info, double& rcond, |
5164
|
202 solve_singularity_handler sing_handler) const; |
|
203 |
|
204 // Full matrix solvers (umfpack/cholesky) |
5275
|
205 void * factorize (octave_idx_type& err, double &rcond, Matrix &Control, Matrix &Info, |
5164
|
206 solve_singularity_handler sing_handler) const; |
|
207 |
5275
|
208 ComplexMatrix fsolve (SparseType &typ, const Matrix& b, octave_idx_type& info, |
5164
|
209 double& rcond, solve_singularity_handler sing_handler) const; |
|
210 |
5275
|
211 ComplexMatrix fsolve (SparseType &typ, const ComplexMatrix& b, octave_idx_type& info, |
5164
|
212 double& rcond, solve_singularity_handler sing_handler) const; |
|
213 |
5275
|
214 SparseComplexMatrix fsolve (SparseType &typ, const SparseMatrix& b, octave_idx_type& info, |
5164
|
215 double& rcond, solve_singularity_handler sing_handler) const; |
|
216 |
|
217 SparseComplexMatrix fsolve (SparseType &typ, const SparseComplexMatrix& b, |
5275
|
218 octave_idx_type& info, double& rcond, |
5164
|
219 solve_singularity_handler sing_handler) const; |
|
220 |
|
221 public: |
|
222 // Generic interface to solver with no probing of type |
|
223 ComplexMatrix solve (SparseType &typ, const Matrix& b) const; |
5275
|
224 ComplexMatrix solve (SparseType &typ, const Matrix& b, octave_idx_type& info) const; |
|
225 ComplexMatrix solve (SparseType &typ, const Matrix& b, octave_idx_type& info, |
5164
|
226 double& rcond) const; |
5275
|
227 ComplexMatrix solve (SparseType &typ, const Matrix& b, octave_idx_type& info, |
5164
|
228 double& rcond, solve_singularity_handler sing_handler) const; |
|
229 |
|
230 ComplexMatrix solve (SparseType &typ, const ComplexMatrix& b) const; |
|
231 ComplexMatrix solve (SparseType &typ, const ComplexMatrix& b, |
5275
|
232 octave_idx_type& info) const; |
|
233 ComplexMatrix solve (SparseType &typ, const ComplexMatrix& b, octave_idx_type& info, |
5164
|
234 double& rcond) const; |
5275
|
235 ComplexMatrix solve (SparseType &typ, const ComplexMatrix& b, octave_idx_type& info, |
5164
|
236 double& rcond, solve_singularity_handler sing_handler) const; |
|
237 |
|
238 SparseComplexMatrix solve (SparseType &typ, const SparseMatrix& b) const; |
|
239 SparseComplexMatrix solve (SparseType &typ, const SparseMatrix& b, |
5275
|
240 octave_idx_type& info) const; |
|
241 SparseComplexMatrix solve (SparseType &typ, const SparseMatrix& b, octave_idx_type& info, |
5164
|
242 double& rcond) const; |
5275
|
243 SparseComplexMatrix solve (SparseType &typ, const SparseMatrix& b, octave_idx_type& info, |
5164
|
244 double& rcond, solve_singularity_handler sing_handler) const; |
|
245 |
|
246 SparseComplexMatrix solve (SparseType &typ, |
|
247 const SparseComplexMatrix& b) const; |
|
248 SparseComplexMatrix solve (SparseType &typ, const SparseComplexMatrix& b, |
5275
|
249 octave_idx_type& info) const; |
5164
|
250 SparseComplexMatrix solve (SparseType &typ, const SparseComplexMatrix& b, |
5275
|
251 octave_idx_type& info, double& rcond) const; |
|
252 SparseComplexMatrix solve (SparseType &typ, const SparseComplexMatrix& b, octave_idx_type& info, |
5164
|
253 double& rcond, solve_singularity_handler sing_handler) const; |
|
254 |
|
255 ComplexColumnVector solve (SparseType &typ, const ColumnVector& b) const; |
|
256 ComplexColumnVector solve (SparseType &typ, const ColumnVector& b, |
5275
|
257 octave_idx_type& info) const; |
5164
|
258 ComplexColumnVector solve (SparseType &typ, const ColumnVector& b, |
5275
|
259 octave_idx_type& info, double& rcond) const; |
|
260 ComplexColumnVector solve (SparseType &typ, const ColumnVector& b, octave_idx_type& info, |
5164
|
261 double& rcond, solve_singularity_handler sing_handler) const; |
|
262 |
|
263 ComplexColumnVector solve (SparseType &typ, |
|
264 const ComplexColumnVector& b) const; |
|
265 ComplexColumnVector solve (SparseType &typ, |
5275
|
266 const ComplexColumnVector& b, octave_idx_type& info) const; |
5164
|
267 ComplexColumnVector solve (SparseType &typ, const ComplexColumnVector& b, |
5275
|
268 octave_idx_type& info, double& rcond) const; |
5164
|
269 ComplexColumnVector solve (SparseType &typ, const ComplexColumnVector& b, |
5275
|
270 octave_idx_type& info, double& rcond, |
5164
|
271 solve_singularity_handler sing_handler) const; |
|
272 |
|
273 // Generic interface to solver with probing of type |
|
274 ComplexMatrix solve (const Matrix& b) const; |
5275
|
275 ComplexMatrix solve (const Matrix& b, octave_idx_type& info) const; |
|
276 ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcond) const; |
|
277 ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcond, |
5164
|
278 solve_singularity_handler sing_handler) const; |
|
279 |
|
280 ComplexMatrix solve (const ComplexMatrix& b) const; |
5275
|
281 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const; |
|
282 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, |
5164
|
283 double& rcond) const; |
5275
|
284 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, double& rcond, |
5164
|
285 solve_singularity_handler sing_handler) const; |
|
286 |
|
287 SparseComplexMatrix solve (const SparseMatrix& b) const; |
5275
|
288 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info) const; |
|
289 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info, |
5164
|
290 double& rcond) const; |
5275
|
291 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info, |
5164
|
292 double& rcond, |
|
293 solve_singularity_handler sing_handler) const; |
|
294 |
|
295 SparseComplexMatrix solve (const SparseComplexMatrix& b) const; |
5275
|
296 SparseComplexMatrix solve (const SparseComplexMatrix& b, octave_idx_type& info) const; |
|
297 SparseComplexMatrix solve (const SparseComplexMatrix& b, octave_idx_type& info, |
5164
|
298 double& rcond) const; |
5275
|
299 SparseComplexMatrix solve (const SparseComplexMatrix& b, octave_idx_type& info, |
5164
|
300 double& rcond, |
|
301 solve_singularity_handler sing_handler) const; |
|
302 |
|
303 ComplexColumnVector solve (const ColumnVector& b) const; |
5275
|
304 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info) const; |
|
305 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, |
5164
|
306 double& rcond) const; |
5275
|
307 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, double& rcond, |
5164
|
308 solve_singularity_handler sing_handler) const; |
|
309 |
|
310 ComplexColumnVector solve (const ComplexColumnVector& b) const; |
5275
|
311 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info) const; |
|
312 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, |
5164
|
313 double& rcond) const; |
5275
|
314 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, |
5164
|
315 double& rcond, |
|
316 solve_singularity_handler sing_handler) const; |
|
317 |
|
318 ComplexMatrix lssolve (const Matrix& b) const; |
5275
|
319 ComplexMatrix lssolve (const Matrix& b, octave_idx_type& info) const; |
|
320 ComplexMatrix lssolve (const Matrix& b, octave_idx_type& info, octave_idx_type& rank) const; |
5164
|
321 |
|
322 ComplexMatrix lssolve (const ComplexMatrix& b) const; |
5275
|
323 ComplexMatrix lssolve (const ComplexMatrix& b, octave_idx_type& info) const; |
|
324 ComplexMatrix lssolve (const ComplexMatrix& b, octave_idx_type& info, |
|
325 octave_idx_type& rank) const; |
5164
|
326 |
|
327 SparseComplexMatrix lssolve (const SparseMatrix& b) const; |
5275
|
328 SparseComplexMatrix lssolve (const SparseMatrix& b, octave_idx_type& info) const; |
|
329 SparseComplexMatrix lssolve (const SparseMatrix& b, octave_idx_type& info, |
|
330 octave_idx_type& rank) const; |
5164
|
331 |
|
332 SparseComplexMatrix lssolve (const SparseComplexMatrix& b) const; |
|
333 SparseComplexMatrix lssolve (const SparseComplexMatrix& b, |
5275
|
334 octave_idx_type& info) const; |
|
335 SparseComplexMatrix lssolve (const SparseComplexMatrix& b, octave_idx_type& info, |
|
336 octave_idx_type& rank) const; |
5164
|
337 |
|
338 ComplexColumnVector lssolve (const ColumnVector& b) const; |
5275
|
339 ComplexColumnVector lssolve (const ColumnVector& b, octave_idx_type& info) const; |
|
340 ComplexColumnVector lssolve (const ColumnVector& b, octave_idx_type& info, |
|
341 octave_idx_type& rank) const; |
5164
|
342 |
|
343 ComplexColumnVector lssolve (const ComplexColumnVector& b) const; |
5275
|
344 ComplexColumnVector lssolve (const ComplexColumnVector& b, octave_idx_type& info) const; |
|
345 ComplexColumnVector lssolve (const ComplexColumnVector& b, octave_idx_type& info, |
|
346 octave_idx_type& rank) const; |
5164
|
347 |
|
348 SparseComplexMatrix squeeze (void) const; |
|
349 |
|
350 SparseComplexMatrix index (idx_vector& i, int resize_ok) const; |
|
351 |
|
352 SparseComplexMatrix index (idx_vector& i, idx_vector& j, int resize_ok) const; |
|
353 |
|
354 SparseComplexMatrix index (Array<idx_vector>& ra_idx, int resize_ok) const; |
|
355 |
|
356 SparseComplexMatrix reshape (const dim_vector& new_dims) const; |
|
357 |
5275
|
358 SparseComplexMatrix permute (const Array<octave_idx_type>& vec, bool inv = false) const; |
5164
|
359 |
5275
|
360 SparseComplexMatrix ipermute (const Array<octave_idx_type>& vec) const; |
5164
|
361 |
|
362 SparseComplexMatrix map (c_c_Mapper f) const; |
|
363 SparseMatrix map (d_c_Mapper f) const; |
|
364 SparseBoolMatrix map (b_c_Mapper f) const; |
|
365 |
|
366 SparseComplexMatrix& apply (c_c_Mapper f); |
|
367 |
|
368 bool any_element_is_inf_or_nan (void) const; |
|
369 bool all_elements_are_real (void) const; |
|
370 bool all_integers (double& max_val, double& min_val) const; |
|
371 bool too_large_for_float (void) const; |
|
372 |
|
373 SparseBoolMatrix operator ! (void) const; |
|
374 |
|
375 SparseBoolMatrix all (int dim = -1) const; |
|
376 SparseBoolMatrix any (int dim = -1) const; |
|
377 |
|
378 SparseComplexMatrix cumprod (int dim = -1) const; |
|
379 SparseComplexMatrix cumsum (int dim = -1) const; |
|
380 SparseComplexMatrix prod (int dim = -1) const; |
|
381 SparseComplexMatrix sum (int dim = -1) const; |
|
382 SparseComplexMatrix sumsq (int dim = -1) const; |
|
383 SparseMatrix abs (void) const; |
|
384 |
5275
|
385 SparseComplexMatrix diag (octave_idx_type k = 0) const; |
5164
|
386 |
|
387 // i/o |
|
388 friend std::ostream& operator << (std::ostream& os, |
|
389 const SparseComplexMatrix& a); |
|
390 friend std::istream& operator >> (std::istream& is, |
|
391 SparseComplexMatrix& a); |
|
392 }; |
|
393 |
|
394 extern SparseComplexMatrix operator * (const SparseMatrix&, |
|
395 const SparseComplexMatrix&); |
|
396 extern SparseComplexMatrix operator * (const SparseComplexMatrix&, |
|
397 const SparseMatrix&); |
|
398 extern SparseComplexMatrix operator * (const SparseComplexMatrix&, |
|
399 const SparseComplexMatrix&); |
|
400 |
|
401 extern SparseComplexMatrix min (const Complex& c, |
|
402 const SparseComplexMatrix& m); |
|
403 extern SparseComplexMatrix min (const SparseComplexMatrix& m, |
|
404 const Complex& c); |
|
405 extern SparseComplexMatrix min (const SparseComplexMatrix& a, |
|
406 const SparseComplexMatrix& b); |
|
407 |
|
408 extern SparseComplexMatrix max (const Complex& c, |
|
409 const SparseComplexMatrix& m); |
|
410 extern SparseComplexMatrix max (const SparseComplexMatrix& m, |
|
411 const Complex& c); |
|
412 extern SparseComplexMatrix max (const SparseComplexMatrix& a, |
|
413 const SparseComplexMatrix& b); |
|
414 |
|
415 SPARSE_SMS_CMP_OP_DECLS (SparseComplexMatrix, Complex) |
|
416 SPARSE_SMS_BOOL_OP_DECLS (SparseComplexMatrix, Complex) |
|
417 |
|
418 SPARSE_SSM_CMP_OP_DECLS (Complex, SparseComplexMatrix) |
|
419 SPARSE_SSM_BOOL_OP_DECLS (Complex, SparseComplexMatrix) |
|
420 |
|
421 SPARSE_SMSM_CMP_OP_DECLS (SparseComplexMatrix, SparseComplexMatrix) |
|
422 SPARSE_SMSM_BOOL_OP_DECLS (SparseComplexMatrix, SparseComplexMatrix) |
|
423 |
|
424 SPARSE_FORWARD_DEFS (MSparse, SparseComplexMatrix, ComplexMatrix, Complex) |
|
425 |
5322
|
426 #ifdef UMFPACK_LONG_IDX |
|
427 #define UMFPACK_ZNAME(name) umfpack_zl_ ## name |
|
428 #else |
|
429 #define UMFPACK_ZNAME(name) umfpack_zi_ ## name |
|
430 #endif |
|
431 |
5164
|
432 #endif |
|
433 |
|
434 /* |
|
435 ;;; Local Variables: *** |
|
436 ;;; mode: C++ *** |
|
437 ;;; End: *** |
|
438 */ |