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