annotate liboctave/CSparse.h @ 8966:1bba53c0a38d

Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag. Date: Mon, 9 Mar 2009 17:45:22 -0400 This does not use the typical sparse-mx-ops generator. I suspect the sematics of elementwise multiplication and division to be rather controversial, so they are not included. If comparison operations are added, the implementation should be shifted over to use the typical generator. The template in Sparse-diag-op-defs.h likely could use const bools rather than functional argument operations. I haven't measured which is optimized more effectively. Also, the Octave binding layer in op-dm-scm.cc likely could use all sorts of macro or template trickery, but it's far easier to let Emacs handle it for now. That would be worth revisiting if further elementwise sparse and diagonal operations are added.
author Jason Riedy <jason@acm.org>
date Mon, 09 Mar 2009 17:49:14 -0400
parents f4f4d65faaa0
children 91d53dc37f79
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
1 /*
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
2
8920
eb63fbe60fab update copyright notices
John W. Eaton <jwe@octave.org>
parents: 8366
diff changeset
3 Copyright (C) 2004, 2005, 2006, 2007, 2008 David Bateman
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6823
diff changeset
4 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Andy Adler
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6823
diff changeset
5
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6823
diff changeset
6 This file is part of Octave.
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
7
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
8 Octave is free software; you can redistribute it and/or modify it
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6823
diff changeset
10 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6823
diff changeset
11 option) any later version.
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
12
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
13 Octave is distributed in the hope that it will be useful, but WITHOUT
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
16 for more details.
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
17
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6823
diff changeset
19 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6823
diff changeset
20 <http://www.gnu.org/licenses/>.
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
21
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
22 */
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
23
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
24 #if !defined (octave_CSparse_h)
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
25 #define octave_CSparse_h 1
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
26
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
27 #include "dMatrix.h"
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
28 #include "dNDArray.h"
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
29 #include "CNDArray.h"
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
30 #include "dColVector.h"
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
31 #include "CColVector.h"
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
32 #include "oct-cmplx.h"
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
33
8335
64cf956a109c templatize & fix DET
Jaroslav Hajek <highegg@gmail.com>
parents: 8303
diff changeset
34 #include "DET.h"
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
35 #include "MSparse.h"
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
36 #include "MSparse-defs.h"
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
37 #include "Sparse-op-defs.h"
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
38 #include "MatrixType.h"
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
39
8964
f4f4d65faaa0 Implement sparse * diagonal and diagonal * sparse operations, double-prec only.
Jason Riedy <jason@acm.org>
parents: 8920
diff changeset
40 class DiagMatrix;
f4f4d65faaa0 Implement sparse * diagonal and diagonal * sparse operations, double-prec only.
Jason Riedy <jason@acm.org>
parents: 8920
diff changeset
41 class ComplexDiagMatrix;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
42 class SparseMatrix;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
43 class SparseBoolMatrix;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
44
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
45 class
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
46 OCTAVE_API
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
47 SparseComplexMatrix : public MSparse<Complex>
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
48 {
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
49 public:
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
50
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
51 typedef void (*solve_singularity_handler) (double rcond);
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
52
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
53 SparseComplexMatrix (void) : MSparse<Complex> () { }
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
54
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
55 SparseComplexMatrix (octave_idx_type r, octave_idx_type c) : MSparse<Complex> (r, c) { }
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
56
6823
9fddcc586065 [project @ 2007-08-24 08:27:27 by dbateman]
dbateman
parents: 6708
diff changeset
57 SparseComplexMatrix (const dim_vector& dv, octave_idx_type nz = 0) :
9fddcc586065 [project @ 2007-08-24 08:27:27 by dbateman]
dbateman
parents: 6708
diff changeset
58 MSparse<Complex> (dv, nz) { }
9fddcc586065 [project @ 2007-08-24 08:27:27 by dbateman]
dbateman
parents: 6708
diff changeset
59
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
60 explicit SparseComplexMatrix (octave_idx_type r, octave_idx_type c, Complex val)
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
61 : MSparse<Complex> (r, c, val) { }
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
62
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
63 SparseComplexMatrix (octave_idx_type r, octave_idx_type c, double val)
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
64 : MSparse<Complex> (r, c, Complex (val)) { }
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
65
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
66 SparseComplexMatrix (const SparseComplexMatrix& a)
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
67 : MSparse<Complex> (a) { }
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
68
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
69 SparseComplexMatrix (const SparseComplexMatrix& a, const dim_vector& dv)
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
70 : MSparse<Complex> (a, dv) { }
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
71
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
72 SparseComplexMatrix (const MSparse<Complex>& a) : MSparse<Complex> (a) { }
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
73
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
74 explicit SparseComplexMatrix (const ComplexMatrix& a)
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
75 : MSparse<Complex> (a) { }
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
76
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
77 explicit SparseComplexMatrix (const ComplexNDArray& a)
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
78 : MSparse<Complex> (a) { }
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
79
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
80 explicit SparseComplexMatrix (const Array<Complex> a, const Array<octave_idx_type>& r,
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
81 const Array<octave_idx_type>& c, octave_idx_type nr = -1,
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
82 octave_idx_type nc = -1, bool sum_terms = true)
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
83 : MSparse<Complex> (a, r, c, nr, nc, sum_terms) { }
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
84
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
85 explicit SparseComplexMatrix (const Array<Complex> a,
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
86 const Array<double>& r,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
87 const Array<double>& c, octave_idx_type nr = -1,
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
88 octave_idx_type nc = -1, bool sum_terms = true)
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
89 : MSparse<Complex> (a, r, c, nr, nc, sum_terms) { }
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
90
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
91 explicit SparseComplexMatrix (const SparseMatrix& a);
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
92
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
93 explicit SparseComplexMatrix (const SparseBoolMatrix& a);
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
94
8366
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents: 8335
diff changeset
95 explicit SparseComplexMatrix (const ComplexDiagMatrix& a);
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents: 8335
diff changeset
96
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
97 SparseComplexMatrix (octave_idx_type r, octave_idx_type c, octave_idx_type num_nz)
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
98 : MSparse<Complex> (r, c, num_nz) { }
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
99
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
100 SparseComplexMatrix& operator = (const SparseComplexMatrix& a)
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
101 {
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
102 MSparse<Complex>::operator = (a);
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
103 return *this;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
104 }
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
105
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
106 bool operator == (const SparseComplexMatrix& a) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
107 bool operator != (const SparseComplexMatrix& a) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
108
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
109 bool is_hermitian (void) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
110
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
111 SparseComplexMatrix max (int dim = 0) const;
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
112 SparseComplexMatrix max (Array2<octave_idx_type>& index, int dim = 0) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
113 SparseComplexMatrix min (int dim = 0) const;
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
114 SparseComplexMatrix min (Array2<octave_idx_type>& index, int dim = 0) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
115
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
116 SparseComplexMatrix& insert (const SparseComplexMatrix& a, octave_idx_type r, octave_idx_type c);
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
117 SparseComplexMatrix& insert (const SparseMatrix& a, octave_idx_type r, octave_idx_type c);
6823
9fddcc586065 [project @ 2007-08-24 08:27:27 by dbateman]
dbateman
parents: 6708
diff changeset
118 SparseComplexMatrix& insert (const SparseComplexMatrix& a, const Array<octave_idx_type>& indx);
9fddcc586065 [project @ 2007-08-24 08:27:27 by dbateman]
dbateman
parents: 6708
diff changeset
119 SparseComplexMatrix& insert (const SparseMatrix& a, const Array<octave_idx_type>& indx);
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
120
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
121 SparseComplexMatrix concat (const SparseComplexMatrix& rb,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
122 const Array<octave_idx_type>& ra_idx);
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
123 SparseComplexMatrix concat (const SparseMatrix& rb,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
124 const Array<octave_idx_type>& ra_idx);
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
125
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
126 ComplexMatrix matrix_value (void) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
127
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
128 SparseComplexMatrix hermitian (void) const; // complex conjugate transpose
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
129 SparseComplexMatrix transpose (void) const
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
130 { return MSparse<Complex>::transpose (); }
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
131
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
132 friend SparseComplexMatrix conj (const SparseComplexMatrix& a);
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
133
8303
b11c31849b44 improve norm computation capabilities
Jaroslav Hajek <highegg@gmail.com>
parents: 7922
diff changeset
134 // extract row or column i.
b11c31849b44 improve norm computation capabilities
Jaroslav Hajek <highegg@gmail.com>
parents: 7922
diff changeset
135
b11c31849b44 improve norm computation capabilities
Jaroslav Hajek <highegg@gmail.com>
parents: 7922
diff changeset
136 ComplexRowVector row (octave_idx_type i) const;
b11c31849b44 improve norm computation capabilities
Jaroslav Hajek <highegg@gmail.com>
parents: 7922
diff changeset
137
b11c31849b44 improve norm computation capabilities
Jaroslav Hajek <highegg@gmail.com>
parents: 7922
diff changeset
138 ComplexColumnVector column (octave_idx_type i) const;
b11c31849b44 improve norm computation capabilities
Jaroslav Hajek <highegg@gmail.com>
parents: 7922
diff changeset
139
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents: 5429
diff changeset
140 private:
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
141 SparseComplexMatrix dinverse (MatrixType &mattyp, octave_idx_type& info,
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents: 5429
diff changeset
142 double& rcond, const bool force = false,
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents: 5429
diff changeset
143 const bool calccond = true) const;
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents: 5429
diff changeset
144
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
145 SparseComplexMatrix tinverse (MatrixType &mattyp, octave_idx_type& info,
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents: 5429
diff changeset
146 double& rcond, const bool force = false,
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents: 5429
diff changeset
147 const bool calccond = true) const;
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents: 5429
diff changeset
148
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents: 5429
diff changeset
149 public:
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
150 SparseComplexMatrix inverse (void) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
151 SparseComplexMatrix inverse (MatrixType& mattype) const;
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
152 SparseComplexMatrix inverse (MatrixType& mattype,
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents: 5429
diff changeset
153 octave_idx_type& info) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
154 SparseComplexMatrix inverse (MatrixType& mattype, octave_idx_type& info,
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents: 5429
diff changeset
155 double& rcond, int force = 0,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
156 int calc_cond = 1) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
157
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
158 ComplexDET determinant (void) const;
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
159 ComplexDET determinant (octave_idx_type& info) const;
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
160 ComplexDET determinant (octave_idx_type& info, double& rcond,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
161 int calc_cond = 1) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
162
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
163 private:
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
164 // Diagonal matrix solvers
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
165 ComplexMatrix dsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
166 double& rcond, solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
167 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
168
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
169 ComplexMatrix dsolve (MatrixType &typ, const ComplexMatrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
170 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
171 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
172 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
173
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
174 SparseComplexMatrix dsolve (MatrixType &typ, const SparseMatrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
175 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
176 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
177 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
178
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
179 SparseComplexMatrix dsolve (MatrixType &typ, const SparseComplexMatrix& b,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
180 octave_idx_type& info, double& rcond,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
181 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
182 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
183
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
184 // Upper triangular matrix solvers
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
185 ComplexMatrix utsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
186 double& rcond, solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
187 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
188
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
189 ComplexMatrix utsolve (MatrixType &typ, const ComplexMatrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
190 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
191 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
192 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
193
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
194 SparseComplexMatrix utsolve (MatrixType &typ, const SparseMatrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
195 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
196 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
197 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
198
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
199 SparseComplexMatrix utsolve (MatrixType &typ, const SparseComplexMatrix& b,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
200 octave_idx_type& info, double& rcond,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
201 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
202 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
203
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
204 // Lower triangular matrix solvers
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
205 ComplexMatrix ltsolve (MatrixType &typ, const Matrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
206 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
207 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
208 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
209
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
210 ComplexMatrix ltsolve (MatrixType &typ, const ComplexMatrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
211 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
212 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
213 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
214
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
215 SparseComplexMatrix ltsolve (MatrixType &typ, const SparseMatrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
216 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
217 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
218 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
219
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
220 SparseComplexMatrix ltsolve (MatrixType &typ, const SparseComplexMatrix& b,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
221 octave_idx_type& info, double& rcond,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
222 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
223 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
224
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
225 // Tridiagonal matrix solvers
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
226 ComplexMatrix trisolve (MatrixType &typ, const Matrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
227 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
228 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
229 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
230
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
231 ComplexMatrix trisolve (MatrixType &typ, const ComplexMatrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
232 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
233 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
234 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
235
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
236 SparseComplexMatrix trisolve (MatrixType &typ, const SparseMatrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
237 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
238 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
239 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
240
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
241 SparseComplexMatrix trisolve (MatrixType &typ, const SparseComplexMatrix& b,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
242 octave_idx_type& info, double& rcond,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
243 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
244 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
245
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
246 // Banded matrix solvers (umfpack/cholesky)
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
247 ComplexMatrix bsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
248 double& rcond, solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
249 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
250
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
251 ComplexMatrix bsolve (MatrixType &typ, const ComplexMatrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
252 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
253 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
254 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
255
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
256 SparseComplexMatrix bsolve (MatrixType &typ, const SparseMatrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
257 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
258 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
259 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
260
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
261 SparseComplexMatrix bsolve (MatrixType &typ, const SparseComplexMatrix& b,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
262 octave_idx_type& info, double& rcond,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
263 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
264 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
265
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
266 // Full matrix solvers (umfpack/cholesky)
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
267 void * factorize (octave_idx_type& err, double &rcond, Matrix &Control,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
268 Matrix &Info, solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
269 bool calc_cond) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
270
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
271 ComplexMatrix fsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
272 double& rcond, solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
273 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
274
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
275 ComplexMatrix fsolve (MatrixType &typ, const ComplexMatrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
276 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
277 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
278 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
279
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
280 SparseComplexMatrix fsolve (MatrixType &typ, const SparseMatrix& b,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
281 octave_idx_type& info, double& rcond,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
282 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
283 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
284
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
285 SparseComplexMatrix fsolve (MatrixType &typ, const SparseComplexMatrix& b,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
286 octave_idx_type& info, double& rcond,
5681
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
287 solve_singularity_handler sing_handler,
233d98d95659 [project @ 2006-03-16 17:48:55 by dbateman]
dbateman
parents: 5506
diff changeset
288 bool calc_cond = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
289
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
290 public:
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
291 // Generic interface to solver with no probing of type
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
292 ComplexMatrix solve (MatrixType &typ, const Matrix& b) const;
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
293 ComplexMatrix solve (MatrixType &typ, const Matrix& b,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
294 octave_idx_type& info) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
295 ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
296 double& rcond) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
297 ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
298 double& rcond, solve_singularity_handler sing_handler,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
299 bool singular_fallback = true) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
300
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
301 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b) const;
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
302 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
303 octave_idx_type& info) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
304 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
305 octave_idx_type& info, double& rcond) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
306 ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
307 octave_idx_type& info, double& rcond,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
308 solve_singularity_handler sing_handler,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
309 bool singular_fallback = true) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
310
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
311 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b) const;
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
312 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
313 octave_idx_type& info) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
314 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
315 octave_idx_type& info, double& rcond) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
316 SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
317 octave_idx_type& info, double& rcond,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
318 solve_singularity_handler sing_handler,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
319 bool singular_fallback = true) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
320
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
321 SparseComplexMatrix solve (MatrixType &typ,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
322 const SparseComplexMatrix& b) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
323 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
324 octave_idx_type& info) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
325 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
326 octave_idx_type& info, double& rcond) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
327 SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
328 octave_idx_type& info, double& rcond,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
329 solve_singularity_handler sing_handler,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
330 bool singular_fallback = true) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
331
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
332 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b) const;
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
333 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
334 octave_idx_type& info) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
335 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
336 octave_idx_type& info, double& rcond) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
337 ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
338 octave_idx_type& info, double& rcond,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
339 solve_singularity_handler sing_handler) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
340
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
341 ComplexColumnVector solve (MatrixType &typ,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
342 const ComplexColumnVector& b) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
343 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
344 octave_idx_type& info) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
345 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
346 octave_idx_type& info, double& rcond) const;
5785
6b9cec830d72 [project @ 2006-05-03 19:32:46 by dbateman]
dbateman
parents: 5697
diff changeset
347 ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
348 octave_idx_type& info, double& rcond,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
349 solve_singularity_handler sing_handler) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
350
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
351 // Generic interface to solver with probing of type
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
352 ComplexMatrix solve (const Matrix& b) const;
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
353 ComplexMatrix solve (const Matrix& b, octave_idx_type& info) const;
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
354 ComplexMatrix solve (const Matrix& b, octave_idx_type& info,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
355 double& rcond) const;
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
356 ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcond,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
357 solve_singularity_handler sing_handler) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
358
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
359 ComplexMatrix solve (const ComplexMatrix& b) const;
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
360 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const;
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
361 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
362 double& rcond) const;
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
363 ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
364 double& rcond, solve_singularity_handler sing_handler) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
365
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
366 SparseComplexMatrix solve (const SparseMatrix& b) const;
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
367 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info) const;
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
368 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
369 double& rcond) const;
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
370 SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
371 double& rcond,
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
372 solve_singularity_handler sing_handler) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
373
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
374 SparseComplexMatrix solve (const SparseComplexMatrix& b) const;
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
375 SparseComplexMatrix solve (const SparseComplexMatrix& b,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
376 octave_idx_type& info) const;
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
377 SparseComplexMatrix solve (const SparseComplexMatrix& b,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
378 octave_idx_type& info, double& rcond) const;
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
379 SparseComplexMatrix solve (const SparseComplexMatrix& b,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
380 octave_idx_type& info, double& rcond,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
381 solve_singularity_handler sing_handler) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
382
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
383 ComplexColumnVector solve (const ColumnVector& b) const;
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
384 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info) const;
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
385 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
386 double& rcond) const;
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
387 ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
388 double& rcond,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
389 solve_singularity_handler sing_handler) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
390
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
391 ComplexColumnVector solve (const ComplexColumnVector& b) const;
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
392 ComplexColumnVector solve (const ComplexColumnVector& b,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
393 octave_idx_type& info) const;
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
394 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
395 double& rcond) const;
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
396 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
397 double& rcond,
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
398 solve_singularity_handler sing_handler) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
399
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
400 SparseComplexMatrix squeeze (void) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
401
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
402 SparseComplexMatrix index (idx_vector& i, int resize_ok) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
403
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
404 SparseComplexMatrix index (idx_vector& i, idx_vector& j, int resize_ok) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
405
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
406 SparseComplexMatrix index (Array<idx_vector>& ra_idx, int resize_ok) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
407
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
408 SparseComplexMatrix reshape (const dim_vector& new_dims) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
409
5697
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
410 SparseComplexMatrix permute (const Array<octave_idx_type>& vec,
2fe20065a545 [project @ 2006-03-21 16:01:46 by dbateman]
dbateman
parents: 5681
diff changeset
411 bool inv = false) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
412
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
413 SparseComplexMatrix ipermute (const Array<octave_idx_type>& vec) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
414
7922
935be827eaf8 error for NaN values in & and | expressions
John W. Eaton <jwe@octave.org>
parents: 7802
diff changeset
415 bool any_element_is_nan (void) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
416 bool any_element_is_inf_or_nan (void) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
417 bool all_elements_are_real (void) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
418 bool all_integers (double& max_val, double& min_val) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
419 bool too_large_for_float (void) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
420
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
421 SparseBoolMatrix operator ! (void) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
422
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
423 SparseBoolMatrix all (int dim = -1) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
424 SparseBoolMatrix any (int dim = -1) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
425
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
426 SparseComplexMatrix cumprod (int dim = -1) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
427 SparseComplexMatrix cumsum (int dim = -1) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
428 SparseComplexMatrix prod (int dim = -1) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
429 SparseComplexMatrix sum (int dim = -1) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
430 SparseComplexMatrix sumsq (int dim = -1) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
431 SparseMatrix abs (void) const;
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
432
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5164
diff changeset
433 SparseComplexMatrix diag (octave_idx_type k = 0) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
434
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
435 // i/o
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
436 friend OCTAVE_API std::ostream& operator << (std::ostream& os,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
437 const SparseComplexMatrix& a);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
438 friend OCTAVE_API std::istream& operator >> (std::istream& is,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
439 SparseComplexMatrix& a);
7503
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
440
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
441 typedef double (*dmapper) (const Complex&);
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
442 typedef Complex (*cmapper) (const Complex&);
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
443 typedef bool (*bmapper) (const Complex&);
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
444 SparseMatrix map (dmapper fcn) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
445 SparseComplexMatrix map (cmapper fcn) const;
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
446 SparseBoolMatrix map (bmapper fcn) const;
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
447 };
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
448
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
449 extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
450 const SparseComplexMatrix&);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
451 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
452 const SparseMatrix&);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
453 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
454 const SparseComplexMatrix&);
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
455
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
456 extern OCTAVE_API ComplexMatrix operator * (const Matrix&,
5429
2042301733ce [project @ 2005-08-25 12:21:24 by dbateman]
dbateman
parents: 5351
diff changeset
457 const SparseComplexMatrix&);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
458 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&,
5429
2042301733ce [project @ 2005-08-25 12:21:24 by dbateman]
dbateman
parents: 5351
diff changeset
459 const SparseMatrix&);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
460 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&,
5429
2042301733ce [project @ 2005-08-25 12:21:24 by dbateman]
dbateman
parents: 5351
diff changeset
461 const SparseComplexMatrix&);
7802
1a446f28ce68 implement optimized sparse-dense transposed multiplication
Jaroslav Hajek <highegg@gmail.com>
parents: 7503
diff changeset
462 extern OCTAVE_API ComplexMatrix mul_trans (const ComplexMatrix&,
1a446f28ce68 implement optimized sparse-dense transposed multiplication
Jaroslav Hajek <highegg@gmail.com>
parents: 7503
diff changeset
463 const SparseComplexMatrix&);
1a446f28ce68 implement optimized sparse-dense transposed multiplication
Jaroslav Hajek <highegg@gmail.com>
parents: 7503
diff changeset
464 extern OCTAVE_API ComplexMatrix mul_herm (const ComplexMatrix&,
1a446f28ce68 implement optimized sparse-dense transposed multiplication
Jaroslav Hajek <highegg@gmail.com>
parents: 7503
diff changeset
465 const SparseComplexMatrix&);
5429
2042301733ce [project @ 2005-08-25 12:21:24 by dbateman]
dbateman
parents: 5351
diff changeset
466
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
467 extern OCTAVE_API ComplexMatrix operator * (const SparseMatrix&,
5429
2042301733ce [project @ 2005-08-25 12:21:24 by dbateman]
dbateman
parents: 5351
diff changeset
468 const ComplexMatrix&);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
469 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&,
5429
2042301733ce [project @ 2005-08-25 12:21:24 by dbateman]
dbateman
parents: 5351
diff changeset
470 const Matrix&);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
471 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&,
5429
2042301733ce [project @ 2005-08-25 12:21:24 by dbateman]
dbateman
parents: 5351
diff changeset
472 const ComplexMatrix&);
7802
1a446f28ce68 implement optimized sparse-dense transposed multiplication
Jaroslav Hajek <highegg@gmail.com>
parents: 7503
diff changeset
473 extern OCTAVE_API ComplexMatrix trans_mul (const SparseComplexMatrix&,
1a446f28ce68 implement optimized sparse-dense transposed multiplication
Jaroslav Hajek <highegg@gmail.com>
parents: 7503
diff changeset
474 const ComplexMatrix&);
1a446f28ce68 implement optimized sparse-dense transposed multiplication
Jaroslav Hajek <highegg@gmail.com>
parents: 7503
diff changeset
475 extern OCTAVE_API ComplexMatrix herm_mul (const SparseComplexMatrix&,
1a446f28ce68 implement optimized sparse-dense transposed multiplication
Jaroslav Hajek <highegg@gmail.com>
parents: 7503
diff changeset
476 const ComplexMatrix&);
5429
2042301733ce [project @ 2005-08-25 12:21:24 by dbateman]
dbateman
parents: 5351
diff changeset
477
8964
f4f4d65faaa0 Implement sparse * diagonal and diagonal * sparse operations, double-prec only.
Jason Riedy <jason@acm.org>
parents: 8920
diff changeset
478 extern OCTAVE_API SparseComplexMatrix operator * (const DiagMatrix&, const SparseComplexMatrix&);
f4f4d65faaa0 Implement sparse * diagonal and diagonal * sparse operations, double-prec only.
Jason Riedy <jason@acm.org>
parents: 8920
diff changeset
479 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, const DiagMatrix&);
f4f4d65faaa0 Implement sparse * diagonal and diagonal * sparse operations, double-prec only.
Jason Riedy <jason@acm.org>
parents: 8920
diff changeset
480
f4f4d65faaa0 Implement sparse * diagonal and diagonal * sparse operations, double-prec only.
Jason Riedy <jason@acm.org>
parents: 8920
diff changeset
481 extern OCTAVE_API SparseComplexMatrix operator * (const ComplexDiagMatrix&, const SparseMatrix&);
f4f4d65faaa0 Implement sparse * diagonal and diagonal * sparse operations, double-prec only.
Jason Riedy <jason@acm.org>
parents: 8920
diff changeset
482 extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&, const ComplexDiagMatrix&);
f4f4d65faaa0 Implement sparse * diagonal and diagonal * sparse operations, double-prec only.
Jason Riedy <jason@acm.org>
parents: 8920
diff changeset
483
f4f4d65faaa0 Implement sparse * diagonal and diagonal * sparse operations, double-prec only.
Jason Riedy <jason@acm.org>
parents: 8920
diff changeset
484 extern OCTAVE_API SparseComplexMatrix operator * (const ComplexDiagMatrix&, const SparseComplexMatrix&);
f4f4d65faaa0 Implement sparse * diagonal and diagonal * sparse operations, double-prec only.
Jason Riedy <jason@acm.org>
parents: 8920
diff changeset
485 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, const ComplexDiagMatrix&);
f4f4d65faaa0 Implement sparse * diagonal and diagonal * sparse operations, double-prec only.
Jason Riedy <jason@acm.org>
parents: 8920
diff changeset
486
8966
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
487 extern OCTAVE_API SparseComplexMatrix operator + (const ComplexDiagMatrix&, const SparseMatrix&);
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
488 extern OCTAVE_API SparseComplexMatrix operator + (const DiagMatrix&, const SparseComplexMatrix&);
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
489 extern OCTAVE_API SparseComplexMatrix operator + (const ComplexDiagMatrix&, const SparseComplexMatrix&);
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
490 extern OCTAVE_API SparseComplexMatrix operator + (const SparseMatrix&, const ComplexDiagMatrix&);
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
491 extern OCTAVE_API SparseComplexMatrix operator + (const SparseComplexMatrix&, const DiagMatrix&);
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
492 extern OCTAVE_API SparseComplexMatrix operator + (const SparseComplexMatrix&, const ComplexDiagMatrix&);
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
493
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
494 extern OCTAVE_API SparseComplexMatrix operator - (const ComplexDiagMatrix&, const SparseMatrix&);
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
495 extern OCTAVE_API SparseComplexMatrix operator - (const DiagMatrix&, const SparseComplexMatrix&);
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
496 extern OCTAVE_API SparseComplexMatrix operator - (const ComplexDiagMatrix&, const SparseComplexMatrix&);
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
497 extern OCTAVE_API SparseComplexMatrix operator - (const SparseMatrix&, const ComplexDiagMatrix&);
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
498 extern OCTAVE_API SparseComplexMatrix operator - (const SparseComplexMatrix&, const DiagMatrix&);
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
499 extern OCTAVE_API SparseComplexMatrix operator - (const SparseComplexMatrix&, const ComplexDiagMatrix&);
1bba53c0a38d Implement diag + sparse, diag - sparse, sparse + diag, sparse - diag.
Jason Riedy <jason@acm.org>
parents: 8964
diff changeset
500
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
501 extern OCTAVE_API SparseComplexMatrix min (const Complex& c,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
502 const SparseComplexMatrix& m);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
503 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& m,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
504 const Complex& c);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
505 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& a,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
506 const SparseComplexMatrix& b);
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
507
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
508 extern OCTAVE_API SparseComplexMatrix max (const Complex& c,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
509 const SparseComplexMatrix& m);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
510 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& m,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
511 const Complex& c);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5785
diff changeset
512 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& a,
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
513 const SparseComplexMatrix& b);
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
514
6708
0ce71beb1cf3 [project @ 2007-06-13 06:40:48 by jwe]
jwe
parents: 6108
diff changeset
515 SPARSE_SMS_CMP_OP_DECLS (SparseComplexMatrix, Complex, OCTAVE_API)
0ce71beb1cf3 [project @ 2007-06-13 06:40:48 by jwe]
jwe
parents: 6108
diff changeset
516 SPARSE_SMS_BOOL_OP_DECLS (SparseComplexMatrix, Complex, OCTAVE_API)
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
517
6708
0ce71beb1cf3 [project @ 2007-06-13 06:40:48 by jwe]
jwe
parents: 6108
diff changeset
518 SPARSE_SSM_CMP_OP_DECLS (Complex, SparseComplexMatrix, OCTAVE_API)
0ce71beb1cf3 [project @ 2007-06-13 06:40:48 by jwe]
jwe
parents: 6108
diff changeset
519 SPARSE_SSM_BOOL_OP_DECLS (Complex, SparseComplexMatrix, OCTAVE_API)
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
520
6708
0ce71beb1cf3 [project @ 2007-06-13 06:40:48 by jwe]
jwe
parents: 6108
diff changeset
521 SPARSE_SMSM_CMP_OP_DECLS (SparseComplexMatrix, SparseComplexMatrix, OCTAVE_API)
0ce71beb1cf3 [project @ 2007-06-13 06:40:48 by jwe]
jwe
parents: 6108
diff changeset
522 SPARSE_SMSM_BOOL_OP_DECLS (SparseComplexMatrix, SparseComplexMatrix, OCTAVE_API)
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
523
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
524 SPARSE_FORWARD_DEFS (MSparse, SparseComplexMatrix, ComplexMatrix, Complex)
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
525
5351
05adf9de7657 [project @ 2005-05-16 20:07:36 by dbateman]
dbateman
parents: 5322
diff changeset
526 #ifdef IDX_TYPE_LONG
5322
22994a5730f9 [project @ 2005-04-29 13:04:24 by dbateman]
dbateman
parents: 5307
diff changeset
527 #define UMFPACK_ZNAME(name) umfpack_zl_ ## name
22994a5730f9 [project @ 2005-04-29 13:04:24 by dbateman]
dbateman
parents: 5307
diff changeset
528 #else
22994a5730f9 [project @ 2005-04-29 13:04:24 by dbateman]
dbateman
parents: 5307
diff changeset
529 #define UMFPACK_ZNAME(name) umfpack_zi_ ## name
22994a5730f9 [project @ 2005-04-29 13:04:24 by dbateman]
dbateman
parents: 5307
diff changeset
530 #endif
22994a5730f9 [project @ 2005-04-29 13:04:24 by dbateman]
dbateman
parents: 5307
diff changeset
531
5164
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
532 #endif
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
533
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
534 /*
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
535 ;;; Local Variables: ***
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
536 ;;; mode: C++ ***
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
537 ;;; End: ***
57077d0ddc8e [project @ 2005-02-25 19:55:24 by jwe]
jwe
parents:
diff changeset
538 */