comparison liboctave/CSparse.h @ 11586:12df7854fa7c

strip trailing whitespace from source files
author John W. Eaton <jwe@octave.org>
date Thu, 20 Jan 2011 17:24:59 -0500
parents fd0a3ac60b0e
children 72c96de7a403
comparison
equal deleted inserted replaced
11585:1473d0cf86d2 11586:12df7854fa7c
46 class 46 class
47 OCTAVE_API 47 OCTAVE_API
48 SparseComplexMatrix : public MSparse<Complex> 48 SparseComplexMatrix : public MSparse<Complex>
49 { 49 {
50 public: 50 public:
51 51
52 typedef void (*solve_singularity_handler) (double rcond); 52 typedef void (*solve_singularity_handler) (double rcond);
53 53
54 SparseComplexMatrix (void) : MSparse<Complex> () { } 54 SparseComplexMatrix (void) : MSparse<Complex> () { }
55 55
56 SparseComplexMatrix (octave_idx_type r, octave_idx_type c) : MSparse<Complex> (r, c) { } 56 SparseComplexMatrix (octave_idx_type r, octave_idx_type c) : MSparse<Complex> (r, c) { }
57 57
58 SparseComplexMatrix (const dim_vector& dv, octave_idx_type nz = 0) : 58 SparseComplexMatrix (const dim_vector& dv, octave_idx_type nz = 0) :
59 MSparse<Complex> (dv, nz) { } 59 MSparse<Complex> (dv, nz) { }
60 60
61 explicit SparseComplexMatrix (octave_idx_type r, octave_idx_type c, Complex val) 61 explicit SparseComplexMatrix (octave_idx_type r, octave_idx_type c, Complex val)
62 : MSparse<Complex> (r, c, val) { } 62 : MSparse<Complex> (r, c, val) { }
63 63
64 SparseComplexMatrix (octave_idx_type r, octave_idx_type c, double val) 64 SparseComplexMatrix (octave_idx_type r, octave_idx_type c, double val)
65 : MSparse<Complex> (r, c, Complex (val)) { } 65 : MSparse<Complex> (r, c, Complex (val)) { }
66 66
67 SparseComplexMatrix (const SparseComplexMatrix& a) 67 SparseComplexMatrix (const SparseComplexMatrix& a)
68 : MSparse<Complex> (a) { } 68 : MSparse<Complex> (a) { }
69 69
70 SparseComplexMatrix (const SparseComplexMatrix& a, const dim_vector& dv) 70 SparseComplexMatrix (const SparseComplexMatrix& a, const dim_vector& dv)
71 : MSparse<Complex> (a, dv) { } 71 : MSparse<Complex> (a, dv) { }
72 72
73 SparseComplexMatrix (const MSparse<Complex>& a) : MSparse<Complex> (a) { } 73 SparseComplexMatrix (const MSparse<Complex>& a) : MSparse<Complex> (a) { }
74 74
75 SparseComplexMatrix (const Sparse<Complex>& a) : MSparse<Complex> (a) { } 75 SparseComplexMatrix (const Sparse<Complex>& a) : MSparse<Complex> (a) { }
76 76
77 explicit SparseComplexMatrix (const ComplexMatrix& a) 77 explicit SparseComplexMatrix (const ComplexMatrix& a)
78 : MSparse<Complex> (a) { } 78 : MSparse<Complex> (a) { }
79 79
80 explicit SparseComplexMatrix (const ComplexNDArray& a) 80 explicit SparseComplexMatrix (const ComplexNDArray& a)
81 : MSparse<Complex> (a) { } 81 : MSparse<Complex> (a) { }
82 82
83 SparseComplexMatrix (const Array<Complex>& a, const idx_vector& r, 83 SparseComplexMatrix (const Array<Complex>& a, const idx_vector& r,
84 const idx_vector& c, octave_idx_type nr = -1, 84 const idx_vector& c, octave_idx_type nr = -1,
85 octave_idx_type nc = -1, bool sum_terms = true, 85 octave_idx_type nc = -1, bool sum_terms = true,
86 octave_idx_type nzm = -1) 86 octave_idx_type nzm = -1)
87 : MSparse<Complex> (a, r, c, nr, nc, sum_terms, nzm) { } 87 : MSparse<Complex> (a, r, c, nr, nc, sum_terms, nzm) { }
88 88
89 explicit SparseComplexMatrix (const SparseMatrix& a); 89 explicit SparseComplexMatrix (const SparseMatrix& a);
90 90
91 explicit SparseComplexMatrix (const SparseBoolMatrix& a); 91 explicit SparseComplexMatrix (const SparseBoolMatrix& a);
92 92
93 explicit SparseComplexMatrix (const ComplexDiagMatrix& a); 93 explicit SparseComplexMatrix (const ComplexDiagMatrix& a);
94 94
95 SparseComplexMatrix (octave_idx_type r, octave_idx_type c, octave_idx_type num_nz) 95 SparseComplexMatrix (octave_idx_type r, octave_idx_type c, octave_idx_type num_nz)
96 : MSparse<Complex> (r, c, num_nz) { } 96 : MSparse<Complex> (r, c, num_nz) { }
97 97
98 SparseComplexMatrix& operator = (const SparseComplexMatrix& a) 98 SparseComplexMatrix& operator = (const SparseComplexMatrix& a)
99 { 99 {
100 MSparse<Complex>::operator = (a); 100 MSparse<Complex>::operator = (a);
134 ComplexRowVector row (octave_idx_type i) const; 134 ComplexRowVector row (octave_idx_type i) const;
135 135
136 ComplexColumnVector column (octave_idx_type i) const; 136 ComplexColumnVector column (octave_idx_type i) const;
137 137
138 private: 138 private:
139 SparseComplexMatrix dinverse (MatrixType &mattyp, octave_idx_type& info, 139 SparseComplexMatrix dinverse (MatrixType &mattyp, octave_idx_type& info,
140 double& rcond, const bool force = false, 140 double& rcond, const bool force = false,
141 const bool calccond = true) const; 141 const bool calccond = true) const;
142 142
143 SparseComplexMatrix tinverse (MatrixType &mattyp, octave_idx_type& info, 143 SparseComplexMatrix tinverse (MatrixType &mattyp, octave_idx_type& info,
144 double& rcond, const bool force = false, 144 double& rcond, const bool force = false,
145 const bool calccond = true) const; 145 const bool calccond = true) const;
146 146
147 public: 147 public:
148 SparseComplexMatrix inverse (void) const; 148 SparseComplexMatrix inverse (void) const;
149 SparseComplexMatrix inverse (MatrixType& mattype) const; 149 SparseComplexMatrix inverse (MatrixType& mattype) const;
150 SparseComplexMatrix inverse (MatrixType& mattype, 150 SparseComplexMatrix inverse (MatrixType& mattype,
151 octave_idx_type& info) const; 151 octave_idx_type& info) const;
152 SparseComplexMatrix inverse (MatrixType& mattype, octave_idx_type& info, 152 SparseComplexMatrix inverse (MatrixType& mattype, octave_idx_type& info,
153 double& rcond, int force = 0, 153 double& rcond, int force = 0,
154 int calc_cond = 1) const; 154 int calc_cond = 1) const;
155 155
156 ComplexDET determinant (void) const; 156 ComplexDET determinant (void) const;
157 ComplexDET determinant (octave_idx_type& info) const; 157 ComplexDET determinant (octave_idx_type& info) const;
158 ComplexDET determinant (octave_idx_type& info, double& rcond, 158 ComplexDET determinant (octave_idx_type& info, double& rcond,
159 int calc_cond = 1) const; 159 int calc_cond = 1) const;
160 160
161 private: 161 private:
162 // Diagonal matrix solvers 162 // Diagonal matrix solvers
163 ComplexMatrix dsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, 163 ComplexMatrix dsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
164 double& rcond, solve_singularity_handler sing_handler, 164 double& rcond, solve_singularity_handler sing_handler,
165 bool calc_cond = false) const; 165 bool calc_cond = false) const;
166 166
167 ComplexMatrix dsolve (MatrixType &typ, const ComplexMatrix& b, 167 ComplexMatrix dsolve (MatrixType &typ, const ComplexMatrix& b,
168 octave_idx_type& info, double& rcond, 168 octave_idx_type& info, double& rcond,
169 solve_singularity_handler sing_handler, 169 solve_singularity_handler sing_handler,
170 bool calc_cond = false) const; 170 bool calc_cond = false) const;
171 171
172 SparseComplexMatrix dsolve (MatrixType &typ, const SparseMatrix& b, 172 SparseComplexMatrix dsolve (MatrixType &typ, const SparseMatrix& b,
173 octave_idx_type& info, double& rcond, 173 octave_idx_type& info, double& rcond,
174 solve_singularity_handler sing_handler, 174 solve_singularity_handler sing_handler,
175 bool calc_cond = false) const; 175 bool calc_cond = false) const;
176 176
177 SparseComplexMatrix dsolve (MatrixType &typ, const SparseComplexMatrix& b, 177 SparseComplexMatrix dsolve (MatrixType &typ, const SparseComplexMatrix& b,
178 octave_idx_type& info, double& rcond, 178 octave_idx_type& info, double& rcond,
179 solve_singularity_handler sing_handler, 179 solve_singularity_handler sing_handler,
180 bool calc_cond = false) const; 180 bool calc_cond = false) const;
181 181
182 // Upper triangular matrix solvers 182 // Upper triangular matrix solvers
183 ComplexMatrix utsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, 183 ComplexMatrix utsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
184 double& rcond, solve_singularity_handler sing_handler, 184 double& rcond, solve_singularity_handler sing_handler,
185 bool calc_cond = false) const; 185 bool calc_cond = false) const;
186 186
187 ComplexMatrix utsolve (MatrixType &typ, const ComplexMatrix& b, 187 ComplexMatrix utsolve (MatrixType &typ, const ComplexMatrix& b,
188 octave_idx_type& info, double& rcond, 188 octave_idx_type& info, double& rcond,
189 solve_singularity_handler sing_handler, 189 solve_singularity_handler sing_handler,
190 bool calc_cond = false) const; 190 bool calc_cond = false) const;
191 191
192 SparseComplexMatrix utsolve (MatrixType &typ, const SparseMatrix& b, 192 SparseComplexMatrix utsolve (MatrixType &typ, const SparseMatrix& b,
193 octave_idx_type& info, double& rcond, 193 octave_idx_type& info, double& rcond,
194 solve_singularity_handler sing_handler, 194 solve_singularity_handler sing_handler,
195 bool calc_cond = false) const; 195 bool calc_cond = false) const;
196 196
197 SparseComplexMatrix utsolve (MatrixType &typ, const SparseComplexMatrix& b, 197 SparseComplexMatrix utsolve (MatrixType &typ, const SparseComplexMatrix& b,
198 octave_idx_type& info, double& rcond, 198 octave_idx_type& info, double& rcond,
199 solve_singularity_handler sing_handler, 199 solve_singularity_handler sing_handler,
200 bool calc_cond = false) const; 200 bool calc_cond = false) const;
201 201
202 // Lower triangular matrix solvers 202 // Lower triangular matrix solvers
203 ComplexMatrix ltsolve (MatrixType &typ, const Matrix& b, 203 ComplexMatrix ltsolve (MatrixType &typ, const Matrix& b,
204 octave_idx_type& info, double& rcond, 204 octave_idx_type& info, double& rcond,
205 solve_singularity_handler sing_handler, 205 solve_singularity_handler sing_handler,
206 bool calc_cond = false) const; 206 bool calc_cond = false) const;
207 207
208 ComplexMatrix ltsolve (MatrixType &typ, const ComplexMatrix& b, 208 ComplexMatrix ltsolve (MatrixType &typ, const ComplexMatrix& b,
209 octave_idx_type& info, double& rcond, 209 octave_idx_type& info, double& rcond,
210 solve_singularity_handler sing_handler, 210 solve_singularity_handler sing_handler,
211 bool calc_cond = false) const; 211 bool calc_cond = false) const;
212 212
213 SparseComplexMatrix ltsolve (MatrixType &typ, const SparseMatrix& b, 213 SparseComplexMatrix ltsolve (MatrixType &typ, const SparseMatrix& b,
214 octave_idx_type& info, double& rcond, 214 octave_idx_type& info, double& rcond,
215 solve_singularity_handler sing_handler, 215 solve_singularity_handler sing_handler,
216 bool calc_cond = false) const; 216 bool calc_cond = false) const;
217 217
218 SparseComplexMatrix ltsolve (MatrixType &typ, const SparseComplexMatrix& b, 218 SparseComplexMatrix ltsolve (MatrixType &typ, const SparseComplexMatrix& b,
219 octave_idx_type& info, double& rcond, 219 octave_idx_type& info, double& rcond,
220 solve_singularity_handler sing_handler, 220 solve_singularity_handler sing_handler,
221 bool calc_cond = false) const; 221 bool calc_cond = false) const;
222 222
223 // Tridiagonal matrix solvers 223 // Tridiagonal matrix solvers
224 ComplexMatrix trisolve (MatrixType &typ, const Matrix& b, 224 ComplexMatrix trisolve (MatrixType &typ, const Matrix& b,
225 octave_idx_type& info, double& rcond, 225 octave_idx_type& info, double& rcond,
226 solve_singularity_handler sing_handler, 226 solve_singularity_handler sing_handler,
227 bool calc_cond = false) const; 227 bool calc_cond = false) const;
228 228
229 ComplexMatrix trisolve (MatrixType &typ, const ComplexMatrix& b, 229 ComplexMatrix trisolve (MatrixType &typ, const ComplexMatrix& b,
230 octave_idx_type& info, double& rcond, 230 octave_idx_type& info, double& rcond,
231 solve_singularity_handler sing_handler, 231 solve_singularity_handler sing_handler,
232 bool calc_cond = false) const; 232 bool calc_cond = false) const;
233 233
234 SparseComplexMatrix trisolve (MatrixType &typ, const SparseMatrix& b, 234 SparseComplexMatrix trisolve (MatrixType &typ, const SparseMatrix& b,
235 octave_idx_type& info, double& rcond, 235 octave_idx_type& info, double& rcond,
236 solve_singularity_handler sing_handler, 236 solve_singularity_handler sing_handler,
237 bool calc_cond = false) const; 237 bool calc_cond = false) const;
238 238
239 SparseComplexMatrix trisolve (MatrixType &typ, const SparseComplexMatrix& b, 239 SparseComplexMatrix trisolve (MatrixType &typ, const SparseComplexMatrix& b,
240 octave_idx_type& info, double& rcond, 240 octave_idx_type& info, double& rcond,
241 solve_singularity_handler sing_handler, 241 solve_singularity_handler sing_handler,
242 bool calc_cond = false) const; 242 bool calc_cond = false) const;
243 243
244 // Banded matrix solvers (umfpack/cholesky) 244 // Banded matrix solvers (umfpack/cholesky)
245 ComplexMatrix bsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, 245 ComplexMatrix bsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
246 double& rcond, solve_singularity_handler sing_handler, 246 double& rcond, solve_singularity_handler sing_handler,
247 bool calc_cond = false) const; 247 bool calc_cond = false) const;
248 248
249 ComplexMatrix bsolve (MatrixType &typ, const ComplexMatrix& b, 249 ComplexMatrix bsolve (MatrixType &typ, const ComplexMatrix& b,
250 octave_idx_type& info, double& rcond, 250 octave_idx_type& info, double& rcond,
251 solve_singularity_handler sing_handler, 251 solve_singularity_handler sing_handler,
252 bool calc_cond = false) const; 252 bool calc_cond = false) const;
253 253
254 SparseComplexMatrix bsolve (MatrixType &typ, const SparseMatrix& b, 254 SparseComplexMatrix bsolve (MatrixType &typ, const SparseMatrix& b,
255 octave_idx_type& info, double& rcond, 255 octave_idx_type& info, double& rcond,
256 solve_singularity_handler sing_handler, 256 solve_singularity_handler sing_handler,
257 bool calc_cond = false) const; 257 bool calc_cond = false) const;
258 258
259 SparseComplexMatrix bsolve (MatrixType &typ, const SparseComplexMatrix& b, 259 SparseComplexMatrix bsolve (MatrixType &typ, const SparseComplexMatrix& b,
260 octave_idx_type& info, double& rcond, 260 octave_idx_type& info, double& rcond,
261 solve_singularity_handler sing_handler, 261 solve_singularity_handler sing_handler,
262 bool calc_cond = false) const; 262 bool calc_cond = false) const;
263 263
264 // Full matrix solvers (umfpack/cholesky) 264 // Full matrix solvers (umfpack/cholesky)
265 void * factorize (octave_idx_type& err, double &rcond, Matrix &Control, 265 void * factorize (octave_idx_type& err, double &rcond, Matrix &Control,
266 Matrix &Info, solve_singularity_handler sing_handler, 266 Matrix &Info, solve_singularity_handler sing_handler,
267 bool calc_cond) const; 267 bool calc_cond) const;
268 268
269 ComplexMatrix fsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, 269 ComplexMatrix fsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
270 double& rcond, solve_singularity_handler sing_handler, 270 double& rcond, solve_singularity_handler sing_handler,
271 bool calc_cond = false) const; 271 bool calc_cond = false) const;
272 272
273 ComplexMatrix fsolve (MatrixType &typ, const ComplexMatrix& b, 273 ComplexMatrix fsolve (MatrixType &typ, const ComplexMatrix& b,
274 octave_idx_type& info, double& rcond, 274 octave_idx_type& info, double& rcond,
275 solve_singularity_handler sing_handler, 275 solve_singularity_handler sing_handler,
276 bool calc_cond = false) const; 276 bool calc_cond = false) const;
277 277
278 SparseComplexMatrix fsolve (MatrixType &typ, const SparseMatrix& b, 278 SparseComplexMatrix fsolve (MatrixType &typ, const SparseMatrix& b,
279 octave_idx_type& info, double& rcond, 279 octave_idx_type& info, double& rcond,
280 solve_singularity_handler sing_handler, 280 solve_singularity_handler sing_handler,
281 bool calc_cond = false) const; 281 bool calc_cond = false) const;
282 282
283 SparseComplexMatrix fsolve (MatrixType &typ, const SparseComplexMatrix& b, 283 SparseComplexMatrix fsolve (MatrixType &typ, const SparseComplexMatrix& b,
284 octave_idx_type& info, double& rcond, 284 octave_idx_type& info, double& rcond,
285 solve_singularity_handler sing_handler, 285 solve_singularity_handler sing_handler,
286 bool calc_cond = false) const; 286 bool calc_cond = false) const;
287 287
288 public: 288 public:
289 // Generic interface to solver with no probing of type 289 // Generic interface to solver with no probing of type
290 ComplexMatrix solve (MatrixType &typ, const Matrix& b) const; 290 ComplexMatrix solve (MatrixType &typ, const Matrix& b) const;
291 ComplexMatrix solve (MatrixType &typ, const Matrix& b, 291 ComplexMatrix solve (MatrixType &typ, const Matrix& b,
292 octave_idx_type& info) const; 292 octave_idx_type& info) const;
293 ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, 293 ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
294 double& rcond) const; 294 double& rcond) const;
295 ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, 295 ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
296 double& rcond, solve_singularity_handler sing_handler, 296 double& rcond, solve_singularity_handler sing_handler,
297 bool singular_fallback = true) const; 297 bool singular_fallback = true) const;
298 298
299 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b) const; 299 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b) const;
300 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, 300 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
301 octave_idx_type& info) const; 301 octave_idx_type& info) const;
302 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, 302 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
303 octave_idx_type& info, double& rcond) const; 303 octave_idx_type& info, double& rcond) const;
304 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, 304 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
305 octave_idx_type& info, double& rcond, 305 octave_idx_type& info, double& rcond,
306 solve_singularity_handler sing_handler, 306 solve_singularity_handler sing_handler,
307 bool singular_fallback = true) const; 307 bool singular_fallback = true) const;
308 308
309 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b) const; 309 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b) const;
310 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b, 310 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b,
311 octave_idx_type& info) const; 311 octave_idx_type& info) const;
312 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b, 312 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b,
313 octave_idx_type& info, double& rcond) const; 313 octave_idx_type& info, double& rcond) const;
314 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b, 314 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b,
315 octave_idx_type& info, double& rcond, 315 octave_idx_type& info, double& rcond,
316 solve_singularity_handler sing_handler, 316 solve_singularity_handler sing_handler,
317 bool singular_fallback = true) const; 317 bool singular_fallback = true) const;
318 318
319 SparseComplexMatrix solve (MatrixType &typ, 319 SparseComplexMatrix solve (MatrixType &typ,
320 const SparseComplexMatrix& b) const; 320 const SparseComplexMatrix& b) const;
321 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, 321 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b,
322 octave_idx_type& info) const; 322 octave_idx_type& info) const;
323 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, 323 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b,
324 octave_idx_type& info, double& rcond) const; 324 octave_idx_type& info, double& rcond) const;
325 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, 325 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b,
326 octave_idx_type& info, double& rcond, 326 octave_idx_type& info, double& rcond,
327 solve_singularity_handler sing_handler, 327 solve_singularity_handler sing_handler,
328 bool singular_fallback = true) const; 328 bool singular_fallback = true) const;
329 329
330 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b) const; 330 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b) const;
331 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, 331 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b,
332 octave_idx_type& info) const; 332 octave_idx_type& info) const;
333 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, 333 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b,
334 octave_idx_type& info, double& rcond) const; 334 octave_idx_type& info, double& rcond) const;
335 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, 335 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b,
336 octave_idx_type& info, double& rcond, 336 octave_idx_type& info, double& rcond,
337 solve_singularity_handler sing_handler) const; 337 solve_singularity_handler sing_handler) const;
338 338
339 ComplexColumnVector solve (MatrixType &typ, 339 ComplexColumnVector solve (MatrixType &typ,
340 const ComplexColumnVector& b) const; 340 const ComplexColumnVector& b) const;
341 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, 341 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b,
342 octave_idx_type& info) const; 342 octave_idx_type& info) const;
343 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, 343 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b,
344 octave_idx_type& info, double& rcond) const; 344 octave_idx_type& info, double& rcond) const;
345 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, 345 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b,
346 octave_idx_type& info, double& rcond, 346 octave_idx_type& info, double& rcond,
347 solve_singularity_handler sing_handler) const; 347 solve_singularity_handler sing_handler) const;
348 348
349 // Generic interface to solver with probing of type 349 // Generic interface to solver with probing of type
350 ComplexMatrix solve (const Matrix& b) const; 350 ComplexMatrix solve (const Matrix& b) const;
351 ComplexMatrix solve (const Matrix& b, octave_idx_type& info) const; 351 ComplexMatrix solve (const Matrix& b, octave_idx_type& info) const;
352 ComplexMatrix solve (const Matrix& b, octave_idx_type& info, 352 ComplexMatrix solve (const Matrix& b, octave_idx_type& info,
353 double& rcond) const; 353 double& rcond) const;
354 ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcond, 354 ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcond,
355 solve_singularity_handler sing_handler) const; 355 solve_singularity_handler sing_handler) const;
356 356
357 ComplexMatrix solve (const ComplexMatrix& b) const; 357 ComplexMatrix solve (const ComplexMatrix& b) const;
358 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const; 358 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const;
359 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, 359 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
360 double& rcond) const; 360 double& rcond) const;
361 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, 361 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
362 double& rcond, solve_singularity_handler sing_handler) const; 362 double& rcond, solve_singularity_handler sing_handler) const;
363 363
364 SparseComplexMatrix solve (const SparseMatrix& b) const; 364 SparseComplexMatrix solve (const SparseMatrix& b) const;
365 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info) const; 365 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info) const;
366 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info, 366 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info,
367 double& rcond) const; 367 double& rcond) const;
368 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info, 368 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info,
369 double& rcond, 369 double& rcond,
370 solve_singularity_handler sing_handler) const; 370 solve_singularity_handler sing_handler) const;
371 371
372 SparseComplexMatrix solve (const SparseComplexMatrix& b) const; 372 SparseComplexMatrix solve (const SparseComplexMatrix& b) const;
373 SparseComplexMatrix solve (const SparseComplexMatrix& b, 373 SparseComplexMatrix solve (const SparseComplexMatrix& b,
374 octave_idx_type& info) const; 374 octave_idx_type& info) const;
375 SparseComplexMatrix solve (const SparseComplexMatrix& b, 375 SparseComplexMatrix solve (const SparseComplexMatrix& b,
376 octave_idx_type& info, double& rcond) const; 376 octave_idx_type& info, double& rcond) const;
377 SparseComplexMatrix solve (const SparseComplexMatrix& b, 377 SparseComplexMatrix solve (const SparseComplexMatrix& b,
378 octave_idx_type& info, double& rcond, 378 octave_idx_type& info, double& rcond,
380 380
381 ComplexColumnVector solve (const ColumnVector& b) const; 381 ComplexColumnVector solve (const ColumnVector& b) const;
382 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info) const; 382 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info) const;
383 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, 383 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info,
384 double& rcond) const; 384 double& rcond) const;
385 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, 385 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info,
386 double& rcond, 386 double& rcond,
387 solve_singularity_handler sing_handler) const; 387 solve_singularity_handler sing_handler) const;
388 388
389 ComplexColumnVector solve (const ComplexColumnVector& b) const; 389 ComplexColumnVector solve (const ComplexColumnVector& b) const;
390 ComplexColumnVector solve (const ComplexColumnVector& b, 390 ComplexColumnVector solve (const ComplexColumnVector& b,
391 octave_idx_type& info) const; 391 octave_idx_type& info) const;
392 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, 392 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info,
393 double& rcond) const; 393 double& rcond) const;
394 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, 394 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info,
395 double& rcond, 395 double& rcond,
397 397
398 SparseComplexMatrix squeeze (void) const; 398 SparseComplexMatrix squeeze (void) const;
399 399
400 SparseComplexMatrix reshape (const dim_vector& new_dims) const; 400 SparseComplexMatrix reshape (const dim_vector& new_dims) const;
401 401
402 SparseComplexMatrix permute (const Array<octave_idx_type>& vec, 402 SparseComplexMatrix permute (const Array<octave_idx_type>& vec,
403 bool inv = false) const; 403 bool inv = false) const;
404 404
405 SparseComplexMatrix ipermute (const Array<octave_idx_type>& vec) const; 405 SparseComplexMatrix ipermute (const Array<octave_idx_type>& vec) const;
406 406
407 bool any_element_is_nan (void) const; 407 bool any_element_is_nan (void) const;
423 SparseMatrix abs (void) const; 423 SparseMatrix abs (void) const;
424 424
425 SparseComplexMatrix diag (octave_idx_type k = 0) const; 425 SparseComplexMatrix diag (octave_idx_type k = 0) const;
426 426
427 // i/o 427 // i/o
428 friend OCTAVE_API std::ostream& operator << (std::ostream& os, 428 friend OCTAVE_API std::ostream& operator << (std::ostream& os,
429 const SparseComplexMatrix& a); 429 const SparseComplexMatrix& a);
430 friend OCTAVE_API std::istream& operator >> (std::istream& is, 430 friend OCTAVE_API std::istream& operator >> (std::istream& is,
431 SparseComplexMatrix& a); 431 SparseComplexMatrix& a);
432 }; 432 };
433 433
434 extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&, 434 extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&,
435 const SparseComplexMatrix&); 435 const SparseComplexMatrix&);
436 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, 436 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
437 const SparseMatrix&); 437 const SparseMatrix&);
438 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, 438 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
439 const SparseComplexMatrix&); 439 const SparseComplexMatrix&);
440 440
441 extern OCTAVE_API ComplexMatrix operator * (const Matrix&, 441 extern OCTAVE_API ComplexMatrix operator * (const Matrix&,
442 const SparseComplexMatrix&); 442 const SparseComplexMatrix&);
443 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&, 443 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&,
444 const SparseMatrix&); 444 const SparseMatrix&);
445 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&, 445 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&,
446 const SparseComplexMatrix&); 446 const SparseComplexMatrix&);
447 extern OCTAVE_API ComplexMatrix mul_trans (const ComplexMatrix&, 447 extern OCTAVE_API ComplexMatrix mul_trans (const ComplexMatrix&,
448 const SparseComplexMatrix&); 448 const SparseComplexMatrix&);
449 extern OCTAVE_API ComplexMatrix mul_herm (const ComplexMatrix&, 449 extern OCTAVE_API ComplexMatrix mul_herm (const ComplexMatrix&,
450 const SparseComplexMatrix&); 450 const SparseComplexMatrix&);
451 451
452 extern OCTAVE_API ComplexMatrix operator * (const SparseMatrix&, 452 extern OCTAVE_API ComplexMatrix operator * (const SparseMatrix&,
453 const ComplexMatrix&); 453 const ComplexMatrix&);
454 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&, 454 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&,
455 const Matrix&); 455 const Matrix&);
456 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&, 456 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&,
457 const ComplexMatrix&); 457 const ComplexMatrix&);
458 extern OCTAVE_API ComplexMatrix trans_mul (const SparseComplexMatrix&, 458 extern OCTAVE_API ComplexMatrix trans_mul (const SparseComplexMatrix&,
459 const ComplexMatrix&); 459 const ComplexMatrix&);
460 extern OCTAVE_API ComplexMatrix herm_mul (const SparseComplexMatrix&, 460 extern OCTAVE_API ComplexMatrix herm_mul (const SparseComplexMatrix&,
461 const ComplexMatrix&); 461 const ComplexMatrix&);
462 462
463 extern OCTAVE_API SparseComplexMatrix operator * (const DiagMatrix&, const SparseComplexMatrix&); 463 extern OCTAVE_API SparseComplexMatrix operator * (const DiagMatrix&, const SparseComplexMatrix&);
464 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, const DiagMatrix&); 464 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, const DiagMatrix&);
465 465
486 extern OCTAVE_API SparseComplexMatrix operator * (const PermMatrix&, 486 extern OCTAVE_API SparseComplexMatrix operator * (const PermMatrix&,
487 const SparseComplexMatrix&); 487 const SparseComplexMatrix&);
488 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, 488 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
489 const PermMatrix&); 489 const PermMatrix&);
490 490
491 extern OCTAVE_API SparseComplexMatrix min (const Complex& c, 491 extern OCTAVE_API SparseComplexMatrix min (const Complex& c,
492 const SparseComplexMatrix& m); 492 const SparseComplexMatrix& m);
493 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& m, 493 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& m,
494 const Complex& c); 494 const Complex& c);
495 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& a, 495 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& a,
496 const SparseComplexMatrix& b); 496 const SparseComplexMatrix& b);
497 497
498 extern OCTAVE_API SparseComplexMatrix max (const Complex& c, 498 extern OCTAVE_API SparseComplexMatrix max (const Complex& c,
499 const SparseComplexMatrix& m); 499 const SparseComplexMatrix& m);
500 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& m, 500 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& m,
501 const Complex& c); 501 const Complex& c);
502 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& a, 502 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& a,
503 const SparseComplexMatrix& b); 503 const SparseComplexMatrix& b);
504 504
505 SPARSE_SMS_CMP_OP_DECLS (SparseComplexMatrix, Complex, OCTAVE_API) 505 SPARSE_SMS_CMP_OP_DECLS (SparseComplexMatrix, Complex, OCTAVE_API)
506 SPARSE_SMS_BOOL_OP_DECLS (SparseComplexMatrix, Complex, OCTAVE_API) 506 SPARSE_SMS_BOOL_OP_DECLS (SparseComplexMatrix, Complex, OCTAVE_API)
507 507