GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
sparse-xdiv.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 1998-2023 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_sparse_xdiv_h)
27 #define octave_sparse_xdiv_h 1
28 
29 #include "octave-config.h"
30 
31 #include "oct-cmplx.h"
32 #include "MatrixType.h"
33 
34 class DiagMatrix;
35 class ComplexDiagMatrix;
36 class SparseMatrix;
38 
40 
41 extern Matrix xdiv (const Matrix& a, const SparseMatrix& b, MatrixType& typ);
42 extern ComplexMatrix xdiv (const Matrix& a, const SparseComplexMatrix& b,
43  MatrixType& typ);
44 extern ComplexMatrix xdiv (const ComplexMatrix& a, const SparseMatrix& b,
45  MatrixType& typ);
46 extern ComplexMatrix xdiv (const ComplexMatrix& a,
47  const SparseComplexMatrix& b, MatrixType& typ);
48 
49 extern SparseMatrix xdiv (const SparseMatrix& a, const SparseMatrix& b,
50  MatrixType& typ);
51 extern SparseComplexMatrix xdiv (const SparseMatrix& a,
52  const SparseComplexMatrix& b, MatrixType& typ);
54  const SparseMatrix& b, MatrixType& typ);
56  const SparseComplexMatrix& b, MatrixType& typ);
57 
58 extern SparseMatrix xdiv (const SparseMatrix& a,
59  const DiagMatrix& b, MatrixType& typ);
60 extern SparseComplexMatrix xdiv (const SparseMatrix& a,
61  const ComplexDiagMatrix& b, MatrixType& typ);
63  const DiagMatrix& b, MatrixType& typ);
65  const ComplexDiagMatrix& b, MatrixType& typ);
66 
67 extern Matrix elem_xdiv (double a, const SparseMatrix& b);
68 extern ComplexMatrix elem_xdiv (double a, const SparseComplexMatrix& b);
69 extern ComplexMatrix elem_xdiv (const Complex& a, const SparseMatrix& b);
70 extern ComplexMatrix elem_xdiv (const Complex& a,
71  const SparseComplexMatrix& b);
72 
73 extern Matrix xleftdiv (const SparseMatrix& a, const Matrix& b,
74  MatrixType& typ);
75 extern ComplexMatrix xleftdiv (const SparseMatrix& a, const ComplexMatrix& b,
76  MatrixType& typ);
77 extern ComplexMatrix xleftdiv (const SparseComplexMatrix& a, const Matrix& b,
78  MatrixType& typ);
80  const ComplexMatrix& b, MatrixType& typ);
81 
82 extern SparseMatrix xleftdiv (const SparseMatrix& a, const SparseMatrix& b,
83  MatrixType& typ);
85  const SparseComplexMatrix& b,
86  MatrixType& typ);
88  const SparseMatrix& b, MatrixType& typ);
90  const SparseComplexMatrix& b,
91  MatrixType& typ);
92 
93 extern SparseMatrix xleftdiv (const DiagMatrix&, const SparseMatrix&,
94  MatrixType&);
96  const SparseMatrix&,
97  MatrixType&);
99  const SparseComplexMatrix&,
100  MatrixType&);
102  const SparseComplexMatrix&,
103  MatrixType&);
104 
106 
107 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
108 
109 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
110 inline Matrix
111 xdiv (const Matrix& a, const SparseMatrix& b, MatrixType& typ)
112 {
113  return octave::xdiv (a, b, typ);
114 }
115 
116 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
117 inline ComplexMatrix
118 xdiv (const Matrix& a, const SparseComplexMatrix& b, MatrixType& typ)
119 {
120  return octave::xdiv (a, b, typ);
121 }
122 
123 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
124 inline ComplexMatrix
125 xdiv (const ComplexMatrix& a, const SparseMatrix& b, MatrixType& typ)
126 {
127  return octave::xdiv (a, b, typ);
128 }
129 
130 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
131 inline ComplexMatrix
132 xdiv (const ComplexMatrix& a, const SparseComplexMatrix& b, MatrixType& typ)
133 {
134  return octave::xdiv (a, b, typ);
135 }
136 
137 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
138 inline SparseMatrix
139 xdiv (const SparseMatrix& a, const SparseMatrix& b, MatrixType& typ)
140 {
141  return octave::xdiv (a, b, typ);
142 }
143 
144 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
145 inline SparseComplexMatrix
146 xdiv (const SparseMatrix& a, const SparseComplexMatrix& b, MatrixType& typ)
147 {
148  return octave::xdiv (a, b, typ);
149 }
150 
151 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
152 inline SparseComplexMatrix
153 xdiv (const SparseComplexMatrix& a, const SparseMatrix& b, MatrixType& typ)
154 {
155  return octave::xdiv (a, b, typ);
156 }
157 
158 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
159 inline SparseComplexMatrix
160 xdiv (const SparseComplexMatrix& a, const SparseComplexMatrix& b,
161  MatrixType& typ)
162 {
163  return octave::xdiv (a, b, typ);
164 }
165 
166 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
167 inline SparseMatrix
168 xdiv (const SparseMatrix& a, const DiagMatrix& b, MatrixType& typ)
169 {
170  return octave::xdiv (a, b, typ);
171 }
172 
173 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
174 inline SparseComplexMatrix
175 xdiv (const SparseMatrix& a, const ComplexDiagMatrix& b, MatrixType& typ)
176 {
177  return octave::xdiv (a, b, typ);
178 }
179 
180 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
181 inline SparseComplexMatrix
182 xdiv (const SparseComplexMatrix& a, const DiagMatrix& b, MatrixType& typ)
183 {
184  return octave::xdiv (a, b, typ);
185 }
186 
187 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
188 inline SparseComplexMatrix
189 xdiv (const SparseComplexMatrix& a, const ComplexDiagMatrix& b, MatrixType& typ)
190 {
191  return octave::xdiv (a, b, typ);
192 }
193 
194 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
195 inline Matrix
196 x_el_div (double a, const SparseMatrix& b)
197 {
198  return octave::elem_xdiv (a, b);
199 }
200 
201 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
202 inline ComplexMatrix
203 x_el_div (double a, const SparseComplexMatrix& b)
204 {
205  return octave::elem_xdiv (a, b);
206 }
207 
208 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
209 inline ComplexMatrix
210 x_el_div (const Complex& a, const SparseMatrix& b)
211 {
212  return octave::elem_xdiv (a, b);
213 }
214 
215 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
216 inline ComplexMatrix
217 x_el_div (const Complex& a, const SparseComplexMatrix& b)
218 {
219  return octave::elem_xdiv (a, b);
220 }
221 
222 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
223 inline Matrix
224 xleftdiv (const SparseMatrix& a, const Matrix& b, MatrixType& typ)
225 {
226  return octave::xleftdiv (a, b, typ);
227 }
228 
229 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
230 inline ComplexMatrix
231 xleftdiv (const SparseMatrix& a, const ComplexMatrix& b, MatrixType& typ)
232 {
233  return octave::xleftdiv (a, b, typ);
234 }
235 
236 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
237 inline ComplexMatrix
238 xleftdiv (const SparseComplexMatrix& a, const Matrix& b, MatrixType& typ)
239 {
240  return octave::xleftdiv (a, b, typ);
241 }
242 
243 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
244 inline ComplexMatrix
245 xleftdiv (const SparseComplexMatrix& a, const ComplexMatrix& b, MatrixType& typ)
246 {
247  return octave::xleftdiv (a, b, typ);
248 }
249 
250 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
251 inline SparseMatrix
252 xleftdiv (const SparseMatrix& a, const SparseMatrix& b, MatrixType& typ)
253 {
254  return octave::xleftdiv (a, b, typ);
255 }
256 
257 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
258 inline SparseComplexMatrix
259 xleftdiv (const SparseMatrix& a, const SparseComplexMatrix& b, MatrixType& typ)
260 {
261  return octave::xleftdiv (a, b, typ);
262 }
263 
264 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
265 inline SparseComplexMatrix
266 xleftdiv (const SparseComplexMatrix& a, const SparseMatrix& b, MatrixType& typ)
267 {
268  return octave::xleftdiv (a, b, typ);
269 }
270 
271 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
272 inline SparseComplexMatrix
274  MatrixType& typ)
275 {
276  return octave::xleftdiv (a, b, typ);
277 }
278 
279 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
280 inline SparseMatrix
281 xleftdiv (const DiagMatrix& a, const SparseMatrix& b, MatrixType& typ)
282 {
283  return octave::xleftdiv (a, b, typ);
284 }
285 
286 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
287 inline SparseComplexMatrix
288 xleftdiv (const ComplexDiagMatrix& a, const SparseMatrix& b, MatrixType& typ)
289 {
290  return octave::xleftdiv (a, b, typ);
291 }
292 
293 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
294 inline SparseComplexMatrix
295 xleftdiv (const DiagMatrix& a, const SparseComplexMatrix& b, MatrixType& typ)
296 {
297  return octave::xleftdiv (a, b, typ);
298 }
299 
300 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
301 inline SparseComplexMatrix
303  MatrixType& typ)
304 {
305  return octave::xleftdiv (a, b, typ);
306 }
307 
308 #endif
309 
310 #endif
OCTAVE_END_NAMESPACE(octave)
Definition: dMatrix.h:42
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
std::complex< double > Complex
Definition: oct-cmplx.h:33
Matrix elem_xdiv(double a, const SparseMatrix &b)
Definition: sparse-xdiv.cc:375
Matrix xdiv(const Matrix &a, const SparseMatrix &b, MatrixType &typ)
Definition: sparse-xdiv.cc:137
Matrix xleftdiv(const SparseMatrix &a, const Matrix &b, MatrixType &typ)
Definition: sparse-xdiv.cc:468