GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
dSparse.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2004-2018 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
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12 
13 Octave is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License 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 <https://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 "CColVector.h"
30 #include "CMatrix.h"
31 #include "DET.h"
32 #include "MSparse.h"
33 #include "MatrixType.h"
34 #include "Sparse-op-decls.h"
35 #include "dColVector.h"
36 #include "dMatrix.h"
37 #include "dNDArray.h"
38 
39 class PermMatrix;
40 class DiagMatrix;
42 class SparseBoolMatrix;
43 
44 class
45 OCTAVE_API
47 {
48 public:
49 
50  // Corresponding dense matrix type for this sparse matrix type.
52 
53  typedef void (*solve_singularity_handler) (double rcond);
54 
55  SparseMatrix (void) : MSparse<double> () { }
56 
58  : MSparse<double> (r, c) { }
59 
61  MSparse<double> (dv, nz) { }
62 
64  : MSparse<double> (r, c, val) { }
65 
67 
69  : MSparse<double> (a, dv) { }
70 
72 
74 
75  explicit SparseMatrix (const SparseBoolMatrix& a);
76 
77  explicit SparseMatrix (const Matrix& a) : MSparse<double> (a) { }
78 
79  explicit SparseMatrix (const NDArray& a) : MSparse<double> (a) { }
80 
82  const idx_vector& c, octave_idx_type nr = -1,
83  octave_idx_type nc = -1, bool sum_terms = true,
84  octave_idx_type nzm = -1)
85  : MSparse<double> (a, r, c, nr, nc, sum_terms, nzm) { }
86 
87  explicit SparseMatrix (const DiagMatrix& a);
88 
89  explicit SparseMatrix (const PermMatrix& a) : MSparse<double>(a) { }
90 
92  octave_idx_type num_nz) : MSparse<double> (r, c, num_nz) { }
93 
95  {
97  return *this;
98  }
99 
100  bool operator == (const SparseMatrix& a) const;
101  bool operator != (const SparseMatrix& a) const;
102 
103  bool issymmetric (void) const;
104 
105  OCTAVE_DEPRECATED (4.4, "use 'issymmetric' instead")
106  bool is_symmetric (void) const
107  { return issymmetric (); }
108 
109  SparseMatrix max (int dim = -1) const;
110  SparseMatrix max (Array<octave_idx_type>& index, int dim = -1) const;
111  SparseMatrix min (int dim = -1) const;
112  SparseMatrix min (Array<octave_idx_type>& index, int dim = -1) const;
113 
114  // destructive insert/delete/reorder operations
115 
118 
120  const Array<octave_idx_type>& indx);
121 
122  SparseMatrix concat (const SparseMatrix& rb,
126 
127  friend OCTAVE_API SparseMatrix real (const SparseComplexMatrix& a);
128  friend OCTAVE_API SparseMatrix imag (const SparseComplexMatrix& a);
129 
130  SparseMatrix transpose (void) const
131  {
132  return MSparse<double>::transpose ();
133  }
134  SparseMatrix hermitian (void) const { return transpose (); }
135 
136  // extract row or column i.
137 
138  RowVector row (octave_idx_type i) const;
139 
141 
142 private:
143  SparseMatrix dinverse (MatrixType& mattype, octave_idx_type& info,
144  double& rcond, const bool force = false,
145  const bool calccond = true) const;
146 
147  SparseMatrix tinverse (MatrixType& mattype, octave_idx_type& info,
148  double& rcond, const bool force = false,
149  const bool calccond = true) const;
150 
151 public:
152  SparseMatrix inverse (void) const;
153  SparseMatrix inverse (MatrixType& mattype) const;
154  SparseMatrix inverse (MatrixType& mattype, octave_idx_type& info) const;
155  SparseMatrix inverse (MatrixType& mattype, octave_idx_type& info,
156  double& rcond, bool force = false,
157  bool calc_cond = true) const;
158 
159  DET determinant (void) const;
160  DET determinant (octave_idx_type& info) const;
161  DET determinant (octave_idx_type& info, double& rcond,
162  bool calc_cond = true) const;
163 
164 private:
165  // Diagonal matrix solvers
166  Matrix dsolve (MatrixType& typ, const Matrix& b, octave_idx_type& info,
167  double& rcond, solve_singularity_handler sing_handler,
168  bool calc_cond = false) const;
169 
170  ComplexMatrix dsolve (MatrixType& typ, const ComplexMatrix& b,
171  octave_idx_type& info, double& rcond,
172  solve_singularity_handler sing_handler,
173  bool calc_cond = false) const;
174 
175  SparseMatrix dsolve (MatrixType& typ, const SparseMatrix& b,
176  octave_idx_type& info, double& rcond,
177  solve_singularity_handler sing_handler,
178  bool calc_cond = false) const;
179 
181  octave_idx_type& info, double& rcond,
182  solve_singularity_handler sing_handler,
183  bool calc_cond = false) const;
184 
185  // Upper triangular matrix solvers
186  Matrix utsolve (MatrixType& typ, const Matrix& b, octave_idx_type& info,
187  double& rcond, solve_singularity_handler sing_handler,
188  bool calc_cond = false) const;
189 
191  octave_idx_type& info, double& rcond,
192  solve_singularity_handler sing_handler,
193  bool calc_cond = false) const;
194 
196  octave_idx_type& info, double& rcond,
197  solve_singularity_handler sing_handler,
198  bool calc_cond = false) const;
199 
201  octave_idx_type& info, double& rcond,
202  solve_singularity_handler sing_handler,
203  bool calc_cond = false) const;
204 
205  // Lower triangular matrix solvers
206  Matrix ltsolve (MatrixType& typ, const Matrix& b, octave_idx_type& info,
207  double& rcond, solve_singularity_handler sing_handler,
208  bool calc_cond = false) const;
209 
211  octave_idx_type& info, double& rcond,
212  solve_singularity_handler sing_handler,
213  bool calc_cond = false) const;
214 
216  octave_idx_type& info, double& rcond,
217  solve_singularity_handler sing_handler,
218  bool calc_cond = false) const;
219 
221  octave_idx_type& info, double& rcond,
222  solve_singularity_handler sing_handler,
223  bool calc_cond = false) const;
224 
225  // Tridiagonal matrix solvers
226  Matrix trisolve (MatrixType& typ, const Matrix& b, octave_idx_type& info,
227  double& rcond, solve_singularity_handler sing_handler,
228  bool calc_cond = false) const;
229 
230  ComplexMatrix trisolve (MatrixType& typ, const ComplexMatrix& b,
231  octave_idx_type& info, double& rcond,
232  solve_singularity_handler sing_handler,
233  bool calc_cond = false) const;
234 
235  SparseMatrix trisolve (MatrixType& typ, const SparseMatrix& b,
236  octave_idx_type& info, double& rcond,
237  solve_singularity_handler sing_handler,
238  bool calc_cond = false) const;
239 
240  SparseComplexMatrix trisolve (MatrixType& typ, const SparseComplexMatrix& b,
241  octave_idx_type& info, double& rcond,
242  solve_singularity_handler sing_handler,
243  bool calc_cond = false) const;
244 
245  // Banded matrix solvers (umfpack/cholesky)
246  Matrix bsolve (MatrixType& typ, const Matrix& b, octave_idx_type& info,
247  double& rcond, solve_singularity_handler sing_handler,
248  bool calc_cond = false) const;
249 
250  ComplexMatrix bsolve (MatrixType& typ, const ComplexMatrix& b,
251  octave_idx_type& info, double& rcond,
252  solve_singularity_handler sing_handler,
253  bool calc_cond = false) const;
254 
255  SparseMatrix bsolve (MatrixType& typ, const SparseMatrix& b,
256  octave_idx_type& info, double& rcond,
257  solve_singularity_handler sing_handler,
258  bool calc_cond = false) const;
259 
261  octave_idx_type& info, double& rcond,
262  solve_singularity_handler sing_handler,
263  bool calc_cond = false) const;
264 
265  // Full matrix solvers (umfpack/cholesky)
266  void * factorize (octave_idx_type& err, double& rcond, Matrix& Control,
267  Matrix& Info, solve_singularity_handler sing_handler,
268  bool calc_cond = false) const;
269 
270  Matrix fsolve (MatrixType& typ, const Matrix& b, octave_idx_type& info,
271  double& rcond, solve_singularity_handler sing_handler,
272  bool calc_cond = false) const;
273 
274  ComplexMatrix fsolve (MatrixType& typ, const ComplexMatrix& b,
275  octave_idx_type& info, double& rcond,
276  solve_singularity_handler sing_handler,
277  bool calc_cond = false) const;
278 
279  SparseMatrix fsolve (MatrixType& typ, const SparseMatrix& b,
280  octave_idx_type& info, double& rcond,
281  solve_singularity_handler sing_handler,
282  bool calc_cond = false) const;
283 
285  octave_idx_type& info, double& rcond,
286  solve_singularity_handler sing_handler,
287  bool calc_cond = false) const;
288 
289 public:
290  // Generic interface to solver with no probing of type
291  Matrix solve (MatrixType& typ, const Matrix& b) const;
292  Matrix solve (MatrixType& typ, const Matrix& b, octave_idx_type& info) const;
293  Matrix solve (MatrixType& typ, const Matrix& b, octave_idx_type& info,
294  double& rcond) const;
295  Matrix solve (MatrixType& typ, const Matrix& b, octave_idx_type& info,
296  double& rcond, solve_singularity_handler sing_handler,
297  bool singular_fallback = true) const;
298 
299  ComplexMatrix solve (MatrixType& typ, const ComplexMatrix& b) const;
300  ComplexMatrix solve (MatrixType& typ, const ComplexMatrix& b,
301  octave_idx_type& info) const;
302  ComplexMatrix solve (MatrixType& typ, const ComplexMatrix& b,
303  octave_idx_type& info, double& rcond) const;
304  ComplexMatrix solve (MatrixType& typ, const ComplexMatrix& b,
305  octave_idx_type& info, double& rcond,
306  solve_singularity_handler sing_handler,
307  bool singular_fallback = true) const;
308 
309  SparseMatrix solve (MatrixType& typ, const SparseMatrix& b) const;
310  SparseMatrix solve (MatrixType& typ, const SparseMatrix& b,
311  octave_idx_type& info) const;
312  SparseMatrix solve (MatrixType& typ, const SparseMatrix& b,
313  octave_idx_type& info, double& rcond) const;
314  SparseMatrix solve (MatrixType& typ, const SparseMatrix& b,
315  octave_idx_type& info, double& rcond,
316  solve_singularity_handler sing_handler,
317  bool singular_fallback = true) const;
318 
319  SparseComplexMatrix solve (MatrixType& typ,
320  const SparseComplexMatrix& b) const;
322  octave_idx_type& info) const;
324  octave_idx_type& info, double& rcond) const;
326  octave_idx_type& info, double& rcond,
327  solve_singularity_handler sing_handler,
328  bool singular_fallabck = true) const;
329 
330  ColumnVector solve (MatrixType& typ, const ColumnVector& b) const;
331  ColumnVector solve (MatrixType& typ, const ColumnVector& b,
332  octave_idx_type& info) const;
333  ColumnVector solve (MatrixType& typ, const ColumnVector& b,
334  octave_idx_type& info, double& rcond) const;
335  ColumnVector solve (MatrixType& typ, const ColumnVector& b,
336  octave_idx_type& info, double& rcond,
337  solve_singularity_handler sing_handler) const;
338 
339  ComplexColumnVector solve (MatrixType& typ,
340  const ComplexColumnVector& b) const;
342  octave_idx_type& info) const;
344  octave_idx_type& info, double& rcond) const;
346  octave_idx_type& info, double& rcond,
347  solve_singularity_handler sing_handler) const;
348 
349  // Generic interface to solver with probing of type
350  Matrix solve (const Matrix& b) const;
351  Matrix solve (const Matrix& b, octave_idx_type& info) const;
352  Matrix solve (const Matrix& b, octave_idx_type& info, double& rcond) const;
353  Matrix solve (const Matrix& b, octave_idx_type& info, double& rcond,
354  solve_singularity_handler sing_handler) const;
355 
356  ComplexMatrix solve (const ComplexMatrix& b) const;
357  ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const;
358  ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
359  double& rcond) const;
360  ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
361  double& rcond,
362  solve_singularity_handler sing_handler) const;
363 
364  SparseMatrix solve (const SparseMatrix& b) const;
365  SparseMatrix solve (const SparseMatrix& b, octave_idx_type& info) const;
366  SparseMatrix solve (const SparseMatrix& b, octave_idx_type& info,
367  double& rcond) const;
368  SparseMatrix solve (const SparseMatrix& b, octave_idx_type& info,
369  double& rcond,
370  solve_singularity_handler sing_handler) const;
371 
372  SparseComplexMatrix solve (const SparseComplexMatrix& b) const;
374  octave_idx_type& info) const;
376  octave_idx_type& info, double& rcond) const;
378  octave_idx_type& info, double& rcond,
379  solve_singularity_handler sing_handler) const;
380 
381  ColumnVector solve (const ColumnVector& b) const;
382  ColumnVector solve (const ColumnVector& b, octave_idx_type& info) const;
383  ColumnVector solve (const ColumnVector& b, octave_idx_type& info,
384  double& rcond) const;
385  ColumnVector solve (const ColumnVector& b, octave_idx_type& info,
386  double& rcond,
387  solve_singularity_handler sing_handler) const;
388 
389  ComplexColumnVector solve (const ComplexColumnVector& b) const;
391  octave_idx_type& info) const;
393  octave_idx_type& info, double& rcond) const;
395  octave_idx_type& info, double& rcond,
396  solve_singularity_handler sing_handler) const;
397 
398  // other operations
399 
400  bool any_element_is_negative (bool = false) const;
401  bool any_element_is_nan (void) const;
402  bool any_element_is_inf_or_nan (void) const;
403  bool any_element_not_one_or_zero (void) const;
404  bool all_elements_are_zero (void) const;
405  bool all_elements_are_int_or_inf_or_nan (void) const;
406  bool all_integers (double& max_val, double& min_val) const;
407  bool too_large_for_float (void) const;
408 
409  SparseBoolMatrix operator ! (void) const;
410 
411  SparseBoolMatrix all (int dim = -1) const;
412  SparseBoolMatrix any (int dim = -1) const;
413 
414  SparseMatrix cumprod (int dim = -1) const;
415  SparseMatrix cumsum (int dim = -1) const;
416  SparseMatrix prod (int dim = -1) const;
417  SparseMatrix sum (int dim = -1) const;
418  SparseMatrix sumsq (int dim = -1) const;
419  SparseMatrix abs (void) const;
420 
421  SparseMatrix diag (octave_idx_type k = 0) const;
422 
423  Matrix matrix_value (void) const;
424 
425  SparseMatrix squeeze (void) const;
426 
427  SparseMatrix reshape (const dim_vector& new_dims) const;
428 
430  bool inv = false) const;
431 
432  SparseMatrix ipermute (const Array<octave_idx_type>& vec) const;
433 
434  // i/o
435 
436  friend OCTAVE_API std::ostream& operator << (std::ostream& os,
437  const SparseMatrix& a);
438  friend OCTAVE_API std::istream& operator >> (std::istream& is,
439  SparseMatrix& a);
440 
441 };
442 
443 // Publish externally used friend functions.
444 
445 extern OCTAVE_API SparseMatrix real (const SparseComplexMatrix& a);
446 extern OCTAVE_API SparseMatrix imag (const SparseComplexMatrix& a);
447 
448 // Other operators.
449 
450 extern OCTAVE_API SparseMatrix operator * (const SparseMatrix& a,
451  const SparseMatrix& b);
452 extern OCTAVE_API Matrix operator * (const Matrix& a,
453  const SparseMatrix& b);
454 extern OCTAVE_API Matrix mul_trans (const Matrix& a,
455  const SparseMatrix& b);
456 extern OCTAVE_API Matrix operator * (const SparseMatrix& a,
457  const Matrix& b);
458 extern OCTAVE_API Matrix trans_mul (const SparseMatrix& a,
459  const Matrix& b);
460 
461 extern OCTAVE_API SparseMatrix operator * (const DiagMatrix&,
462  const SparseMatrix&);
463 extern OCTAVE_API SparseMatrix operator * (const SparseMatrix&,
464  const DiagMatrix&);
465 
466 extern OCTAVE_API SparseMatrix operator + (const DiagMatrix&,
467  const SparseMatrix&);
468 extern OCTAVE_API SparseMatrix operator + (const SparseMatrix&,
469  const DiagMatrix&);
470 extern OCTAVE_API SparseMatrix operator - (const DiagMatrix&,
471  const SparseMatrix&);
472 extern OCTAVE_API SparseMatrix operator - (const SparseMatrix&,
473  const DiagMatrix&);
474 
475 extern OCTAVE_API SparseMatrix operator * (const PermMatrix&,
476  const SparseMatrix&);
477 extern OCTAVE_API SparseMatrix operator * (const SparseMatrix&,
478  const PermMatrix&);
479 
480 extern OCTAVE_API SparseMatrix min (double d, const SparseMatrix& m);
481 extern OCTAVE_API SparseMatrix min (const SparseMatrix& m, double d);
482 extern OCTAVE_API SparseMatrix min (const SparseMatrix& a,
483  const SparseMatrix& b);
484 
485 extern OCTAVE_API SparseMatrix max (double d, const SparseMatrix& m);
486 extern OCTAVE_API SparseMatrix max (const SparseMatrix& m, double d);
487 extern OCTAVE_API SparseMatrix max (const SparseMatrix& a,
488  const SparseMatrix& b);
489 
490 SPARSE_SMS_CMP_OP_DECLS (SparseMatrix, double, OCTAVE_API)
491 SPARSE_SMS_BOOL_OP_DECLS (SparseMatrix, double, OCTAVE_API)
492 
493 SPARSE_SSM_CMP_OP_DECLS (double, SparseMatrix, OCTAVE_API)
494 SPARSE_SSM_BOOL_OP_DECLS (double, SparseMatrix, OCTAVE_API)
495 
498 
500 
501 #endif
OCTAVE_API SparseMatrix operator-(const DiagMatrix &, const SparseMatrix &)
Definition: dSparse.cc:7589
SparseBoolMatrix reshape(const dim_vector &new_dims) const
Definition: boolSparse.cc:306
OCTAVE_EXPORT octave_value_list column
Definition: sparse.cc:123
OCTAVE_API SparseMatrix operator+(const DiagMatrix &, const SparseMatrix &)
Definition: dSparse.cc:7583
#define SPARSE_SMSM_BOOL_OP_DECLS(M1, M2, API)
bool operator!=(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:566
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:81
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:79
OCTAVE_API Matrix mul_trans(const Matrix &a, const SparseMatrix &b)
Definition: dSparse.cc:7551
identity matrix If supplied two scalar respectively For allows like xample val
Definition: data.cc:4986
boolMatrix matrix_value(void) const
Definition: boolSparse.cc:248
OCTAVE_API SparseMatrix imag(const SparseComplexMatrix &a)
Definition: dSparse.cc:574
SparseBoolMatrix & operator=(const SparseBoolMatrix &a)
Definition: boolSparse.h:80
SparseMatrix(const Matrix &a)
Definition: dSparse.h:77
for large enough k
Definition: lu.cc:617
SparseBoolMatrix permute(const Array< octave_idx_type > &vec, bool inv=false) const
Definition: boolSparse.cc:312
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:386
ComplexNDArray concat(NDArray &ra, ComplexNDArray &rb, const Array< octave_idx_type > &ra_idx)
Definition: CNDArray.cc:653
SparseMatrix transpose(void) const
Definition: dSparse.h:130
static T abs(T x)
Definition: pr-output.cc:1696
#define SPARSE_SMS_CMP_OP_DECLS(M, S, API)
SparseMatrix(const SparseMatrix &a, const dim_vector &dv)
Definition: dSparse.h:68
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:1499
OCTAVE_API SparseMatrix max(double d, const SparseMatrix &m)
Definition: dSparse.cc:7777
SparseMatrix(octave_idx_type r, octave_idx_type c)
Definition: dSparse.h:57
#define SPARSE_SMS_BOOL_OP_DECLS(M, S, API)
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
Definition: file-io.cc:587
SparseMatrix(const SparseMatrix &a)
Definition: dSparse.h:66
SparseMatrix(const MSparse< double > &a)
Definition: dSparse.h:71
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 const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &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 ipermute(const Array< octave_idx_type > &vec) const
Definition: boolSparse.cc:318
SparseMatrix(octave_idx_type r, octave_idx_type c, octave_idx_type num_nz)
Definition: dSparse.h:91
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:400
SparseBoolMatrix diag(octave_idx_type k=0) const
Definition: boolSparse.cc:242
MSparse< T > transpose(void) const
Definition: MSparse.h:92
#define SPARSE_SMSM_CMP_OP_DECLS(M1, M2, API)
OCTAVE_API SparseMatrix min(double d, const SparseMatrix &m)
Definition: dSparse.cc:7627
#define SPARSE_SSM_BOOL_OP_DECLS(S, M, API)
SparseMatrix(const dim_vector &dv, octave_idx_type nz=0)
Definition: dSparse.h:60
SparseMatrix(const Sparse< double > &a)
Definition: dSparse.h:73
Definition: DET.h:34
OCTAVE_API SparseMatrix operator*(const SparseMatrix &a, const SparseMatrix &b)
Definition: dSparse.cc:7539
SparseBoolMatrix & insert(const SparseBoolMatrix &a, octave_idx_type r, octave_idx_type c)
Definition: boolSparse.cc:75
SparseBoolMatrix index(const idx_vector &i, bool resize_ok) const
Definition: boolSparse.cc:293
static M ltsolve(const SM &L, const ColumnVector &Q, const M &m)
Definition: eigs-base.cc:80
SparseMatrix(const PermMatrix &a)
Definition: dSparse.h:89
SparseBoolMatrix squeeze(void) const
Definition: boolSparse.cc:287
SparseBoolMatrix all(int dim=-1) const
Definition: boolSparse.cc:138
Definition: dMatrix.h:36
MSparse< T > & operator=(const MSparse< T > &a)
Definition: MSparse.h:74
bool operator==(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:550
SparseMatrix sum(int dim=-1) const
Definition: boolSparse.cc:191
OCTAVE_API Matrix trans_mul(const SparseMatrix &a, const Matrix &b)
Definition: dSparse.cc:7563
bool any_element_is_nan(void) const
Definition: Sparse.h:663
SparseMatrix(void)
Definition: dSparse.h:55
template OCTAVE_API std::ostream & operator<<(std::ostream &, const Array< bool > &)
Matrix dense_matrix_type
Definition: dSparse.h:51
b
Definition: cellfun.cc:400
static M utsolve(const SM &U, const ColumnVector &Q, const M &m)
Definition: eigs-base.cc:100
OCTAVE_API SparseMatrix real(const SparseComplexMatrix &a)
Definition: dSparse.cc:553
for i
Definition: data.cc:5264
OCTAVE_EXPORT octave_value_list error nd deftypefn *const octave_scalar_map err
Definition: error.cc:1049
octave_value operator!(const octave_value &a)
Definition: ov.h:1573
SparseMatrix(octave_idx_type r, octave_idx_type c, double val)
Definition: dSparse.h:63
write the output to stdout if nargout is
Definition: load-save.cc:1612
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:87
dim_vector dv
Definition: sub2ind.cc:263
octave::stream os
Definition: file-io.cc:627
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
SparseMatrix hermitian(void) const
Definition: dSparse.h:134