GNU Octave  4.2.1
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-2017 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 "octave-config.h"
28 
29 #include "dMatrix.h"
30 #include "dNDArray.h"
31 #include "CMatrix.h"
32 #include "CNDArray.h"
33 #include "dColVector.h"
34 #include "CColVector.h"
35 #include "oct-cmplx.h"
36 
37 #include "DET.h"
38 #include "MSparse.h"
39 
40 #include "Sparse-op-decls.h"
41 
42 #include "MatrixType.h"
43 
44 class PermMatrix;
45 class DiagMatrix;
46 class ComplexDiagMatrix;
47 class SparseMatrix;
48 class SparseBoolMatrix;
49 
50 class
51 OCTAVE_API
53 {
54 public:
55 
56  // Corresponding dense matrix type for this sparse matrix type.
58 
59  typedef void (*solve_singularity_handler) (double rcond);
60 
62 
64  octave_idx_type c) : MSparse<Complex> (r, c) { }
65 
67  : MSparse<Complex> (dv, nz) { }
68 
70  Complex val)
71  : MSparse<Complex> (r, c, val) { }
72 
74  : MSparse<Complex> (r, c, Complex (val)) { }
75 
77  : MSparse<Complex> (a) { }
78 
80  : MSparse<Complex> (a, dv) { }
81 
83 
85 
87  : MSparse<Complex> (a) { }
88 
90  : MSparse<Complex> (a) { }
91 
93  const idx_vector& c, octave_idx_type nr = -1,
94  octave_idx_type nc = -1, bool sum_terms = true,
95  octave_idx_type nzm = -1)
96  : MSparse<Complex> (a, r, c, nr, nc, sum_terms, nzm) { }
97 
98  explicit SparseComplexMatrix (const SparseMatrix& a);
99 
100  explicit SparseComplexMatrix (const SparseBoolMatrix& a);
101 
102  explicit SparseComplexMatrix (const ComplexDiagMatrix& a);
103 
105  octave_idx_type num_nz)
106  : MSparse<Complex> (r, c, num_nz) { }
107 
109  {
111  return *this;
112  }
113 
114  bool operator == (const SparseComplexMatrix& a) const;
115  bool operator != (const SparseComplexMatrix& a) const;
116 
117  bool is_hermitian (void) const;
118 
119  SparseComplexMatrix max (int dim = -1) const;
120  SparseComplexMatrix max (Array<octave_idx_type>& index, int dim = -1) const;
121  SparseComplexMatrix min (int dim = -1) const;
122  SparseComplexMatrix min (Array<octave_idx_type>& index, int dim = -1) const;
123 
129  const Array<octave_idx_type>& indx);
131  const Array<octave_idx_type>& indx);
132 
137 
138  ComplexMatrix matrix_value (void) const;
139 
140  SparseComplexMatrix hermitian (void) const; // complex conjugate transpose
142  { return MSparse<Complex>::transpose (); }
143 
145 
146  // extract row or column i.
147 
149 
151 
152 private:
153  SparseComplexMatrix dinverse (MatrixType &mattyp, octave_idx_type& info,
154  double& rcond, const bool force = false,
155  const bool calccond = true) const;
156 
157  SparseComplexMatrix tinverse (MatrixType &mattyp, octave_idx_type& info,
158  double& rcond, const bool force = false,
159  const bool calccond = true) const;
160 
161 public:
162  SparseComplexMatrix inverse (void) const;
163  SparseComplexMatrix inverse (MatrixType& mattype) const;
164  SparseComplexMatrix inverse (MatrixType& mattype,
165  octave_idx_type& info) const;
166  SparseComplexMatrix inverse (MatrixType& mattype, octave_idx_type& info,
167  double& rcond, bool force = false,
168  bool calc_cond = true) const;
169 
170  ComplexDET determinant (void) const;
171  ComplexDET determinant (octave_idx_type& info) const;
172  ComplexDET determinant (octave_idx_type& info, double& rcond,
173  bool calc_cond = true) const;
174 
175 private:
176  // Diagonal matrix solvers
177  ComplexMatrix dsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
178  double& rcond, solve_singularity_handler sing_handler,
179  bool calc_cond = false) const;
180 
181  ComplexMatrix dsolve (MatrixType &typ, 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 &typ, const SparseMatrix& b,
187  octave_idx_type& info, double& rcond,
188  solve_singularity_handler sing_handler,
189  bool calc_cond = false) const;
190 
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 &typ, const Matrix& b,
198  octave_idx_type& info, double& rcond,
199  solve_singularity_handler sing_handler,
200  bool calc_cond = false) const;
201 
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 &typ, const Matrix& b,
219  octave_idx_type& info, double& rcond,
220  solve_singularity_handler sing_handler,
221  bool calc_cond = false) const;
222 
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 &typ, 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 &typ, 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 &typ, 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 &typ, 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 &typ, 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 &typ, 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 &typ, const SparseMatrix& b,
271  octave_idx_type& info, double& rcond,
272  solve_singularity_handler sing_handler,
273  bool calc_cond = false) const;
274 
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 &typ, 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 &typ, 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 &typ, const SparseMatrix& b,
296  octave_idx_type& info, double& rcond,
297  solve_singularity_handler sing_handler,
298  bool calc_cond = false) const;
299 
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 &typ, const Matrix& b) const;
308  ComplexMatrix solve (MatrixType &typ, const Matrix& b,
309  octave_idx_type& info) const;
310  ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
311  double& rcond) const;
312  ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
313  double& rcond, solve_singularity_handler sing_handler,
314  bool singular_fallback = true) const;
315 
316  ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b) const;
317  ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
318  octave_idx_type& info) const;
319  ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
320  octave_idx_type& info, double& rcond) const;
321  ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
322  octave_idx_type& info, double& rcond,
323  solve_singularity_handler sing_handler,
324  bool singular_fallback = true) const;
325 
326  SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b) const;
327  SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b,
328  octave_idx_type& info) const;
329  SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b,
330  octave_idx_type& info, double& rcond) const;
331  SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b,
332  octave_idx_type& info, double& rcond,
333  solve_singularity_handler sing_handler,
334  bool singular_fallback = true) const;
335 
336  SparseComplexMatrix solve (MatrixType &typ,
337  const SparseComplexMatrix& b) const;
339  octave_idx_type& info) const;
341  octave_idx_type& info, double& rcond) const;
343  octave_idx_type& info, double& rcond,
344  solve_singularity_handler sing_handler,
345  bool singular_fallback = true) const;
346 
347  ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b) const;
348  ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b,
349  octave_idx_type& info) const;
350  ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b,
351  octave_idx_type& info, double& rcond) const;
352  ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b,
353  octave_idx_type& info, double& rcond,
354  solve_singularity_handler sing_handler) const;
355 
356  ComplexColumnVector solve (MatrixType &typ,
357  const ComplexColumnVector& b) const;
359  octave_idx_type& info) const;
361  octave_idx_type& info, double& rcond) const;
363  octave_idx_type& info, double& rcond,
364  solve_singularity_handler sing_handler) const;
365 
366  // Generic interface to solver with probing of type
367  ComplexMatrix solve (const Matrix& b) const;
368  ComplexMatrix solve (const Matrix& b, octave_idx_type& info) const;
369  ComplexMatrix solve (const Matrix& b, octave_idx_type& info,
370  double& rcond) const;
371  ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcond,
372  solve_singularity_handler sing_handler) const;
373 
374  ComplexMatrix solve (const ComplexMatrix& b) const;
375  ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const;
376  ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
377  double& rcond) const;
378  ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
379  double& rcond,
380  solve_singularity_handler sing_handler) const;
381 
382  SparseComplexMatrix solve (const SparseMatrix& b) const;
383  SparseComplexMatrix solve (const SparseMatrix& b,
384  octave_idx_type& info) const;
385  SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info,
386  double& rcond) const;
387  SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info,
388  double& rcond,
389  solve_singularity_handler sing_handler) const;
390 
391  SparseComplexMatrix solve (const SparseComplexMatrix& b) const;
393  octave_idx_type& info) const;
395  octave_idx_type& info, double& rcond) const;
397  octave_idx_type& info, double& rcond,
398  solve_singularity_handler sing_handler) const;
399 
400  ComplexColumnVector solve (const ColumnVector& b) const;
401  ComplexColumnVector solve (const ColumnVector& b,
402  octave_idx_type& info) const;
403  ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info,
404  double& rcond) const;
405  ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info,
406  double& rcond,
407  solve_singularity_handler sing_handler) const;
408 
409  ComplexColumnVector solve (const ComplexColumnVector& b) const;
411  octave_idx_type& info) const;
413  octave_idx_type& info, double& rcond) const;
415  octave_idx_type& info, double& rcond,
416  solve_singularity_handler sing_handler) const;
417 
418  SparseComplexMatrix squeeze (void) const;
419 
420  SparseComplexMatrix reshape (const dim_vector& new_dims) const;
421 
423  bool inv = false) const;
424 
426 
427  bool any_element_is_nan (void) const;
428  bool any_element_is_inf_or_nan (void) const;
429  bool all_elements_are_real (void) const;
430  bool all_integers (double& max_val, double& min_val) const;
431  bool too_large_for_float (void) const;
432 
433  SparseBoolMatrix operator ! (void) const;
434 
435  SparseBoolMatrix all (int dim = -1) const;
436  SparseBoolMatrix any (int dim = -1) const;
437 
438  SparseComplexMatrix cumprod (int dim = -1) const;
439  SparseComplexMatrix cumsum (int dim = -1) const;
440  SparseComplexMatrix prod (int dim = -1) const;
441  SparseComplexMatrix sum (int dim = -1) const;
442  SparseComplexMatrix sumsq (int dim = -1) const;
443  SparseMatrix abs (void) const;
444 
446 
447  // i/o
448  friend OCTAVE_API std::ostream& operator << (std::ostream& os,
449  const SparseComplexMatrix& a);
450  friend OCTAVE_API std::istream& operator >> (std::istream& is,
452 };
453 
454 extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&,
455  const SparseComplexMatrix&);
456 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
457  const SparseMatrix&);
458 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
459  const SparseComplexMatrix&);
460 
461 extern OCTAVE_API ComplexMatrix operator * (const Matrix&,
462  const SparseComplexMatrix&);
463 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&,
464  const SparseMatrix&);
465 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&,
466  const SparseComplexMatrix&);
467 extern OCTAVE_API ComplexMatrix mul_trans (const ComplexMatrix&,
468  const SparseComplexMatrix&);
469 extern OCTAVE_API ComplexMatrix mul_herm (const ComplexMatrix&,
470  const SparseComplexMatrix&);
471 
472 extern OCTAVE_API ComplexMatrix operator * (const SparseMatrix&,
473  const ComplexMatrix&);
474 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&,
475  const Matrix&);
476 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&,
477  const ComplexMatrix&);
478 extern OCTAVE_API ComplexMatrix trans_mul (const SparseComplexMatrix&,
479  const ComplexMatrix&);
480 extern OCTAVE_API ComplexMatrix herm_mul (const SparseComplexMatrix&,
481  const ComplexMatrix&);
482 
483 extern OCTAVE_API SparseComplexMatrix operator * (const DiagMatrix&,
484  const SparseComplexMatrix&);
485 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
486  const DiagMatrix&);
487 
488 extern OCTAVE_API SparseComplexMatrix operator * (const ComplexDiagMatrix&,
489  const SparseMatrix&);
490 extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&,
491  const ComplexDiagMatrix&);
492 
493 extern OCTAVE_API SparseComplexMatrix operator * (const ComplexDiagMatrix&,
494  const SparseComplexMatrix&);
495 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
496  const ComplexDiagMatrix&);
497 
498 extern OCTAVE_API SparseComplexMatrix operator + (const ComplexDiagMatrix&,
499  const SparseMatrix&);
500 extern OCTAVE_API SparseComplexMatrix operator + (const DiagMatrix&,
501  const SparseComplexMatrix&);
502 extern OCTAVE_API SparseComplexMatrix operator + (const ComplexDiagMatrix&,
503  const SparseComplexMatrix&);
504 extern OCTAVE_API SparseComplexMatrix operator + (const SparseMatrix&,
505  const ComplexDiagMatrix&);
506 extern OCTAVE_API SparseComplexMatrix operator + (const SparseComplexMatrix&,
507  const DiagMatrix&);
508 extern OCTAVE_API SparseComplexMatrix operator + (const SparseComplexMatrix&,
509  const ComplexDiagMatrix&);
510 
511 extern OCTAVE_API SparseComplexMatrix operator - (const ComplexDiagMatrix&,
512  const SparseMatrix&);
513 extern OCTAVE_API SparseComplexMatrix operator - (const DiagMatrix&,
514  const SparseComplexMatrix&);
515 extern OCTAVE_API SparseComplexMatrix operator - (const ComplexDiagMatrix&,
516  const SparseComplexMatrix&);
517 extern OCTAVE_API SparseComplexMatrix operator - (const SparseMatrix&,
518  const ComplexDiagMatrix&);
519 extern OCTAVE_API SparseComplexMatrix operator - (const SparseComplexMatrix&,
520  const DiagMatrix&);
521 extern OCTAVE_API SparseComplexMatrix operator - (const SparseComplexMatrix&,
522  const ComplexDiagMatrix&);
523 
524 extern OCTAVE_API SparseComplexMatrix operator * (const PermMatrix&,
525  const SparseComplexMatrix&);
526 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
527  const PermMatrix&);
528 
529 extern OCTAVE_API SparseComplexMatrix min (const Complex& c,
530  const SparseComplexMatrix& m);
531 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& m,
532  const Complex& c);
533 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& a,
534  const SparseComplexMatrix& b);
535 
536 extern OCTAVE_API SparseComplexMatrix max (const Complex& c,
537  const SparseComplexMatrix& m);
538 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& m,
539  const Complex& c);
540 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& a,
541  const SparseComplexMatrix& b);
542 
545 
546 SPARSE_SSM_CMP_OP_DECLS (Complex, SparseComplexMatrix, OCTAVE_API)
547 SPARSE_SSM_BOOL_OP_DECLS (Complex, SparseComplexMatrix, OCTAVE_API)
548 
549 SPARSE_SMSM_CMP_OP_DECLS (SparseComplexMatrix, SparseComplexMatrix, OCTAVE_API)
550 SPARSE_SMSM_BOOL_OP_DECLS (SparseComplexMatrix, SparseComplexMatrix, OCTAVE_API)
551 
552 SPARSE_FORWARD_DEFS (MSparse, SparseComplexMatrix, ComplexMatrix, Complex)
553 
554 #endif
SparseComplexMatrix(const ComplexNDArray &a)
Definition: CSparse.h:89
boolMatrix matrix_value(void) const
Definition: boolSparse.cc:248
OCTAVE_EXPORT octave_value_list column
Definition: sparse.cc:123
#define SPARSE_SMSM_BOOL_OP_DECLS(M1, M2, API)
SparseComplexMatrix(const MSparse< Complex > &a)
Definition: CSparse.h:82
bool operator!=(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:567
const octave_base_value const Array< octave_idx_type > & ra_idx
std::istream & operator>>(std::istream &is, SparseBoolMatrix &a)
Definition: boolSparse.cc:279
ComplexMatrix dense_matrix_type
Definition: CSparse.h:57
SparseBoolMatrix ipermute(const Array< octave_idx_type > &vec) const
Definition: boolSparse.cc:318
identity matrix If supplied two scalar respectively For allows like xample val
Definition: data.cc:5068
OCTAVE_API ComplexMatrix trans_mul(const SparseComplexMatrix &, const ComplexMatrix &)
Definition: CSparse.cc:7403
SparseBoolMatrix & operator=(const SparseBoolMatrix &a)
Definition: boolSparse.h:82
for large enough k
Definition: lu.cc:606
ComplexNDArray concat(NDArray &ra, ComplexNDArray &rb, const Array< octave_idx_type > &ra_idx)
Definition: CNDArray.cc:655
SparseComplexMatrix(const dim_vector &dv, octave_idx_type nz=0)
Definition: CSparse.h:66
OCTAVE_API SparseComplexMatrix max(const Complex &c, const SparseComplexMatrix &m)
Definition: CSparse.cc:7648
#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
#define SPARSE_FORWARD_DEFS(B, R, F, T)
Definition: MSparse.h:188
#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
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition: cellfun.cc:398
SparseComplexMatrix transpose(void) const
Definition: CSparse.h:141
SparseComplexMatrix(void)
Definition: CSparse.h:61
SparseComplexMatrix(octave_idx_type r, octave_idx_type c)
Definition: CSparse.h:63
SparseComplexMatrix(const SparseComplexMatrix &a)
Definition: CSparse.h:76
ComplexColumnVector conj(const ComplexColumnVector &a)
Definition: CColVector.cc:216
#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)
nd deftypefn *octave_map m
Definition: ov-struct.cc:2058
SparseComplexMatrix(octave_idx_type r, octave_idx_type c, Complex val)
Definition: CSparse.h:69
Definition: DET.h:33
OCTAVE_API SparseComplexMatrix operator*(const SparseMatrix &, const SparseComplexMatrix &)
Definition: CSparse.cc:7343
OCTAVE_API ComplexMatrix mul_herm(const ComplexMatrix &, const SparseComplexMatrix &)
Definition: CSparse.cc:7379
OCTAVE_API SparseComplexMatrix operator+(const ComplexDiagMatrix &, const SparseMatrix &)
Definition: CSparse.cc:7449
SparseBoolMatrix & insert(const SparseBoolMatrix &a, octave_idx_type r, octave_idx_type c)
Definition: boolSparse.cc:75
static M ltsolve(const SM &L, const ColumnVector &Q, const M &m)
Definition: eigs-base.cc:79
SparseComplexMatrix(octave_idx_type r, octave_idx_type c, octave_idx_type num_nz)
Definition: CSparse.h:104
Definition: dMatrix.h:37
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
Definition: lu.cc:138
MSparse< T > & operator=(const MSparse< T > &a)
Definition: MSparse.h:74
SparseBoolMatrix squeeze(void) const
Definition: boolSparse.cc:287
bool operator==(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:538
SparseComplexMatrix(octave_idx_type r, octave_idx_type c, double val)
Definition: CSparse.h:73
MSparse< T > transpose(void) const
Definition: MSparse.h:92
OCTAVE_API SparseComplexMatrix operator-(const ComplexDiagMatrix &, const SparseMatrix &)
Definition: CSparse.cc:7480
SparseComplexMatrix(const Sparse< Complex > &a)
Definition: CSparse.h:84
=val(i)}if ode{val(i)}occurs in table i
Definition: lookup.cc:239
OCTAVE_EXPORT octave_value_list return the value of the option it must match the dimension of the state and the relative tolerance must also be a vector of the same length tem it must match the dimension of the state and the absolute tolerance must also be a vector of the same length The local error test applied at each integration step is xample roup abs(local error in x(i))<
template OCTAVE_API std::ostream & operator<<(std::ostream &, const Array< bool > &)
OCTAVE_API ComplexMatrix mul_trans(const ComplexMatrix &, const SparseComplexMatrix &)
Definition: CSparse.cc:7373
OCTAVE_API ComplexMatrix herm_mul(const SparseComplexMatrix &, const ComplexMatrix &)
Definition: CSparse.cc:7409
b
Definition: cellfun.cc:398
static M utsolve(const SM &U, const ColumnVector &Q, const M &m)
Definition: eigs-base.cc:106
OCTAVE_EXPORT octave_value_list error nd deftypefn *const octave_scalar_map err
Definition: error.cc:1036
SparseBoolMatrix diag(octave_idx_type k=0) const
Definition: boolSparse.cc:242
octave_value operator!(const octave_value &a)
Definition: ov.h:1484
std::complex< double > Complex
Definition: oct-cmplx.h:31
OCTAVE_API SparseComplexMatrix min(const Complex &c, const SparseComplexMatrix &m)
Definition: CSparse.cc:7531
write the output to stdout if nargout is
Definition: load-save.cc:1576
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:87
the second is matched to the second specifier and placed in the second column and so forth If there are more words than specifiers then the process is repeated until all words have been processed or the limit imposed by any(non-whitespace) text in the format that is not one of these specifiers is considered a literal.If there is a literal between two format specifiers then that same literal must appear in the input stream between the matching words.The following specifiers are valid
Definition: file-io.cc:1491
SparseComplexMatrix(const ComplexMatrix &a)
Definition: CSparse.h:86
dim_vector dv
Definition: sub2ind.cc:263
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:92
where the brackets indicate optional arguments and and character or cell array For character arrays the conversion is repeated for every row
Definition: str2double.cc:342
SparseComplexMatrix(const SparseComplexMatrix &a, const dim_vector &dv)
Definition: CSparse.h:79
bool any_element_is_nan(void) const
Definition: Sparse.h:698