GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
xdiv.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 1993-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_xdiv_h)
27 #define octave_xdiv_h 1
28 
29 #include "octave-config.h"
30 
31 #include "mx-defs.h"
32 #include "MatrixType.h"
33 
35 
36 extern Matrix xdiv (const Matrix& a, const Matrix& b, MatrixType& typ);
37 extern ComplexMatrix xdiv (const Matrix& a, const ComplexMatrix& b,
38  MatrixType& typ);
39 extern ComplexMatrix xdiv (const ComplexMatrix& a, const Matrix& b,
40  MatrixType& typ);
41 extern ComplexMatrix xdiv (const ComplexMatrix& a, const ComplexMatrix& b,
42  MatrixType& typ);
43 
44 extern Matrix elem_xdiv (double a, const Matrix& b);
45 extern ComplexMatrix elem_xdiv (double a, const ComplexMatrix& b);
46 extern ComplexMatrix elem_xdiv (const Complex a, const Matrix& b);
47 extern ComplexMatrix elem_xdiv (const Complex a, const ComplexMatrix& b);
48 
49 extern NDArray elem_xdiv (double a, const NDArray& b);
50 extern ComplexNDArray elem_xdiv (double a, const ComplexNDArray& b);
51 extern ComplexNDArray elem_xdiv (const Complex a, const NDArray& b);
52 extern ComplexNDArray elem_xdiv (const Complex a, const ComplexNDArray& b);
53 
54 extern Matrix xleftdiv (const Matrix& a, const Matrix& b, MatrixType& typ,
56 extern ComplexMatrix xleftdiv (const Matrix& a, const ComplexMatrix& b,
57  MatrixType& typ,
59 extern ComplexMatrix xleftdiv (const ComplexMatrix& a, const Matrix& b,
60  MatrixType& typ,
62 extern ComplexMatrix xleftdiv (const ComplexMatrix& a, const ComplexMatrix& b,
63  MatrixType& typ,
65 
66 extern FloatMatrix xdiv (const FloatMatrix& a, const FloatMatrix& b,
67  MatrixType& typ);
68 extern FloatComplexMatrix xdiv (const FloatMatrix& a,
69  const FloatComplexMatrix& b,
70  MatrixType& typ);
72  const FloatMatrix& b,
73  MatrixType& typ);
75  const FloatComplexMatrix& b,
76  MatrixType& typ);
77 
78 extern FloatMatrix elem_xdiv (float a, const FloatMatrix& b);
79 extern FloatComplexMatrix elem_xdiv (float a, const FloatComplexMatrix& b);
81  const FloatMatrix& b);
83  const FloatComplexMatrix& b);
84 
85 extern FloatNDArray elem_xdiv (float a, const FloatNDArray& b);
86 extern FloatComplexNDArray elem_xdiv (float a, const FloatComplexNDArray& b);
88  const FloatNDArray& b);
90  const FloatComplexNDArray& b);
91 
92 extern FloatMatrix xleftdiv (const FloatMatrix& a, const FloatMatrix& b,
93  MatrixType& typ,
95 extern FloatComplexMatrix xleftdiv (const FloatMatrix& a,
96  const FloatComplexMatrix& b,
97  MatrixType& typ,
100  const FloatMatrix& b,
101  MatrixType& typ,
102  blas_trans_type transt = blas_no_trans);
104  const FloatComplexMatrix& b,
105  MatrixType& typ,
106  blas_trans_type transt = blas_no_trans);
107 
108 extern Matrix xdiv (const Matrix& a, const DiagMatrix& b);
109 extern ComplexMatrix xdiv (const ComplexMatrix& a, const DiagMatrix& b);
110 extern ComplexMatrix xdiv (const ComplexMatrix& a, const ComplexDiagMatrix& b);
111 
112 extern DiagMatrix xdiv (const DiagMatrix& a, const DiagMatrix& b);
113 extern ComplexDiagMatrix xdiv (const ComplexDiagMatrix& a, const DiagMatrix& b);
114 extern ComplexDiagMatrix xdiv (const ComplexDiagMatrix& a,
115  const ComplexDiagMatrix& b);
116 
117 extern FloatMatrix xdiv (const FloatMatrix& a, const FloatDiagMatrix& b);
119  const FloatDiagMatrix& b);
121  const FloatComplexDiagMatrix& b);
123  const FloatComplexDiagMatrix& b);
124 
125 extern FloatDiagMatrix xdiv (const FloatDiagMatrix& a,
126  const FloatDiagMatrix& b);
128  const FloatDiagMatrix& b);
130  const FloatComplexDiagMatrix& b);
131 
132 extern Matrix xleftdiv (const DiagMatrix& a, const Matrix& b);
133 extern ComplexMatrix xleftdiv (const DiagMatrix& a, const ComplexMatrix& b);
134 extern ComplexMatrix xleftdiv (const ComplexDiagMatrix& a,
135  const ComplexMatrix& b);
136 
137 extern DiagMatrix xleftdiv (const DiagMatrix& a, const DiagMatrix& b);
138 extern ComplexDiagMatrix xleftdiv (const DiagMatrix& a,
139  const ComplexDiagMatrix& b);
141  const ComplexDiagMatrix& b);
142 
143 extern FloatMatrix xleftdiv (const FloatDiagMatrix& a,
144  const FloatMatrix& b);
146  const FloatComplexMatrix& b);
148  const FloatComplexMatrix& b);
149 
150 extern FloatDiagMatrix xleftdiv (const FloatDiagMatrix& a,
151  const FloatDiagMatrix& b);
153  const FloatComplexDiagMatrix& b);
155  const FloatComplexDiagMatrix& b);
156 
158 
159 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
160 
161 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
162 inline Matrix
163 xdiv (const Matrix& a, const Matrix& b, MatrixType& typ)
164 {
165  return octave::xdiv (a, b, typ);
166 }
167 
168 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
169 inline ComplexMatrix
170 xdiv (const Matrix& a, const ComplexMatrix& b, MatrixType& typ)
171 {
172  return octave::xdiv (a, b, typ);
173 }
174 
175 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
176 inline ComplexMatrix
177 xdiv (const ComplexMatrix& a, const Matrix& b, MatrixType& typ)
178 {
179  return octave::xdiv (a, b, typ);
180 }
181 
182 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
183 inline ComplexMatrix
184 xdiv (const ComplexMatrix& a, const ComplexMatrix& b, MatrixType& typ)
185 {
186  return octave::xdiv (a, b, typ);
187 }
188 
189 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
190 inline Matrix
191 x_el_div (double a, const Matrix& b)
192 {
193  return octave::elem_xdiv (a, b);
194 }
195 
196 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
197 inline ComplexMatrix
198 x_el_div (double a, const ComplexMatrix& b)
199 {
200  return octave::elem_xdiv (a, b);
201 }
202 
203 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
204 inline ComplexMatrix
205 x_el_div (const Complex a, const Matrix& b)
206 {
207  return octave::elem_xdiv (a, b);
208 }
209 
210 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
211 inline ComplexMatrix
212 x_el_div (const Complex a, const ComplexMatrix& b)
213 {
214  return octave::elem_xdiv (a, b);
215 }
216 
217 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
218 inline NDArray
219 x_el_div (double a, const NDArray& b)
220 {
221  return octave::elem_xdiv (a, b);
222 }
223 
224 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
225 inline ComplexNDArray
226 x_el_div (double a, const ComplexNDArray& b)
227 {
228  return octave::elem_xdiv (a, b);
229 }
230 
231 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
232 inline ComplexNDArray
233 x_el_div (const Complex a, const NDArray& b)
234 {
235  return octave::elem_xdiv (a, b);
236 }
237 
238 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
239 inline ComplexNDArray
240 x_el_div (const Complex a, const ComplexNDArray& b)
241 {
242  return octave::elem_xdiv (a, b);
243 }
244 
245 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
246 inline Matrix
247 xleftdiv (const Matrix& a, const Matrix& b,
249 {
250  return octave::xleftdiv (a, b, typ, transt);
251 }
252 
253 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
254 inline ComplexMatrix
255 xleftdiv (const Matrix& a, const ComplexMatrix& b,
257 {
258  return octave::xleftdiv (a, b, typ, transt);
259 }
260 
261 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
262 inline ComplexMatrix
263 xleftdiv (const ComplexMatrix& a, const Matrix& b,
265 {
266  return octave::xleftdiv (a, b, typ, transt);
267 }
268 
269 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
270 inline ComplexMatrix
271 xleftdiv (const ComplexMatrix& a, const ComplexMatrix& b,
273 {
274  return octave::xleftdiv (a, b, typ, transt);
275 }
276 
277 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
278 inline FloatMatrix
279 xdiv (const FloatMatrix& a, const FloatMatrix& b, MatrixType& typ)
280 {
281  return octave::xdiv (a, b, typ);
282 }
283 
284 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
285 inline FloatComplexMatrix
286 xdiv (const FloatMatrix& a, const FloatComplexMatrix& b, MatrixType& typ)
287 {
288  return octave::xdiv (a, b, typ);
289 }
290 
291 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
292 inline FloatComplexMatrix
293 xdiv (const FloatComplexMatrix& a, const FloatMatrix& b, MatrixType& typ)
294 {
295  return octave::xdiv (a, b, typ);
296 }
297 
298 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
299 inline FloatComplexMatrix
300 xdiv (const FloatComplexMatrix& a, const FloatComplexMatrix& b, MatrixType& typ)
301 {
302  return octave::xdiv (a, b, typ);
303 }
304 
305 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
306 inline FloatMatrix
307 x_el_div (float a, const FloatMatrix& b)
308 {
309  return octave::elem_xdiv (a, b);
310 }
311 
312 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
313 inline FloatComplexMatrix
314 x_el_div (float a, const FloatComplexMatrix& b)
315 {
316  return octave::elem_xdiv (a, b);
317 }
318 
319 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
320 inline FloatComplexMatrix
321 x_el_div (const FloatComplex a, const FloatMatrix& b)
322 {
323  return octave::elem_xdiv (a, b);
324 }
325 
326 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
327 inline FloatComplexMatrix
328 x_el_div (const FloatComplex a, const FloatComplexMatrix& b)
329 {
330  return octave::elem_xdiv (a, b);
331 }
332 
333 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
334 inline FloatNDArray
335 x_el_div (float a, const FloatNDArray& b)
336 {
337  return octave::elem_xdiv (a, b);
338 }
339 
340 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
341 inline FloatComplexNDArray
342 x_el_div (float a, const FloatComplexNDArray& b)
343 {
344  return octave::elem_xdiv (a, b);
345 }
346 
347 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
348 inline FloatComplexNDArray
349 x_el_div (const FloatComplex a, const FloatNDArray& b)
350 {
351  return octave::elem_xdiv (a, b);
352 }
353 
354 OCTAVE_DEPRECATED (7, "use 'octave::elem_xdiv' instead")
355 inline FloatComplexNDArray
356 x_el_div (const FloatComplex a, const FloatComplexNDArray& b)
357 {
358  return octave::elem_xdiv (a, b);
359 }
360 
361 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
362 inline FloatMatrix
363 xleftdiv (const FloatMatrix& a, const FloatMatrix& b,
365 {
366  return octave::xleftdiv (a, b, typ, transt);
367 }
368 
369 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
370 inline FloatComplexMatrix
371 xleftdiv (const FloatMatrix& a, const FloatComplexMatrix& b,
373 {
374  return octave::xleftdiv (a, b, typ, transt);
375 }
376 
377 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
378 inline FloatComplexMatrix
379 xleftdiv (const FloatComplexMatrix& a, const FloatMatrix& b,
381 {
382  return octave::xleftdiv (a, b, typ, transt);
383 }
384 
385 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
386 inline FloatComplexMatrix
389 {
390  return octave::xleftdiv (a, b, typ, transt);
391 }
392 
393 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
394 inline Matrix
395 xdiv (const Matrix& a, const DiagMatrix& b)
396 {
397  return octave::xdiv (a, b);
398 }
399 
400 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
401 inline ComplexMatrix
402 xdiv (const ComplexMatrix& a, const DiagMatrix& b)
403 {
404  return octave::xdiv (a, b);
405 }
406 
407 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
408 inline ComplexMatrix
409 xdiv (const ComplexMatrix& a, const ComplexDiagMatrix& b)
410 {
411  return octave::xdiv (a, b);
412 }
413 
414 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
415 inline DiagMatrix
416 xdiv (const DiagMatrix& a, const DiagMatrix& b)
417 {
418  return octave::xdiv (a, b);
419 }
420 
421 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
422 inline ComplexDiagMatrix
423 xdiv (const ComplexDiagMatrix& a, const DiagMatrix& b)
424 {
425  return octave::xdiv (a, b);
426 }
427 
428 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
429 inline ComplexDiagMatrix
430 xdiv (const ComplexDiagMatrix& a, const ComplexDiagMatrix& b)
431 {
432  return octave::xdiv (a, b);
433 }
434 
435 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
436 inline FloatMatrix
437 xdiv (const FloatMatrix& a, const FloatDiagMatrix& b)
438 {
439  return octave::xdiv (a, b);
440 }
441 
442 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
443 inline FloatComplexMatrix
444 xdiv (const FloatComplexMatrix& a, const FloatDiagMatrix& b)
445 {
446  return octave::xdiv (a, b);
447 }
448 
449 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
450 inline FloatComplexMatrix
451 xdiv (const FloatMatrix& a, const FloatComplexDiagMatrix& b)
452 {
453  return octave::xdiv (a, b);
454 }
455 
456 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
457 inline FloatComplexMatrix
459 {
460  return octave::xdiv (a, b);
461 }
462 
463 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
464 inline FloatDiagMatrix
465 xdiv (const FloatDiagMatrix& a, const FloatDiagMatrix& b)
466 {
467  return octave::xdiv (a, b);
468 }
469 
470 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
472 xdiv (const FloatComplexDiagMatrix& a, const FloatDiagMatrix& b)
473 {
474  return octave::xdiv (a, b);
475 }
476 
477 OCTAVE_DEPRECATED (7, "use 'octave::xdiv' instead")
480 {
481  return octave::xdiv (a, b);
482 }
483 
484 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
485 inline Matrix
486 xleftdiv (const DiagMatrix& a, const Matrix& b)
487 {
488  return octave::xleftdiv (a, b);
489 }
490 
491 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
492 inline ComplexMatrix
493 xleftdiv (const DiagMatrix& a, const ComplexMatrix& b)
494 {
495  return octave::xleftdiv (a, b);
496 }
497 
498 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
499 inline ComplexMatrix
500 xleftdiv (const ComplexDiagMatrix& a, const ComplexMatrix& b)
501 {
502  return octave::xleftdiv (a, b);
503 }
504 
505 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
506 inline DiagMatrix
507 xleftdiv (const DiagMatrix& a, const DiagMatrix& b)
508 {
509  return octave::xleftdiv (a, b);
510 }
511 
512 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
513 inline ComplexDiagMatrix
514 xleftdiv (const DiagMatrix& a, const ComplexDiagMatrix& b)
515 {
516  return octave::xleftdiv (a, b);
517 }
518 
519 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
520 inline ComplexDiagMatrix
521 xleftdiv (const ComplexDiagMatrix& a, const ComplexDiagMatrix& b)
522 {
523  return octave::xleftdiv (a, b);
524 }
525 
526 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
527 inline FloatMatrix
528 xleftdiv (const FloatDiagMatrix& a, const FloatMatrix& b)
529 {
530  return octave::xleftdiv (a, b);
531 }
532 
533 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
534 inline FloatComplexMatrix
535 xleftdiv (const FloatDiagMatrix& a, const FloatComplexMatrix& b)
536 {
537  return octave::xleftdiv (a, b);
538 }
539 
540 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
541 inline FloatComplexMatrix
543 {
544  return octave::xleftdiv (a, b);
545 }
546 
547 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
548 inline FloatDiagMatrix
549 xleftdiv (const FloatDiagMatrix& a, const FloatDiagMatrix& b)
550 {
551  return octave::xleftdiv (a, b);
552 }
553 
554 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
557 {
558  return octave::xleftdiv (a, b);
559 }
560 
561 OCTAVE_DEPRECATED (7, "use 'octave::xleftdiv' instead")
564 {
565  return octave::xleftdiv (a, b);
566 }
567 
568 #endif
569 
570 #endif
OCTAVE_END_NAMESPACE(octave)
Definition: dMatrix.h:42
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
blas_trans_type
Definition: mx-defs.h:80
@ blas_no_trans
Definition: mx-defs.h:81
std::complex< double > Complex
Definition: oct-cmplx.h:33
std::complex< float > FloatComplex
Definition: oct-cmplx.h:34
Matrix elem_xdiv(double a, const Matrix &b)
Definition: xdiv.cc:200
Matrix xleftdiv(const Matrix &a, const Matrix &b, MatrixType &typ, blas_trans_type transt=blas_no_trans)
Definition: xdiv.cc:347
Matrix xdiv(const Matrix &a, const Matrix &b, MatrixType &typ)
Definition: xdiv.cc:124