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