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