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
dSparse.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_dSparse_h)
25 #define octave_dSparse_h 1
26 
27 #include "octave-config.h"
28 
29 #include "dMatrix.h"
30 #include "dNDArray.h"
31 #include "CMatrix.h"
32 #include "dColVector.h"
33 #include "CColVector.h"
34 
35 #include "DET.h"
36 #include "MSparse.h"
37 
38 #include "Sparse-op-decls.h"
39 
40 #include "MatrixType.h"
41 
42 class PermMatrix;
43 class DiagMatrix;
45 class SparseBoolMatrix;
46 
47 class
48 OCTAVE_API
50 {
51 public:
52 
53  // Corresponding dense matrix type for this sparse matrix type.
55 
56  typedef void (*solve_singularity_handler) (double rcond);
57 
58  SparseMatrix (void) : MSparse<double> () { }
59 
61  : MSparse<double> (r, c) { }
62 
64  MSparse<double> (dv, nz) { }
65 
67  : MSparse<double> (r, c, val) { }
68 
70 
72  : MSparse<double> (a, dv) { }
73 
75 
77 
78  explicit SparseMatrix (const SparseBoolMatrix& a);
79 
80  explicit SparseMatrix (const Matrix& a) : MSparse<double> (a) { }
81 
82  explicit SparseMatrix (const NDArray& a) : MSparse<double> (a) { }
83 
85  const idx_vector& c, octave_idx_type nr = -1,
86  octave_idx_type nc = -1, bool sum_terms = true,
87  octave_idx_type nzm = -1)
88  : MSparse<double> (a, r, c, nr, nc, sum_terms, nzm) { }
89 
90  explicit SparseMatrix (const DiagMatrix& a);
91 
92  explicit SparseMatrix (const PermMatrix& a) : MSparse<double>(a) { }
93 
95  octave_idx_type num_nz) : MSparse<double> (r, c, num_nz) { }
96 
98  {
100  return *this;
101  }
102 
103  bool operator == (const SparseMatrix& a) const;
104  bool operator != (const SparseMatrix& a) const;
105 
106  bool is_symmetric (void) const;
107 
108  SparseMatrix max (int dim = -1) const;
109  SparseMatrix max (Array<octave_idx_type>& index, int dim = -1) const;
110  SparseMatrix min (int dim = -1) const;
111  SparseMatrix min (Array<octave_idx_type>& index, int dim = -1) const;
112 
113  // destructive insert/delete/reorder operations
114 
117 
119  const Array<octave_idx_type>& indx);
120 
121  SparseMatrix concat (const SparseMatrix& rb,
125 
126  friend OCTAVE_API SparseMatrix real (const SparseComplexMatrix& a);
127  friend OCTAVE_API SparseMatrix imag (const SparseComplexMatrix& a);
128 
129  OCTAVE_DEPRECATED ("use 'Fatan2' instead")
130  OCTAVE_API friend
131  SparseMatrix atan2 (const double& x, const SparseMatrix& y);
132 
133  OCTAVE_DEPRECATED ("use 'Fatan2' instead")
134  OCTAVE_API friend
135  SparseMatrix atan2 (const SparseMatrix& x, const double& y);
136 
137  OCTAVE_DEPRECATED ("use 'Fatan2' instead")
138  OCTAVE_API friend
139  SparseMatrix atan2 (const SparseMatrix& x, const SparseMatrix& y);
140 
141  SparseMatrix transpose (void) const
142  {
143  return MSparse<double>::transpose ();
144  }
145  SparseMatrix hermitian (void) const { return transpose (); }
146 
147  // extract row or column i.
148 
149  RowVector row (octave_idx_type i) const;
150 
152 
153 private:
154  SparseMatrix dinverse (MatrixType &mattyp, octave_idx_type& info,
155  double& rcond, const bool force = false,
156  const bool calccond = true) const;
157 
158  SparseMatrix tinverse (MatrixType &mattyp, octave_idx_type& info,
159  double& rcond, const bool force = false,
160  const bool calccond = true) const;
161 
162 public:
163  SparseMatrix inverse (void) const;
164  SparseMatrix inverse (MatrixType& mattype) const;
165  SparseMatrix inverse (MatrixType& mattype, octave_idx_type& info) const;
166  SparseMatrix inverse (MatrixType& mattype, octave_idx_type& info,
167  double& rcond, bool force = false,
168  bool calc_cond = true) const;
169 
170  DET determinant (void) const;
171  DET determinant (octave_idx_type& info) const;
172  DET determinant (octave_idx_type& info, double& rcond,
173  bool calc_cond = true) const;
174 
175 private:
176  // Diagonal matrix solvers
177  Matrix 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  SparseMatrix 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  Matrix utsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
198  double& rcond, solve_singularity_handler sing_handler,
199  bool calc_cond = false) const;
200 
202  octave_idx_type& info, double& rcond,
203  solve_singularity_handler sing_handler,
204  bool calc_cond = false) const;
205 
207  octave_idx_type& info, double& rcond,
208  solve_singularity_handler sing_handler,
209  bool calc_cond = false) const;
210 
212  octave_idx_type& info, double& rcond,
213  solve_singularity_handler sing_handler,
214  bool calc_cond = false) const;
215 
216  // Lower triangular matrix solvers
217  Matrix ltsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
218  double& rcond, solve_singularity_handler sing_handler,
219  bool calc_cond = false) const;
220 
222  octave_idx_type& info, double& rcond,
223  solve_singularity_handler sing_handler,
224  bool calc_cond = false) const;
225 
227  octave_idx_type& info, double& rcond,
228  solve_singularity_handler sing_handler,
229  bool calc_cond = false) const;
230 
232  octave_idx_type& info, double& rcond,
233  solve_singularity_handler sing_handler,
234  bool calc_cond = false) const;
235 
236  // Tridiagonal matrix solvers
237  Matrix trisolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
238  double& rcond, solve_singularity_handler sing_handler,
239  bool calc_cond = false) const;
240 
241  ComplexMatrix trisolve (MatrixType &typ, const ComplexMatrix& b,
242  octave_idx_type& info, double& rcond,
243  solve_singularity_handler sing_handler,
244  bool calc_cond = false) const;
245 
246  SparseMatrix trisolve (MatrixType &typ, const SparseMatrix& b,
247  octave_idx_type& info, double& rcond,
248  solve_singularity_handler sing_handler,
249  bool calc_cond = false) const;
250 
251  SparseComplexMatrix trisolve (MatrixType &typ, const SparseComplexMatrix& b,
252  octave_idx_type& info, double& rcond,
253  solve_singularity_handler sing_handler,
254  bool calc_cond = false) const;
255 
256  // Banded matrix solvers (umfpack/cholesky)
257  Matrix bsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
258  double& rcond, 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  SparseMatrix 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 
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 = false) const;
280 
281  Matrix fsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
282  double& rcond, solve_singularity_handler sing_handler,
283  bool calc_cond = false) const;
284 
285  ComplexMatrix fsolve (MatrixType &typ, const ComplexMatrix& b,
286  octave_idx_type& info, double& rcond,
287  solve_singularity_handler sing_handler,
288  bool calc_cond = false) const;
289 
290  SparseMatrix fsolve (MatrixType &typ, const SparseMatrix& b,
291  octave_idx_type& info, double& rcond,
292  solve_singularity_handler sing_handler,
293  bool calc_cond = false) const;
294 
296  octave_idx_type& info, double& rcond,
297  solve_singularity_handler sing_handler,
298  bool calc_cond = false) const;
299 
300 public:
301  // Generic interface to solver with no probing of type
302  Matrix solve (MatrixType &typ, const Matrix& b) const;
303  Matrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info) const;
304  Matrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
305  double& rcond) const;
306  Matrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
307  double& rcond, solve_singularity_handler sing_handler,
308  bool singular_fallback = true) const;
309 
310  ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b) const;
311  ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
312  octave_idx_type& info) const;
313  ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
314  octave_idx_type& info, double& rcond) const;
315  ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
316  octave_idx_type& info, double& rcond,
317  solve_singularity_handler sing_handler,
318  bool singular_fallback = true) const;
319 
320  SparseMatrix solve (MatrixType &typ, const SparseMatrix& b) const;
321  SparseMatrix solve (MatrixType &typ, const SparseMatrix& b,
322  octave_idx_type& info) const;
323  SparseMatrix solve (MatrixType &typ, const SparseMatrix& b,
324  octave_idx_type& info, double& rcond) const;
325  SparseMatrix solve (MatrixType &typ, const SparseMatrix& b,
326  octave_idx_type& info, double& rcond,
327  solve_singularity_handler sing_handler,
328  bool singular_fallback = true) const;
329 
330  SparseComplexMatrix solve (MatrixType &typ,
331  const SparseComplexMatrix& b) const;
333  octave_idx_type& info) const;
335  octave_idx_type& info, double& rcond) const;
337  octave_idx_type& info, double& rcond,
338  solve_singularity_handler sing_handler,
339  bool singular_fallabck = true) const;
340 
341  ColumnVector solve (MatrixType &typ, const ColumnVector& b) const;
342  ColumnVector solve (MatrixType &typ, const ColumnVector& b,
343  octave_idx_type& info) const;
344  ColumnVector solve (MatrixType &typ, const ColumnVector& b,
345  octave_idx_type& info, double& rcond) const;
346  ColumnVector solve (MatrixType &typ, const ColumnVector& b,
347  octave_idx_type& info, double& rcond,
348  solve_singularity_handler sing_handler) const;
349 
350  ComplexColumnVector solve (MatrixType &typ,
351  const ComplexColumnVector& b) const;
353  octave_idx_type& info) const;
355  octave_idx_type& info, double& rcond) const;
357  octave_idx_type& info, double& rcond,
358  solve_singularity_handler sing_handler) const;
359 
360  // Generic interface to solver with probing of type
361  Matrix solve (const Matrix& b) const;
362  Matrix solve (const Matrix& b, octave_idx_type& info) const;
363  Matrix solve (const Matrix& b, octave_idx_type& info, double& rcond) const;
364  Matrix solve (const Matrix& b, octave_idx_type& info, double& rcond,
365  solve_singularity_handler sing_handler) const;
366 
367  ComplexMatrix solve (const ComplexMatrix& b) const;
368  ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const;
369  ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
370  double& rcond) const;
371  ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
372  double& rcond,
373  solve_singularity_handler sing_handler) const;
374 
375  SparseMatrix solve (const SparseMatrix& b) const;
376  SparseMatrix solve (const SparseMatrix& b, octave_idx_type& info) const;
377  SparseMatrix solve (const SparseMatrix& b, octave_idx_type& info,
378  double& rcond) const;
379  SparseMatrix solve (const SparseMatrix& b, octave_idx_type& info,
380  double& rcond,
381  solve_singularity_handler sing_handler) const;
382 
383  SparseComplexMatrix solve (const SparseComplexMatrix& b) const;
385  octave_idx_type& info) const;
387  octave_idx_type& info, double& rcond) const;
389  octave_idx_type& info, double& rcond,
390  solve_singularity_handler sing_handler) const;
391 
392  ColumnVector solve (const ColumnVector& b) const;
393  ColumnVector solve (const ColumnVector& b, octave_idx_type& info) const;
394  ColumnVector solve (const ColumnVector& b, octave_idx_type& info,
395  double& rcond) const;
396  ColumnVector solve (const ColumnVector& b, octave_idx_type& info,
397  double& rcond,
398  solve_singularity_handler sing_handler) const;
399 
400  ComplexColumnVector solve (const ComplexColumnVector& b) const;
402  octave_idx_type& info) const;
404  octave_idx_type& info, double& rcond) const;
406  octave_idx_type& info, double& rcond,
407  solve_singularity_handler sing_handler) const;
408 
409  // other operations
410 
411  bool any_element_is_negative (bool = false) const;
412  bool any_element_is_nan (void) const;
413  bool any_element_is_inf_or_nan (void) const;
414  bool any_element_not_one_or_zero (void) const;
415  bool all_elements_are_zero (void) const;
416  bool all_elements_are_int_or_inf_or_nan (void) const;
417  bool all_integers (double& max_val, double& min_val) const;
418  bool too_large_for_float (void) const;
419 
420  SparseBoolMatrix operator ! (void) const;
421 
422  SparseBoolMatrix all (int dim = -1) const;
423  SparseBoolMatrix any (int dim = -1) const;
424 
425  SparseMatrix cumprod (int dim = -1) const;
426  SparseMatrix cumsum (int dim = -1) const;
427  SparseMatrix prod (int dim = -1) const;
428  SparseMatrix sum (int dim = -1) const;
429  SparseMatrix sumsq (int dim = -1) const;
430  SparseMatrix abs (void) const;
431 
432  SparseMatrix diag (octave_idx_type k = 0) const;
433 
434  Matrix matrix_value (void) const;
435 
436  SparseMatrix squeeze (void) const;
437 
438  SparseMatrix reshape (const dim_vector& new_dims) const;
439 
441  bool inv = false) const;
442 
443  SparseMatrix ipermute (const Array<octave_idx_type>& vec) const;
444 
445  // i/o
446 
447  friend OCTAVE_API std::ostream& operator << (std::ostream& os,
448  const SparseMatrix& a);
449  friend OCTAVE_API std::istream& operator >> (std::istream& is,
450  SparseMatrix& a);
451 
452 };
453 
454 // Publish externally used friend functions.
455 
456 extern OCTAVE_API SparseMatrix real (const SparseComplexMatrix& a);
457 extern OCTAVE_API SparseMatrix imag (const SparseComplexMatrix& a);
458 
459 // Other operators.
460 
461 extern OCTAVE_API SparseMatrix operator * (const SparseMatrix& a,
462  const SparseMatrix& b);
463 extern OCTAVE_API Matrix operator * (const Matrix& a,
464  const SparseMatrix& b);
465 extern OCTAVE_API Matrix mul_trans (const Matrix& a,
466  const SparseMatrix& b);
467 extern OCTAVE_API Matrix operator * (const SparseMatrix& a,
468  const Matrix& b);
469 extern OCTAVE_API Matrix trans_mul (const SparseMatrix& a,
470  const Matrix& b);
471 
472 extern OCTAVE_API SparseMatrix operator * (const DiagMatrix&,
473  const SparseMatrix&);
474 extern OCTAVE_API SparseMatrix operator * (const SparseMatrix&,
475  const DiagMatrix&);
476 
477 extern OCTAVE_API SparseMatrix operator + (const DiagMatrix&,
478  const SparseMatrix&);
479 extern OCTAVE_API SparseMatrix operator + (const SparseMatrix&,
480  const DiagMatrix&);
481 extern OCTAVE_API SparseMatrix operator - (const DiagMatrix&,
482  const SparseMatrix&);
483 extern OCTAVE_API SparseMatrix operator - (const SparseMatrix&,
484  const DiagMatrix&);
485 
486 extern OCTAVE_API SparseMatrix operator * (const PermMatrix&,
487  const SparseMatrix&);
488 extern OCTAVE_API SparseMatrix operator * (const SparseMatrix&,
489  const PermMatrix&);
490 
491 extern OCTAVE_API SparseMatrix min (double d, const SparseMatrix& m);
492 extern OCTAVE_API SparseMatrix min (const SparseMatrix& m, double d);
493 extern OCTAVE_API SparseMatrix min (const SparseMatrix& a,
494  const SparseMatrix& b);
495 
496 extern OCTAVE_API SparseMatrix max (double d, const SparseMatrix& m);
497 extern OCTAVE_API SparseMatrix max (const SparseMatrix& m, double d);
498 extern OCTAVE_API SparseMatrix max (const SparseMatrix& a,
499  const SparseMatrix& b);
500 
501 SPARSE_SMS_CMP_OP_DECLS (SparseMatrix, double, OCTAVE_API)
502 SPARSE_SMS_BOOL_OP_DECLS (SparseMatrix, double, OCTAVE_API)
503 
504 SPARSE_SSM_CMP_OP_DECLS (double, SparseMatrix, OCTAVE_API)
505 SPARSE_SSM_BOOL_OP_DECLS (double, SparseMatrix, OCTAVE_API)
506 
507 SPARSE_SMSM_CMP_OP_DECLS (SparseMatrix, SparseMatrix, OCTAVE_API)
508 SPARSE_SMSM_BOOL_OP_DECLS (SparseMatrix, SparseMatrix, OCTAVE_API)
509 
510 SPARSE_FORWARD_DEFS (MSparse, SparseMatrix, Matrix, double)
511 
512 #endif
OCTAVE_API SparseMatrix operator-(const DiagMatrix &, const SparseMatrix &)
Definition: dSparse.cc:7547
boolMatrix matrix_value(void) const
Definition: boolSparse.cc:248
OCTAVE_EXPORT octave_value_list column
Definition: sparse.cc:123
OCTAVE_API SparseMatrix operator+(const DiagMatrix &, const SparseMatrix &)
Definition: dSparse.cc:7541
#define SPARSE_SMSM_BOOL_OP_DECLS(M1, M2, API)
bool operator!=(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:567
SparseMatrix(const Array< double > &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: dSparse.h:84
const octave_base_value const Array< octave_idx_type > & ra_idx
std::istream & operator>>(std::istream &is, SparseBoolMatrix &a)
Definition: boolSparse.cc:279
SparseMatrix(const NDArray &a)
Definition: dSparse.h:82
SparseBoolMatrix ipermute(const Array< octave_idx_type > &vec) const
Definition: boolSparse.cc:318
OCTAVE_API Matrix mul_trans(const Matrix &a, const SparseMatrix &b)
Definition: dSparse.cc:7509
identity matrix If supplied two scalar respectively For allows like xample val
Definition: data.cc:5068
OCTAVE_API SparseMatrix imag(const SparseComplexMatrix &a)
Definition: dSparse.cc:578
SparseBoolMatrix & operator=(const SparseBoolMatrix &a)
Definition: boolSparse.h:82
SparseMatrix(const Matrix &a)
Definition: dSparse.h:80
for large enough k
Definition: lu.cc:606
static void transpose(octave_idx_type N, const octave_idx_type *ridx, const octave_idx_type *cidx, octave_idx_type *ridx2, octave_idx_type *cidx2)
Definition: symrcm.cc:382
ComplexNDArray concat(NDArray &ra, ComplexNDArray &rb, const Array< octave_idx_type > &ra_idx)
Definition: CNDArray.cc:655
#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
SparseMatrix(const SparseMatrix &a, const dim_vector &dv)
Definition: dSparse.h:71
SparseMatrix hermitian(void) const
Definition: dSparse.h:145
OCTAVE_API SparseMatrix max(double d, const SparseMatrix &m)
Definition: dSparse.cc:7735
SparseMatrix(octave_idx_type r, octave_idx_type c)
Definition: dSparse.h:60
#define SPARSE_SMS_BOOL_OP_DECLS(M, S, API)
SparseBoolMatrix index(const idx_vector &i, bool resize_ok) const
Definition: boolSparse.cc:293
SparseMatrix(const SparseMatrix &a)
Definition: dSparse.h:69
SparseMatrix(const MSparse< double > &a)
Definition: dSparse.h:74
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
#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(octave_idx_type r, octave_idx_type c, octave_idx_type num_nz)
Definition: dSparse.h:94
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
#define SPARSE_SMSM_CMP_OP_DECLS(M1, M2, API)
OCTAVE_API SparseMatrix min(double d, const SparseMatrix &m)
Definition: dSparse.cc:7585
SparseBoolMatrix all(int dim=-1) const
Definition: boolSparse.cc:138
#define SPARSE_SSM_BOOL_OP_DECLS(S, M, API)
SparseMatrix(const dim_vector &dv, octave_idx_type nz=0)
Definition: dSparse.h:63
nd deftypefn *octave_map m
Definition: ov-struct.cc:2058
SparseMatrix(const Sparse< double > &a)
Definition: dSparse.h:76
Definition: DET.h:33
OCTAVE_API SparseMatrix operator*(const SparseMatrix &a, const SparseMatrix &b)
Definition: dSparse.cc:7497
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
SparseMatrix(const PermMatrix &a)
Definition: dSparse.h:92
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
MSparse< T > transpose(void) const
Definition: MSparse.h:92
OCTAVE_API Matrix trans_mul(const SparseMatrix &a, const Matrix &b)
Definition: dSparse.cc:7521
SparseMatrix atan2(const double &x, const SparseMatrix &y)
Definition: dSparse.cc:606
SparseMatrix(void)
Definition: dSparse.h:58
=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 > &)
issues an error eealso double
Definition: ov-bool-mat.cc:594
Matrix dense_matrix_type
Definition: dSparse.h:54
the element is set to zero In other the statement xample y
Definition: data.cc:5342
b
Definition: cellfun.cc:398
static M utsolve(const SM &U, const ColumnVector &Q, const M &m)
Definition: eigs-base.cc:106
OCTAVE_API SparseMatrix real(const SparseComplexMatrix &a)
Definition: dSparse.cc:557
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
SparseMatrix(octave_idx_type r, octave_idx_type c, double val)
Definition: dSparse.h:66
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
dim_vector dv
Definition: sub2ind.cc:263
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
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE * x
OCTINTERP_API octave_value_list Fatan2(const octave_value_list &=octave_value_list(), int=0)
bool any_element_is_nan(void) const
Definition: Sparse.h:698