Mercurial > octave-nkf
annotate liboctave/array/dSparse.h @ 19630:0e1f5a750d00
maint: Periodic merge of gui-release to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 20 Jan 2015 10:24:46 -0500 |
parents | 65554f5847ac be7ac98fab43 |
children | 4197fc428c7d |
rev | line source |
---|---|
5164 | 1 /* |
2 | |
17744
d63878346099
maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents:
16313
diff
changeset
|
3 Copyright (C) 2004-2013 David Bateman |
11523 | 4 Copyright (C) 1998-2004 Andy Adler |
7016 | 5 |
6 This file is part of Octave. | |
5164 | 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 | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
5164 | 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 | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
5164 | 21 |
22 */ | |
23 | |
24 #if !defined (octave_dSparse_h) | |
25 #define octave_dSparse_h 1 | |
26 | |
27 #include "dMatrix.h" | |
28 #include "dNDArray.h" | |
29 #include "CMatrix.h" | |
30 #include "dColVector.h" | |
31 #include "CColVector.h" | |
32 | |
8335 | 33 #include "DET.h" |
5164 | 34 #include "MSparse.h" |
35 #include "MSparse-defs.h" | |
19303
65554f5847ac
don't include oct-locbuf.h in header files unnecessarily
John W. Eaton <jwe@octave.org>
parents:
18825
diff
changeset
|
36 |
65554f5847ac
don't include oct-locbuf.h in header files unnecessarily
John W. Eaton <jwe@octave.org>
parents:
18825
diff
changeset
|
37 #include "Sparse-op-decls.h" |
65554f5847ac
don't include oct-locbuf.h in header files unnecessarily
John W. Eaton <jwe@octave.org>
parents:
18825
diff
changeset
|
38 |
5785 | 39 #include "MatrixType.h" |
5164 | 40 |
8968
91d53dc37f79
Add perm * sparse, perm \ sparse, sparse * perm, and sparse / perm operations.
Jason Riedy <jason@acm.org>
parents:
8966
diff
changeset
|
41 class PermMatrix; |
8964
f4f4d65faaa0
Implement sparse * diagonal and diagonal * sparse operations, double-prec only.
Jason Riedy <jason@acm.org>
parents:
8920
diff
changeset
|
42 class DiagMatrix; |
5164 | 43 class SparseComplexMatrix; |
44 class SparseBoolMatrix; | |
45 | |
46 class | |
6108 | 47 OCTAVE_API |
5164 | 48 SparseMatrix : public MSparse<double> |
49 { | |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
50 public: |
5164 | 51 |
52 typedef void (*solve_singularity_handler) (double rcond); | |
53 | |
54 SparseMatrix (void) : MSparse<double> () { } | |
55 | |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
56 SparseMatrix (octave_idx_type r, octave_idx_type c) |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
57 : MSparse<double> (r, c) { } |
5164 | 58 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
59 SparseMatrix (const dim_vector& dv, octave_idx_type nz = 0) : |
6823 | 60 MSparse<double> (dv, nz) { } |
61 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
62 explicit SparseMatrix (octave_idx_type r, octave_idx_type c, double val) |
5164 | 63 : MSparse<double> (r, c, val) { } |
64 | |
65 SparseMatrix (const SparseMatrix& a) : MSparse<double> (a) { } | |
66 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
67 SparseMatrix (const SparseMatrix& a, const dim_vector& dv) |
5164 | 68 : MSparse<double> (a, dv) { } |
69 | |
70 SparseMatrix (const MSparse<double>& a) : MSparse<double> (a) { } | |
71 | |
10983
4b51c0a20a98
optimize sum of sparse logical matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
10785
diff
changeset
|
72 SparseMatrix (const Sparse<double>& a) : MSparse<double> (a) { } |
4b51c0a20a98
optimize sum of sparse logical matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
10785
diff
changeset
|
73 |
5164 | 74 explicit SparseMatrix (const SparseBoolMatrix& a); |
75 | |
76 explicit SparseMatrix (const Matrix& a) : MSparse<double> (a) { } | |
77 | |
78 explicit SparseMatrix (const NDArray& a) : MSparse<double> (a) { } | |
79 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
80 SparseMatrix (const Array<double>& a, const idx_vector& r, |
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
81 const idx_vector& c, octave_idx_type nr = -1, |
10527
b4d2080b6df7
Replace nzmax by nnz as needed
David Bateman <dbateman@free.fr>
parents:
10480
diff
changeset
|
82 octave_idx_type nc = -1, bool sum_terms = true, |
b4d2080b6df7
Replace nzmax by nnz as needed
David Bateman <dbateman@free.fr>
parents:
10480
diff
changeset
|
83 octave_idx_type nzm = -1) |
b4d2080b6df7
Replace nzmax by nnz as needed
David Bateman <dbateman@free.fr>
parents:
10480
diff
changeset
|
84 : MSparse<double> (a, r, c, nr, nc, sum_terms, nzm) { } |
10479
ded9beac7582
optimize sparse matrix assembly
Jaroslav Hajek <highegg@gmail.com>
parents:
10421
diff
changeset
|
85 |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8335
diff
changeset
|
86 explicit SparseMatrix (const DiagMatrix& a); |
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8335
diff
changeset
|
87 |
13030
b646413c3d0e
Make operators do smarter sparse conversions on permutation matrices.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
11586
diff
changeset
|
88 explicit SparseMatrix (const PermMatrix& a) : MSparse<double>(a) { } |
8910
6e9f26506804
optimize diag -> sparse and perm -> sparse conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
8366
diff
changeset
|
89 |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
90 SparseMatrix (octave_idx_type r, octave_idx_type c, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
91 octave_idx_type num_nz) : MSparse<double> (r, c, num_nz) { } |
5164 | 92 |
93 SparseMatrix& operator = (const SparseMatrix& a) | |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
94 { |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
95 MSparse<double>::operator = (a); |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
96 return *this; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
97 } |
5164 | 98 |
99 bool operator == (const SparseMatrix& a) const; | |
100 bool operator != (const SparseMatrix& a) const; | |
101 | |
102 bool is_symmetric (void) const; | |
103 | |
9790
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
8968
diff
changeset
|
104 SparseMatrix max (int dim = -1) const; |
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
8968
diff
changeset
|
105 SparseMatrix max (Array<octave_idx_type>& index, int dim = -1) const; |
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
8968
diff
changeset
|
106 SparseMatrix min (int dim = -1) const; |
a5035bc7fbfb
rewrite dispatch part & slightly improve min,max,cummin,cummax
Jaroslav Hajek <highegg@gmail.com>
parents:
8968
diff
changeset
|
107 SparseMatrix min (Array<octave_idx_type>& index, int dim = -1) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
108 |
5164 | 109 // destructive insert/delete/reorder operations |
110 | |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
111 SparseMatrix& insert (const SparseMatrix& a, octave_idx_type r, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
112 octave_idx_type c); |
5164 | 113 |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
114 SparseMatrix& insert (const SparseMatrix& a, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
115 const Array<octave_idx_type>& indx); |
6823 | 116 |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
117 SparseMatrix concat (const SparseMatrix& rb, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
118 const Array<octave_idx_type>& ra_idx); |
5164 | 119 SparseComplexMatrix concat (const SparseComplexMatrix& rb, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
120 const Array<octave_idx_type>& ra_idx); |
5164 | 121 |
6108 | 122 friend OCTAVE_API SparseMatrix real (const SparseComplexMatrix& a); |
123 friend OCTAVE_API SparseMatrix imag (const SparseComplexMatrix& a); | |
5164 | 124 |
18825
99d63a2e221b
Mark internal sparse matrix implementation of atan2 as deprecated.
Rik <rik@octave.org>
parents:
17769
diff
changeset
|
125 friend OCTAVE_API SparseMatrix atan2 (const double& x, const SparseMatrix& y) |
99d63a2e221b
Mark internal sparse matrix implementation of atan2 as deprecated.
Rik <rik@octave.org>
parents:
17769
diff
changeset
|
126 GCC_ATTR_DEPRECATED ; |
99d63a2e221b
Mark internal sparse matrix implementation of atan2 as deprecated.
Rik <rik@octave.org>
parents:
17769
diff
changeset
|
127 friend OCTAVE_API SparseMatrix atan2 (const SparseMatrix& x, const double& y) |
19629
be7ac98fab43
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
18825
diff
changeset
|
128 GCC_ATTR_DEPRECATED ; |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
129 friend OCTAVE_API SparseMatrix atan2 (const SparseMatrix& x, |
18825
99d63a2e221b
Mark internal sparse matrix implementation of atan2 as deprecated.
Rik <rik@octave.org>
parents:
17769
diff
changeset
|
130 const SparseMatrix& y) |
99d63a2e221b
Mark internal sparse matrix implementation of atan2 as deprecated.
Rik <rik@octave.org>
parents:
17769
diff
changeset
|
131 GCC_ATTR_DEPRECATED ; |
5164 | 132 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
133 SparseMatrix transpose (void) const |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
134 { |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
135 return MSparse<double>::transpose (); |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
136 } |
5506 | 137 SparseMatrix hermitian (void) const { return transpose (); } |
5164 | 138 |
8303
b11c31849b44
improve norm computation capabilities
Jaroslav Hajek <highegg@gmail.com>
parents:
7922
diff
changeset
|
139 // extract row or column i. |
b11c31849b44
improve norm computation capabilities
Jaroslav Hajek <highegg@gmail.com>
parents:
7922
diff
changeset
|
140 |
b11c31849b44
improve norm computation capabilities
Jaroslav Hajek <highegg@gmail.com>
parents:
7922
diff
changeset
|
141 RowVector row (octave_idx_type i) const; |
b11c31849b44
improve norm computation capabilities
Jaroslav Hajek <highegg@gmail.com>
parents:
7922
diff
changeset
|
142 |
b11c31849b44
improve norm computation capabilities
Jaroslav Hajek <highegg@gmail.com>
parents:
7922
diff
changeset
|
143 ColumnVector column (octave_idx_type i) const; |
b11c31849b44
improve norm computation capabilities
Jaroslav Hajek <highegg@gmail.com>
parents:
7922
diff
changeset
|
144 |
5506 | 145 private: |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
146 SparseMatrix dinverse (MatrixType &mattyp, octave_idx_type& info, |
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
147 double& rcond, const bool force = false, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
148 const bool calccond = true) const; |
5506 | 149 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
150 SparseMatrix tinverse (MatrixType &mattyp, octave_idx_type& info, |
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
151 double& rcond, const bool force = false, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
152 const bool calccond = true) const; |
5506 | 153 |
154 public: | |
5164 | 155 SparseMatrix inverse (void) const; |
5785 | 156 SparseMatrix inverse (MatrixType& mattype) const; |
157 SparseMatrix inverse (MatrixType& mattype, octave_idx_type& info) const; | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
158 SparseMatrix inverse (MatrixType& mattype, octave_idx_type& info, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
159 double& rcond, int force = 0, int calc_cond = 1) const; |
5164 | 160 |
161 DET determinant (void) const; | |
5275 | 162 DET determinant (octave_idx_type& info) const; |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
163 DET determinant (octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
164 int calc_cond = 1) const; |
5164 | 165 |
166 private: | |
167 // Diagonal matrix solvers | |
5785 | 168 Matrix dsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
169 double& rcond, solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
170 bool calc_cond = false) const; |
5164 | 171 |
5785 | 172 ComplexMatrix dsolve (MatrixType &typ, const ComplexMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
173 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
174 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
175 bool calc_cond = false) const; |
5164 | 176 |
5785 | 177 SparseMatrix dsolve (MatrixType &typ, const SparseMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
178 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
179 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
180 bool calc_cond = false) const; |
5164 | 181 |
5785 | 182 SparseComplexMatrix dsolve (MatrixType &typ, const SparseComplexMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
183 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
184 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
185 bool calc_cond = false) const; |
5164 | 186 |
187 // Upper triangular matrix solvers | |
5785 | 188 Matrix utsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
189 double& rcond, solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
190 bool calc_cond = false) const; |
5164 | 191 |
5785 | 192 ComplexMatrix utsolve (MatrixType &typ, const ComplexMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
193 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
194 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
195 bool calc_cond = false) const; |
5164 | 196 |
5785 | 197 SparseMatrix utsolve (MatrixType &typ, const SparseMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
198 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
199 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
200 bool calc_cond = false) const; |
5164 | 201 |
5785 | 202 SparseComplexMatrix utsolve (MatrixType &typ, const SparseComplexMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
203 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
204 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
205 bool calc_cond = false) const; |
5164 | 206 |
207 // Lower triangular matrix solvers | |
5785 | 208 Matrix ltsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
209 double& rcond, solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
210 bool calc_cond = false) const; |
5164 | 211 |
5785 | 212 ComplexMatrix ltsolve (MatrixType &typ, const ComplexMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
213 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
214 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
215 bool calc_cond = false) const; |
5164 | 216 |
5785 | 217 SparseMatrix ltsolve (MatrixType &typ, const SparseMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
218 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
219 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
220 bool calc_cond = false) const; |
5164 | 221 |
5785 | 222 SparseComplexMatrix ltsolve (MatrixType &typ, const SparseComplexMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
223 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
224 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
225 bool calc_cond = false) const; |
5164 | 226 |
227 // Tridiagonal matrix solvers | |
5785 | 228 Matrix trisolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
229 double& rcond, solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
230 bool calc_cond = false) const; |
5164 | 231 |
5785 | 232 ComplexMatrix trisolve (MatrixType &typ, const ComplexMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
233 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
234 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
235 bool calc_cond = false) const; |
5164 | 236 |
5785 | 237 SparseMatrix trisolve (MatrixType &typ, const SparseMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
238 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
239 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
240 bool calc_cond = false) const; |
5164 | 241 |
5785 | 242 SparseComplexMatrix trisolve (MatrixType &typ, const SparseComplexMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
243 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
244 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
245 bool calc_cond = false) const; |
5164 | 246 |
247 // Banded matrix solvers (umfpack/cholesky) | |
5785 | 248 Matrix bsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
249 double& rcond, solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
250 bool calc_cond = false) const; |
5164 | 251 |
5785 | 252 ComplexMatrix bsolve (MatrixType &typ, const ComplexMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
253 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
254 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
255 bool calc_cond = false) const; |
5164 | 256 |
5785 | 257 SparseMatrix bsolve (MatrixType &typ, const SparseMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
258 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
259 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
260 bool calc_cond = false) const; |
5164 | 261 |
5785 | 262 SparseComplexMatrix bsolve (MatrixType &typ, const SparseComplexMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
263 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
264 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
265 bool calc_cond = false) const; |
5164 | 266 |
267 // Full matrix solvers (umfpack/cholesky) | |
5681 | 268 void * factorize (octave_idx_type& err, double &rcond, Matrix &Control, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
269 Matrix &Info, solve_singularity_handler sing_handler, |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
270 bool calc_cond = false) const; |
5164 | 271 |
5785 | 272 Matrix fsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
273 double& rcond, solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
274 bool calc_cond = false) const; |
5164 | 275 |
5785 | 276 ComplexMatrix fsolve (MatrixType &typ, const ComplexMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
277 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
278 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
279 bool calc_cond = false) const; |
5164 | 280 |
5785 | 281 SparseMatrix fsolve (MatrixType &typ, const SparseMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
282 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
283 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
284 bool calc_cond = false) const; |
5164 | 285 |
5785 | 286 SparseComplexMatrix fsolve (MatrixType &typ, const SparseComplexMatrix& b, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
287 octave_idx_type& info, double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
288 solve_singularity_handler sing_handler, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
289 bool calc_cond = false) const; |
5164 | 290 |
291 public: | |
292 // Generic interface to solver with no probing of type | |
5785 | 293 Matrix solve (MatrixType &typ, const Matrix& b) const; |
294 Matrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info) const; | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
295 Matrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
296 double& rcond) const; |
5785 | 297 Matrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
298 double& rcond, solve_singularity_handler sing_handler, |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
299 bool singular_fallback = true) const; |
5164 | 300 |
5785 | 301 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
302 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
303 octave_idx_type& info) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
304 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
305 octave_idx_type& info, double& rcond) const; |
5785 | 306 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
307 octave_idx_type& info, double& rcond, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
308 solve_singularity_handler sing_handler, |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
309 bool singular_fallback = true) const; |
5164 | 310 |
5785 | 311 SparseMatrix solve (MatrixType &typ, const SparseMatrix& b) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
312 SparseMatrix solve (MatrixType &typ, const SparseMatrix& b, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
313 octave_idx_type& info) const; |
5785 | 314 SparseMatrix solve (MatrixType &typ, const SparseMatrix& b, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
315 octave_idx_type& info, double& rcond) const; |
5785 | 316 SparseMatrix solve (MatrixType &typ, const SparseMatrix& b, |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
317 octave_idx_type& info, double& rcond, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
318 solve_singularity_handler sing_handler, |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
319 bool singular_fallback = true) const; |
5164 | 320 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
321 SparseComplexMatrix solve (MatrixType &typ, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
322 const SparseComplexMatrix& b) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
323 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
324 octave_idx_type& info) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
325 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
326 octave_idx_type& info, double& rcond) const; |
5785 | 327 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
328 octave_idx_type& info, double& rcond, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
329 solve_singularity_handler sing_handler, |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
330 bool singular_fallabck = true) const; |
5164 | 331 |
5785 | 332 ColumnVector solve (MatrixType &typ, const ColumnVector& b) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
333 ColumnVector solve (MatrixType &typ, const ColumnVector& b, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
334 octave_idx_type& info) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
335 ColumnVector solve (MatrixType &typ, const ColumnVector& b, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
336 octave_idx_type& info, double& rcond) const; |
5785 | 337 ColumnVector solve (MatrixType &typ, const ColumnVector& b, |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
338 octave_idx_type& info, double& rcond, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
339 solve_singularity_handler sing_handler) const; |
5164 | 340 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
341 ComplexColumnVector solve (MatrixType &typ, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
342 const ComplexColumnVector& b) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
343 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
344 octave_idx_type& info) const; |
5785 | 345 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
346 octave_idx_type& info, double& rcond) const; |
5785 | 347 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
348 octave_idx_type& info, double& rcond, |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
349 solve_singularity_handler sing_handler) const; |
5164 | 350 |
351 // Generic interface to solver with probing of type | |
352 Matrix solve (const Matrix& b) const; | |
5275 | 353 Matrix solve (const Matrix& b, octave_idx_type& info) const; |
354 Matrix solve (const Matrix& b, octave_idx_type& info, double& rcond) const; | |
355 Matrix solve (const Matrix& b, octave_idx_type& info, double& rcond, | |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
356 solve_singularity_handler sing_handler) const; |
5164 | 357 |
358 ComplexMatrix solve (const ComplexMatrix& b) const; | |
5275 | 359 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
360 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
361 double& rcond) const; |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
362 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
363 double& rcond, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
364 solve_singularity_handler sing_handler) const; |
5164 | 365 |
366 SparseMatrix solve (const SparseMatrix& b) const; | |
5275 | 367 SparseMatrix solve (const SparseMatrix& b, octave_idx_type& info) const; |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
368 SparseMatrix solve (const SparseMatrix& b, octave_idx_type& info, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
369 double& rcond) const; |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
370 SparseMatrix solve (const SparseMatrix& b, octave_idx_type& info, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
371 double& rcond, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
372 solve_singularity_handler sing_handler) const; |
5164 | 373 |
374 SparseComplexMatrix solve (const SparseComplexMatrix& b) const; | |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
375 SparseComplexMatrix solve (const SparseComplexMatrix& b, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
376 octave_idx_type& info) const; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
377 SparseComplexMatrix solve (const SparseComplexMatrix& b, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
378 octave_idx_type& info, double& rcond) const; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
379 SparseComplexMatrix solve (const SparseComplexMatrix& b, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
380 octave_idx_type& info, double& rcond, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
381 solve_singularity_handler sing_handler) const; |
5164 | 382 |
383 ColumnVector solve (const ColumnVector& b) const; | |
5275 | 384 ColumnVector solve (const ColumnVector& b, octave_idx_type& info) const; |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
385 ColumnVector solve (const ColumnVector& b, octave_idx_type& info, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
386 double& rcond) const; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
387 ColumnVector solve (const ColumnVector& b, octave_idx_type& info, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
388 double& rcond, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
389 solve_singularity_handler sing_handler) const; |
5164 | 390 |
391 ComplexColumnVector solve (const ComplexColumnVector& b) const; | |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
392 ComplexColumnVector solve (const ComplexColumnVector& b, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
393 octave_idx_type& info) const; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
394 ComplexColumnVector solve (const ComplexColumnVector& b, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
395 octave_idx_type& info, double& rcond) const; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
396 ComplexColumnVector solve (const ComplexColumnVector& b, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
397 octave_idx_type& info, double& rcond, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
398 solve_singularity_handler sing_handler) const; |
5164 | 399 |
400 // other operations | |
401 | |
402 bool any_element_is_negative (bool = false) const; | |
7922
935be827eaf8
error for NaN values in & and | expressions
John W. Eaton <jwe@octave.org>
parents:
7802
diff
changeset
|
403 bool any_element_is_nan (void) const; |
5164 | 404 bool any_element_is_inf_or_nan (void) const; |
9852
aabf7a8c2e57
implement sparse logical conversion
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
405 bool any_element_not_one_or_zero (void) const; |
6989 | 406 bool all_elements_are_zero (void) const; |
5164 | 407 bool all_elements_are_int_or_inf_or_nan (void) const; |
408 bool all_integers (double& max_val, double& min_val) const; | |
409 bool too_large_for_float (void) const; | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
410 |
5164 | 411 SparseBoolMatrix operator ! (void) const; |
412 | |
413 SparseBoolMatrix all (int dim = -1) const; | |
414 SparseBoolMatrix any (int dim = -1) const; | |
415 | |
416 SparseMatrix cumprod (int dim = -1) const; | |
417 SparseMatrix cumsum (int dim = -1) const; | |
418 SparseMatrix prod (int dim = -1) const; | |
419 SparseMatrix sum (int dim = -1) const; | |
420 SparseMatrix sumsq (int dim = -1) const; | |
421 SparseMatrix abs (void) const; | |
422 | |
5275 | 423 SparseMatrix diag (octave_idx_type k = 0) const; |
5164 | 424 |
425 Matrix matrix_value (void) const; | |
426 | |
427 SparseMatrix squeeze (void) const; | |
428 | |
429 SparseMatrix reshape (const dim_vector& new_dims) const; | |
430 | |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
431 SparseMatrix permute (const Array<octave_idx_type>& vec, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
432 bool inv = false) const; |
5164 | 433 |
5275 | 434 SparseMatrix ipermute (const Array<octave_idx_type>& vec) const; |
5164 | 435 |
436 // i/o | |
437 | |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
438 friend OCTAVE_API std::ostream& operator << (std::ostream& os, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
439 const SparseMatrix& a); |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
440 friend OCTAVE_API std::istream& operator >> (std::istream& is, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
441 SparseMatrix& a); |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
442 |
5164 | 443 }; |
444 | |
5509 | 445 // Publish externally used friend functions. |
446 | |
6108 | 447 extern OCTAVE_API SparseMatrix real (const SparseComplexMatrix& a); |
448 extern OCTAVE_API SparseMatrix imag (const SparseComplexMatrix& a); | |
5509 | 449 |
450 // Other operators. | |
451 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
452 extern OCTAVE_API SparseMatrix operator * (const SparseMatrix& a, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
453 const SparseMatrix& b); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
454 extern OCTAVE_API Matrix operator * (const Matrix& a, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
455 const SparseMatrix& b); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
456 extern OCTAVE_API Matrix mul_trans (const Matrix& a, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
457 const SparseMatrix& b); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
458 extern OCTAVE_API Matrix operator * (const SparseMatrix& a, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
459 const Matrix& b); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
460 extern OCTAVE_API Matrix trans_mul (const SparseMatrix& a, |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
461 const Matrix& b); |
5164 | 462 |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
463 extern OCTAVE_API SparseMatrix operator * (const DiagMatrix&, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
464 const SparseMatrix&); |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
465 extern OCTAVE_API SparseMatrix operator * (const SparseMatrix&, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
466 const DiagMatrix&); |
8964
f4f4d65faaa0
Implement sparse * diagonal and diagonal * sparse operations, double-prec only.
Jason Riedy <jason@acm.org>
parents:
8920
diff
changeset
|
467 |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
468 extern OCTAVE_API SparseMatrix operator + (const DiagMatrix&, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
469 const SparseMatrix&); |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
470 extern OCTAVE_API SparseMatrix operator + (const SparseMatrix&, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
471 const DiagMatrix&); |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
472 extern OCTAVE_API SparseMatrix operator - (const DiagMatrix&, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
473 const SparseMatrix&); |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
474 extern OCTAVE_API SparseMatrix operator - (const SparseMatrix&, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
475 const DiagMatrix&); |
8966
1bba53c0a38d
Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents:
8964
diff
changeset
|
476 |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
477 extern OCTAVE_API SparseMatrix operator * (const PermMatrix&, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
478 const SparseMatrix&); |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
479 extern OCTAVE_API SparseMatrix operator * (const SparseMatrix&, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
480 const PermMatrix&); |
8968
91d53dc37f79
Add perm * sparse, perm \ sparse, sparse * perm, and sparse / perm operations.
Jason Riedy <jason@acm.org>
parents:
8966
diff
changeset
|
481 |
6108 | 482 extern OCTAVE_API SparseMatrix min (double d, const SparseMatrix& m); |
483 extern OCTAVE_API SparseMatrix min (const SparseMatrix& m, double d); | |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
484 extern OCTAVE_API SparseMatrix min (const SparseMatrix& a, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
485 const SparseMatrix& b); |
5164 | 486 |
6108 | 487 extern OCTAVE_API SparseMatrix max (double d, const SparseMatrix& m); |
488 extern OCTAVE_API SparseMatrix max (const SparseMatrix& m, double d); | |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
489 extern OCTAVE_API SparseMatrix max (const SparseMatrix& a, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
490 const SparseMatrix& b); |
5164 | 491 |
6708 | 492 SPARSE_SMS_CMP_OP_DECLS (SparseMatrix, double, OCTAVE_API) |
493 SPARSE_SMS_BOOL_OP_DECLS (SparseMatrix, double, OCTAVE_API) | |
5164 | 494 |
6708 | 495 SPARSE_SSM_CMP_OP_DECLS (double, SparseMatrix, OCTAVE_API) |
496 SPARSE_SSM_BOOL_OP_DECLS (double, SparseMatrix, OCTAVE_API) | |
5164 | 497 |
6708 | 498 SPARSE_SMSM_CMP_OP_DECLS (SparseMatrix, SparseMatrix, OCTAVE_API) |
499 SPARSE_SMSM_BOOL_OP_DECLS (SparseMatrix, SparseMatrix, OCTAVE_API) | |
5164 | 500 |
501 SPARSE_FORWARD_DEFS (MSparse, SparseMatrix, Matrix, double) | |
502 | |
16313
6aafe87a3144
use int64_t for idx type if --enable-64
John W. Eaton <jwe@octave.org>
parents:
15271
diff
changeset
|
503 #ifdef USE_64_BIT_IDX_T |
5322 | 504 #define UMFPACK_DNAME(name) umfpack_dl_ ## name |
505 #else | |
506 #define UMFPACK_DNAME(name) umfpack_di_ ## name | |
507 #endif | |
508 | |
5164 | 509 #endif |