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