GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
CSparse.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 1998-2021 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_CSparse_h)
27 #define octave_CSparse_h 1
28 
29 #include "octave-config.h"
30 
31 #include "CColVector.h"
32 #include "CMatrix.h"
33 #include "CNDArray.h"
34 #include "DET.h"
35 #include "MSparse.h"
36 #include "MatrixType.h"
37 #include "Sparse-op-decls.h"
38 #include "dColVector.h"
39 #include "dMatrix.h"
40 #include "dNDArray.h"
41 #include "oct-cmplx.h"
42 
43 class PermMatrix;
44 class DiagMatrix;
45 class ComplexDiagMatrix;
46 class SparseMatrix;
47 class SparseBoolMatrix;
48 
49 class
50 OCTAVE_API
52 {
53 public:
54 
55  // Corresponding dense matrix type for this sparse matrix type.
57 
58  typedef void (*solve_singularity_handler) (double rcond);
59 
61 
63  octave_idx_type c) : MSparse<Complex> (r, c) { }
64 
66  : MSparse<Complex> (dv, nz) { }
67 
69  Complex val)
70  : MSparse<Complex> (r, c, val) { }
71 
73  : MSparse<Complex> (r, c, Complex (val)) { }
74 
76  : MSparse<Complex> (a) { }
77 
79  : MSparse<Complex> (a, dv) { }
80 
82 
84 
85  explicit SparseComplexMatrix (const ComplexMatrix& a)
86  : MSparse<Complex> (a) { }
87 
88  explicit SparseComplexMatrix (const ComplexNDArray& a)
89  : MSparse<Complex> (a) { }
90 
92  const idx_vector& c, octave_idx_type nr = -1,
93  octave_idx_type nc = -1, bool sum_terms = true,
94  octave_idx_type nzm = -1)
95  : MSparse<Complex> (a, r, c, nr, nc, sum_terms, nzm) { }
96 
97  explicit SparseComplexMatrix (const SparseMatrix& a);
98 
99  explicit SparseComplexMatrix (const SparseBoolMatrix& a);
100 
101  explicit SparseComplexMatrix (const ComplexDiagMatrix& a);
102 
104  octave_idx_type num_nz)
105  : MSparse<Complex> (r, c, num_nz) { }
106 
108  {
110  return *this;
111  }
112 
113  bool operator == (const SparseComplexMatrix& a) const;
114  bool operator != (const SparseComplexMatrix& a) const;
115 
116  bool ishermitian (void) const;
117 
118  SparseComplexMatrix max (int dim = -1) const;
119  SparseComplexMatrix max (Array<octave_idx_type>& index, int dim = -1) const;
120  SparseComplexMatrix min (int dim = -1) const;
121  SparseComplexMatrix min (Array<octave_idx_type>& index, int dim = -1) const;
122 
128  const Array<octave_idx_type>& indx);
130  const Array<octave_idx_type>& indx);
131 
136 
137  ComplexMatrix matrix_value (void) const;
138 
139  SparseComplexMatrix hermitian (void) const; // complex conjugate transpose
141  { return MSparse<Complex>::transpose (); }
142 
143  friend SparseComplexMatrix conj (const SparseComplexMatrix& a);
144 
145  // extract row or column i.
146 
147  ComplexRowVector row (octave_idx_type i) const;
148 
149  ComplexColumnVector column (octave_idx_type i) const;
150 
151 private:
152  SparseComplexMatrix dinverse (MatrixType& mattype, octave_idx_type& info,
153  double& rcond, const bool force = false,
154  const bool calccond = true) const;
155 
156  SparseComplexMatrix tinverse (MatrixType& mattype, octave_idx_type& info,
157  double& rcond, const bool force = false,
158  const bool calccond = true) const;
159 
160 public:
161  SparseComplexMatrix inverse (void) const;
162  SparseComplexMatrix inverse (MatrixType& mattype) const;
163  SparseComplexMatrix inverse (MatrixType& mattype,
164  octave_idx_type& info) const;
165  SparseComplexMatrix inverse (MatrixType& mattype, octave_idx_type& info,
166  double& rcond, bool force = false,
167  bool calc_cond = true) const;
168 
169  ComplexDET determinant (void) const;
170  ComplexDET determinant (octave_idx_type& info) const;
171  ComplexDET determinant (octave_idx_type& info, double& rcond,
172  bool calc_cond = true) const;
173 
174 private:
175  // Diagonal matrix solvers
176  ComplexMatrix dsolve (MatrixType& mattype, const Matrix& b,
177  octave_idx_type& info, double& rcond,
178  solve_singularity_handler sing_handler,
179  bool calc_cond = false) const;
180 
181  ComplexMatrix dsolve (MatrixType& mattype, const ComplexMatrix& b,
182  octave_idx_type& info, double& rcond,
183  solve_singularity_handler sing_handler,
184  bool calc_cond = false) const;
185 
186  SparseComplexMatrix dsolve (MatrixType& mattype, const SparseMatrix& b,
187  octave_idx_type& info, double& rcond,
188  solve_singularity_handler sing_handler,
189  bool calc_cond = false) const;
190 
191  SparseComplexMatrix dsolve (MatrixType& mattype, const SparseComplexMatrix& b,
192  octave_idx_type& info, double& rcond,
193  solve_singularity_handler sing_handler,
194  bool calc_cond = false) const;
195 
196  // Upper triangular matrix solvers
197  ComplexMatrix utsolve (MatrixType& mattype, const Matrix& b,
198  octave_idx_type& info, double& rcond,
199  solve_singularity_handler sing_handler,
200  bool calc_cond = false) const;
201 
202  ComplexMatrix utsolve (MatrixType& mattype, const ComplexMatrix& b,
203  octave_idx_type& info, double& rcond,
204  solve_singularity_handler sing_handler,
205  bool calc_cond = false) const;
206 
208  octave_idx_type& info, double& rcond,
209  solve_singularity_handler sing_handler,
210  bool calc_cond = false) const;
211 
213  octave_idx_type& info, double& rcond,
214  solve_singularity_handler sing_handler,
215  bool calc_cond = false) const;
216 
217  // Lower triangular matrix solvers
218  ComplexMatrix ltsolve (MatrixType& mattype, const Matrix& b,
219  octave_idx_type& info, double& rcond,
220  solve_singularity_handler sing_handler,
221  bool calc_cond = false) const;
222 
223  ComplexMatrix ltsolve (MatrixType& mattype, const ComplexMatrix& b,
224  octave_idx_type& info, double& rcond,
225  solve_singularity_handler sing_handler,
226  bool calc_cond = false) const;
227 
229  octave_idx_type& info, double& rcond,
230  solve_singularity_handler sing_handler,
231  bool calc_cond = false) const;
232 
234  octave_idx_type& info, double& rcond,
235  solve_singularity_handler sing_handler,
236  bool calc_cond = false) const;
237 
238  // Tridiagonal matrix solvers
239  ComplexMatrix trisolve (MatrixType& mattype, const Matrix& b,
240  octave_idx_type& info, double& rcond,
241  solve_singularity_handler sing_handler,
242  bool calc_cond = false) const;
243 
244  ComplexMatrix trisolve (MatrixType& mattype, const ComplexMatrix& b,
245  octave_idx_type& info, double& rcond,
246  solve_singularity_handler sing_handler,
247  bool calc_cond = false) const;
248 
249  SparseComplexMatrix trisolve (MatrixType& mattype, const SparseMatrix& b,
250  octave_idx_type& info, double& rcond,
251  solve_singularity_handler sing_handler,
252  bool calc_cond = false) const;
253 
254  SparseComplexMatrix trisolve (MatrixType& mattype, const SparseComplexMatrix& b,
255  octave_idx_type& info, double& rcond,
256  solve_singularity_handler sing_handler,
257  bool calc_cond = false) const;
258 
259  // Banded matrix solvers (umfpack/cholesky)
260  ComplexMatrix bsolve (MatrixType& mattype, const Matrix& b,
261  octave_idx_type& info, double& rcond,
262  solve_singularity_handler sing_handler,
263  bool calc_cond = false) const;
264 
265  ComplexMatrix bsolve (MatrixType& mattype, const ComplexMatrix& b,
266  octave_idx_type& info, double& rcond,
267  solve_singularity_handler sing_handler,
268  bool calc_cond = false) const;
269 
270  SparseComplexMatrix bsolve (MatrixType& mattype, const SparseMatrix& b,
271  octave_idx_type& info, double& rcond,
272  solve_singularity_handler sing_handler,
273  bool calc_cond = false) const;
274 
275  SparseComplexMatrix bsolve (MatrixType& mattype, const SparseComplexMatrix& b,
276  octave_idx_type& info, double& rcond,
277  solve_singularity_handler sing_handler,
278  bool calc_cond = false) const;
279 
280  // Full matrix solvers (umfpack/cholesky)
281  void * factorize (octave_idx_type& err, double& rcond, Matrix& Control,
282  Matrix& Info, solve_singularity_handler sing_handler,
283  bool calc_cond) const;
284 
285  ComplexMatrix fsolve (MatrixType& mattype, const Matrix& b,
286  octave_idx_type& info, double& rcond,
287  solve_singularity_handler sing_handler,
288  bool calc_cond = false) const;
289 
290  ComplexMatrix fsolve (MatrixType& mattype, const ComplexMatrix& b,
291  octave_idx_type& info, double& rcond,
292  solve_singularity_handler sing_handler,
293  bool calc_cond = false) const;
294 
295  SparseComplexMatrix fsolve (MatrixType& mattype, const SparseMatrix& b,
296  octave_idx_type& info, double& rcond,
297  solve_singularity_handler sing_handler,
298  bool calc_cond = false) const;
299 
300  SparseComplexMatrix fsolve (MatrixType& mattype, const SparseComplexMatrix& b,
301  octave_idx_type& info, double& rcond,
302  solve_singularity_handler sing_handler,
303  bool calc_cond = false) const;
304 
305 public:
306  // Generic interface to solver with no probing of type
307  ComplexMatrix solve (MatrixType& mattype, const Matrix& b) const;
308  ComplexMatrix solve (MatrixType& mattype, const Matrix& b,
309  octave_idx_type& info) const;
310  ComplexMatrix solve (MatrixType& mattype, const Matrix& b,
311  octave_idx_type& info, double& rcond) const;
312  ComplexMatrix solve (MatrixType& mattype, const Matrix& b,
313  octave_idx_type& info,
314  double& rcond, solve_singularity_handler sing_handler,
315  bool singular_fallback = true) const;
316 
317  ComplexMatrix solve (MatrixType& mattype, const ComplexMatrix& b) const;
318  ComplexMatrix solve (MatrixType& mattype, const ComplexMatrix& b,
319  octave_idx_type& info) const;
320  ComplexMatrix solve (MatrixType& mattype, const ComplexMatrix& b,
321  octave_idx_type& info, double& rcond) const;
322  ComplexMatrix solve (MatrixType& mattype, const ComplexMatrix& b,
323  octave_idx_type& info, double& rcond,
324  solve_singularity_handler sing_handler,
325  bool singular_fallback = true) const;
326 
327  SparseComplexMatrix solve (MatrixType& mattype, const SparseMatrix& b) const;
328  SparseComplexMatrix solve (MatrixType& mattype, const SparseMatrix& b,
329  octave_idx_type& info) const;
330  SparseComplexMatrix solve (MatrixType& mattype, const SparseMatrix& b,
331  octave_idx_type& info, double& rcond) const;
332  SparseComplexMatrix solve (MatrixType& mattype, const SparseMatrix& b,
333  octave_idx_type& info, double& rcond,
334  solve_singularity_handler sing_handler,
335  bool singular_fallback = true) const;
336 
337  SparseComplexMatrix solve (MatrixType& mattype,
338  const SparseComplexMatrix& b) const;
339  SparseComplexMatrix solve (MatrixType& mattype, const SparseComplexMatrix& b,
340  octave_idx_type& info) const;
341  SparseComplexMatrix solve (MatrixType& mattype, const SparseComplexMatrix& b,
342  octave_idx_type& info, double& rcond) const;
343  SparseComplexMatrix solve (MatrixType& mattype, const SparseComplexMatrix& b,
344  octave_idx_type& info, double& rcond,
345  solve_singularity_handler sing_handler,
346  bool singular_fallback = true) const;
347 
348  ComplexColumnVector solve (MatrixType& mattype, const ColumnVector& b) const;
349  ComplexColumnVector solve (MatrixType& mattype, const ColumnVector& b,
350  octave_idx_type& info) const;
351  ComplexColumnVector solve (MatrixType& mattype, const ColumnVector& b,
352  octave_idx_type& info, double& rcond) const;
353  ComplexColumnVector solve (MatrixType& mattype, const ColumnVector& b,
354  octave_idx_type& info, double& rcond,
355  solve_singularity_handler sing_handler) const;
356 
357  ComplexColumnVector solve (MatrixType& mattype,
358  const ComplexColumnVector& b) const;
359  ComplexColumnVector solve (MatrixType& mattype, const ComplexColumnVector& b,
360  octave_idx_type& info) const;
361  ComplexColumnVector solve (MatrixType& mattype, const ComplexColumnVector& b,
362  octave_idx_type& info, double& rcond) const;
363  ComplexColumnVector solve (MatrixType& mattype, const ComplexColumnVector& b,
364  octave_idx_type& info, double& rcond,
365  solve_singularity_handler sing_handler) const;
366 
367  // Generic interface to solver with probing of type
368  ComplexMatrix solve (const Matrix& b) const;
369  ComplexMatrix solve (const Matrix& b, octave_idx_type& info) const;
370  ComplexMatrix solve (const Matrix& b, octave_idx_type& info,
371  double& rcond) const;
372  ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcond,
373  solve_singularity_handler sing_handler) const;
374 
376  ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const;
377  ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
378  double& rcond) const;
379  ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
380  double& rcond,
381  solve_singularity_handler sing_handler) const;
382 
383  SparseComplexMatrix solve (const SparseMatrix& b) const;
384  SparseComplexMatrix solve (const SparseMatrix& b,
385  octave_idx_type& info) const;
386  SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info,
387  double& rcond) const;
388  SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info,
389  double& rcond,
390  solve_singularity_handler sing_handler) const;
391 
392  SparseComplexMatrix solve (const SparseComplexMatrix& b) const;
394  octave_idx_type& info) const;
396  octave_idx_type& info, double& rcond) const;
398  octave_idx_type& info, double& rcond,
399  solve_singularity_handler sing_handler) const;
400 
401  ComplexColumnVector solve (const ColumnVector& b) const;
402  ComplexColumnVector solve (const ColumnVector& b,
403  octave_idx_type& info) const;
404  ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info,
405  double& rcond) const;
406  ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info,
407  double& rcond,
408  solve_singularity_handler sing_handler) const;
409 
410  ComplexColumnVector solve (const ComplexColumnVector& b) const;
412  octave_idx_type& info) const;
414  octave_idx_type& info, double& rcond) const;
416  octave_idx_type& info, double& rcond,
417  solve_singularity_handler sing_handler) const;
418 
419  SparseComplexMatrix squeeze (void) const;
420 
421  SparseComplexMatrix reshape (const dim_vector& new_dims) const;
422 
424  bool inv = false) const;
425 
427 
428  bool any_element_is_nan (void) const;
429  bool any_element_is_inf_or_nan (void) const;
430  bool all_elements_are_real (void) const;
431  bool all_integers (double& max_val, double& min_val) const;
432  bool too_large_for_float (void) const;
433 
434  SparseBoolMatrix operator ! (void) const;
435 
436  SparseBoolMatrix all (int dim = -1) const;
437  SparseBoolMatrix any (int dim = -1) const;
438 
439  SparseComplexMatrix cumprod (int dim = -1) const;
440  SparseComplexMatrix cumsum (int dim = -1) const;
441  SparseComplexMatrix prod (int dim = -1) const;
442  SparseComplexMatrix sum (int dim = -1) const;
443  SparseComplexMatrix sumsq (int dim = -1) const;
444  SparseMatrix abs (void) const;
445 
447 
448  // i/o
449  friend OCTAVE_API std::ostream& operator << (std::ostream& os,
450  const SparseComplexMatrix& a);
451  friend OCTAVE_API std::istream& operator >> (std::istream& is,
453 };
454 
455 extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&,
456  const SparseComplexMatrix&);
457 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
458  const SparseMatrix&);
459 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
460  const SparseComplexMatrix&);
461 
462 extern OCTAVE_API ComplexMatrix operator * (const Matrix&,
463  const SparseComplexMatrix&);
464 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&,
465  const SparseMatrix&);
466 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&,
467  const SparseComplexMatrix&);
468 extern OCTAVE_API ComplexMatrix mul_trans (const ComplexMatrix&,
469  const SparseComplexMatrix&);
470 extern OCTAVE_API ComplexMatrix mul_herm (const ComplexMatrix&,
471  const SparseComplexMatrix&);
472 
473 extern OCTAVE_API ComplexMatrix operator * (const SparseMatrix&,
474  const ComplexMatrix&);
475 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&,
476  const Matrix&);
477 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&,
478  const ComplexMatrix&);
479 extern OCTAVE_API ComplexMatrix trans_mul (const SparseComplexMatrix&,
480  const ComplexMatrix&);
481 extern OCTAVE_API ComplexMatrix herm_mul (const SparseComplexMatrix&,
482  const ComplexMatrix&);
483 
484 extern OCTAVE_API SparseComplexMatrix operator * (const DiagMatrix&,
485  const SparseComplexMatrix&);
486 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
487  const DiagMatrix&);
488 
489 extern OCTAVE_API SparseComplexMatrix operator * (const ComplexDiagMatrix&,
490  const SparseMatrix&);
491 extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&,
492  const ComplexDiagMatrix&);
493 
494 extern OCTAVE_API SparseComplexMatrix operator * (const ComplexDiagMatrix&,
495  const SparseComplexMatrix&);
496 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
497  const ComplexDiagMatrix&);
498 
499 extern OCTAVE_API SparseComplexMatrix operator + (const ComplexDiagMatrix&,
500  const SparseMatrix&);
501 extern OCTAVE_API SparseComplexMatrix operator + (const DiagMatrix&,
502  const SparseComplexMatrix&);
503 extern OCTAVE_API SparseComplexMatrix operator + (const ComplexDiagMatrix&,
504  const SparseComplexMatrix&);
505 extern OCTAVE_API SparseComplexMatrix operator + (const SparseMatrix&,
506  const ComplexDiagMatrix&);
507 extern OCTAVE_API SparseComplexMatrix operator + (const SparseComplexMatrix&,
508  const DiagMatrix&);
509 extern OCTAVE_API SparseComplexMatrix operator + (const SparseComplexMatrix&,
510  const ComplexDiagMatrix&);
511 
512 extern OCTAVE_API SparseComplexMatrix operator - (const ComplexDiagMatrix&,
513  const SparseMatrix&);
514 extern OCTAVE_API SparseComplexMatrix operator - (const DiagMatrix&,
515  const SparseComplexMatrix&);
516 extern OCTAVE_API SparseComplexMatrix operator - (const ComplexDiagMatrix&,
517  const SparseComplexMatrix&);
518 extern OCTAVE_API SparseComplexMatrix operator - (const SparseMatrix&,
519  const ComplexDiagMatrix&);
520 extern OCTAVE_API SparseComplexMatrix operator - (const SparseComplexMatrix&,
521  const DiagMatrix&);
522 extern OCTAVE_API SparseComplexMatrix operator - (const SparseComplexMatrix&,
523  const ComplexDiagMatrix&);
524 
525 extern OCTAVE_API SparseComplexMatrix operator * (const PermMatrix&,
526  const SparseComplexMatrix&);
527 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
528  const PermMatrix&);
529 
530 extern OCTAVE_API SparseComplexMatrix min (const Complex& c,
531  const SparseComplexMatrix& m);
532 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& m,
533  const Complex& c);
534 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& a,
535  const SparseComplexMatrix& b);
536 
537 extern OCTAVE_API SparseComplexMatrix max (const Complex& c,
538  const SparseComplexMatrix& m);
539 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& m,
540  const Complex& c);
541 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& a,
542  const SparseComplexMatrix& b);
543 
546 
549 
552 
554 
555 #endif
template OCTAVE_API std::ostream & operator<<(std::ostream &, const Array< bool > &)
ComplexColumnVector conj(const ComplexColumnVector &a)
Definition: CColVector.cc:217
ComplexNDArray concat(NDArray &ra, ComplexNDArray &rb, const Array< octave_idx_type > &ra_idx)
Definition: CNDArray.cc:418
OCTAVE_API ComplexMatrix mul_trans(const ComplexMatrix &, const SparseComplexMatrix &)
Definition: CSparse.cc:7543
OCTAVE_API SparseComplexMatrix operator+(const ComplexDiagMatrix &, const SparseMatrix &)
Definition: CSparse.cc:7619
OCTAVE_API SparseComplexMatrix operator*(const SparseMatrix &, const SparseComplexMatrix &)
Definition: CSparse.cc:7513
OCTAVE_API ComplexMatrix mul_herm(const ComplexMatrix &, const SparseComplexMatrix &)
Definition: CSparse.cc:7549
OCTAVE_API SparseComplexMatrix operator-(const ComplexDiagMatrix &, const SparseMatrix &)
Definition: CSparse.cc:7650
OCTAVE_API ComplexMatrix trans_mul(const SparseComplexMatrix &, const ComplexMatrix &)
Definition: CSparse.cc:7573
OCTAVE_API SparseComplexMatrix min(const Complex &c, const SparseComplexMatrix &m)
Definition: CSparse.cc:7701
OCTAVE_API ComplexMatrix herm_mul(const SparseComplexMatrix &, const ComplexMatrix &)
Definition: CSparse.cc:7579
OCTAVE_API SparseComplexMatrix max(const Complex &c, const SparseComplexMatrix &m)
Definition: CSparse.cc:7818
#define SPARSE_FORWARD_DEFS(B, R, F, T)
Definition: MSparse.h:190
#define SPARSE_SMSM_CMP_OP_DECLS(M1, M2, API)
#define SPARSE_SMSM_BOOL_OP_DECLS(M1, M2, API)
#define SPARSE_SSM_CMP_OP_DECLS(S, M, API)
#define SPARSE_SMS_BOOL_OP_DECLS(M, S, API)
#define SPARSE_SSM_BOOL_OP_DECLS(S, M, API)
#define SPARSE_SMS_CMP_OP_DECLS(M, S, API)
std::istream & operator>>(std::istream &is, SparseBoolMatrix &a)
Definition: boolSparse.cc:281
N Dimensional Array with copy-on-write semantics.
Definition: Array.h:128
MSparse< T > transpose(void) const
Definition: MSparse.h:94
MSparse< T > & operator=(const MSparse< T > &a)
Definition: MSparse.h:76
Definition: dMatrix.h:42
SparseBoolMatrix & insert(const SparseBoolMatrix &a, octave_idx_type r, octave_idx_type c)
Definition: boolSparse.cc:77
SparseBoolMatrix reshape(const dim_vector &new_dims) const
Definition: boolSparse.cc:308
SparseBoolMatrix ipermute(const Array< octave_idx_type > &vec) const
Definition: boolSparse.cc:320
SparseBoolMatrix permute(const Array< octave_idx_type > &vec, bool inv=false) const
Definition: boolSparse.cc:314
SparseBoolMatrix index(const idx_vector &i, bool resize_ok) const
Definition: boolSparse.cc:295
SparseBoolMatrix diag(octave_idx_type k=0) const
Definition: boolSparse.cc:244
SparseBoolMatrix squeeze(void) const
Definition: boolSparse.cc:289
SparseBoolMatrix all(int dim=-1) const
Definition: boolSparse.cc:140
boolMatrix matrix_value(void) const
Definition: boolSparse.cc:250
SparseMatrix sum(int dim=-1) const
Definition: boolSparse.cc:193
SparseBoolMatrix & operator=(const SparseBoolMatrix &a)
Definition: boolSparse.h:82
SparseBoolMatrix any(int dim=-1) const
Definition: boolSparse.cc:146
SparseComplexMatrix(const ComplexNDArray &a)
Definition: CSparse.h:88
SparseComplexMatrix(const ComplexMatrix &a)
Definition: CSparse.h:85
SparseComplexMatrix(const Sparse< Complex > &a)
Definition: CSparse.h:83
SparseComplexMatrix(octave_idx_type r, octave_idx_type c, double val)
Definition: CSparse.h:72
SparseComplexMatrix(octave_idx_type r, octave_idx_type c)
Definition: CSparse.h:62
SparseComplexMatrix(const SparseComplexMatrix &a)
Definition: CSparse.h:75
SparseComplexMatrix(const dim_vector &dv, octave_idx_type nz=0)
Definition: CSparse.h:65
SparseComplexMatrix(const MSparse< Complex > &a)
Definition: CSparse.h:81
ComplexMatrix solve(const ComplexMatrix &b) const
SparseComplexMatrix transpose(void) const
Definition: CSparse.h:140
SparseComplexMatrix(void)
Definition: CSparse.h:60
ComplexMatrix dense_matrix_type
Definition: CSparse.h:56
SparseComplexMatrix(octave_idx_type r, octave_idx_type c, Complex val)
Definition: CSparse.h:68
SparseComplexMatrix(const Array< Complex > &a, const idx_vector &r, const idx_vector &c, octave_idx_type nr=-1, octave_idx_type nc=-1, bool sum_terms=true, octave_idx_type nzm=-1)
Definition: CSparse.h:91
SparseComplexMatrix(octave_idx_type r, octave_idx_type c, octave_idx_type num_nz)
Definition: CSparse.h:103
SparseComplexMatrix(const SparseComplexMatrix &a, const dim_vector &dv)
Definition: CSparse.h:78
Definition: Sparse.h:49
bool any_element_is_nan(void) const
Definition: Sparse.h:647
Definition: DET.h:39
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:95
bool operator!=(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:601
bool operator==(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:585
static M utsolve(const SM &U, const ColumnVector &Q, const M &m)
Definition: eigs-base.cc:258
static M ltsolve(const SM &L, const ColumnVector &Q, const M &m)
Definition: eigs-base.cc:238
T octave_idx_type m
Definition: mx-inlines.cc:773
T * r
Definition: mx-inlines.cc:773
std::complex< double > Complex
Definition: oct-cmplx.h:33
const octave_base_value const Array< octave_idx_type > & ra_idx
octave_value operator!(const octave_value &a)
Definition: ov.h:1536
static T abs(T x)
Definition: pr-output.cc:1678