Mercurial > octave
diff libinterp/corefcn/sparse-xpow.h @ 29990:b839c36fd106
move sparse xdiv and xpow operator functions inside octave namespace
* sparse-xdiv.h, sparse-xdiv.cc (elem_xdiv): Rename from x_el_div.
(elem_xdiv, xdiv): Move inside octave namespace. Change all uses.
Provide deprecated wrapper functions to preserve old names.
* sparse-xpow.h, sparse-xpow.cc (elem_xpow, xpow): Move inside octave
namespace. Change all uses. Provide deprecated wrapper functions to
preserve old names.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 16 Aug 2021 22:28:30 -0400 |
parents | 0a5b15007766 |
children | 796f54d4ddbf |
line wrap: on
line diff
--- a/libinterp/corefcn/sparse-xpow.h Mon Aug 16 21:38:22 2021 -0400 +++ b/libinterp/corefcn/sparse-xpow.h Mon Aug 16 22:28:30 2021 -0400 @@ -34,6 +34,8 @@ class SparseComplexMatrix; class octave_value; +OCTAVE_NAMESPACE_BEGIN + extern octave_value xpow (const SparseMatrix& a, double b); extern octave_value xpow (const SparseComplexMatrix& a, double b); @@ -58,4 +60,108 @@ extern octave_value elem_xpow (const SparseComplexMatrix& a, const SparseComplexMatrix& b); +OCTAVE_NAMESPACE_END + +#if (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS) + +OCTAVE_DEPRECATED (7, "use 'octave::xpow' instead") +inline octave_value +xpow (const SparseMatrix& a, double b) +{ + return octave::xpow (a, b); +} + +OCTAVE_DEPRECATED (7, "use 'octave::xpow' instead") +inline octave_value +xpow (const SparseComplexMatrix& a, double b) +{ + return octave::xpow (a, b); +} + +OCTAVE_DEPRECATED (7, "use 'octave::elem_xpow' instead") +inline octave_value +elem_xpow (double a, const SparseMatrix& b) +{ + return octave::elem_xpow (a, b); +} + +OCTAVE_DEPRECATED (7, "use 'octave::elem_xpow' instead") +inline octave_value +elem_xpow (double a, const SparseComplexMatrix& b) +{ + return octave::elem_xpow (a, b); +} + +OCTAVE_DEPRECATED (7, "use 'octave::elem_xpow' instead") +inline octave_value +elem_xpow (const SparseMatrix& a, double b) +{ + return octave::elem_xpow (a, b); +} + +OCTAVE_DEPRECATED (7, "use 'octave::elem_xpow' instead") +inline octave_value +elem_xpow (const SparseMatrix& a, const SparseMatrix& b) +{ + return octave::elem_xpow (a, b); +} + +OCTAVE_DEPRECATED (7, "use 'octave::elem_xpow' instead") +inline octave_value +elem_xpow (const SparseMatrix& a, const Complex& b) +{ + return octave::elem_xpow (a, b); +} + +OCTAVE_DEPRECATED (7, "use 'octave::elem_xpow' instead") +inline octave_value +elem_xpow (const SparseMatrix& a, const SparseComplexMatrix& b) +{ + return octave::elem_xpow (a, b); +} + +OCTAVE_DEPRECATED (7, "use 'octave::elem_xpow' instead") +inline octave_value +elem_xpow (const Complex& a, const SparseMatrix& b) +{ + return octave::elem_xpow (a, b); +} + +OCTAVE_DEPRECATED (7, "use 'octave::elem_xpow' instead") +inline octave_value +elem_xpow (const Complex& a, const SparseComplexMatrix& b) +{ + return octave::elem_xpow (a, b); +} + +OCTAVE_DEPRECATED (7, "use 'octave::elem_xpow' instead") +inline octave_value +elem_xpow (const SparseComplexMatrix& a, double b) +{ + return octave::elem_xpow (a, b); +} + +OCTAVE_DEPRECATED (7, "use 'octave::elem_xpow' instead") +inline octave_value +elem_xpow (const SparseComplexMatrix& a, const SparseMatrix& b) +{ + return octave::elem_xpow (a, b); +} + +OCTAVE_DEPRECATED (7, "use 'octave::elem_xpow' instead") +inline octave_value +elem_xpow (const SparseComplexMatrix& a, const Complex& b) +{ + return octave::elem_xpow (a, b); +} + +OCTAVE_DEPRECATED (7, "use 'octave::elem_xpow' instead") +inline octave_value +elem_xpow (const SparseComplexMatrix& a, const SparseComplexMatrix& b) +{ + return octave::elem_xpow (a, b); +} + #endif + +#endif