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