Mercurial > octave
changeset 23596:b63c3a09aee7
maint: Deprecate is_symmetric and replace with issymmetric.
* dMatrix.h (is_symmetric): Use OCTAVE_DEPRECATED macro around function.
* dMatrix.h (issymmetric): New function.
* dSparse.h (is_symmetric): Use OCTAVE_DEPRECATED macro around function.
* dSparse.h (issymmetric): New function.
* fMatrix.h (is_symmetric): Use OCTAVE_DEPRECATED macro around function.
* fMatrix.h (issymmetric): New function.
* __eigs__.cc, dMatrix.cc, dSparse.cc, fMatrix.cc, EIG.cc,
fEIG.cc: Replace instances of is_symmetric with issymmetric.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 14 Jun 2017 08:34:43 -0700 |
parents | d70434783da3 |
children | 0f4d3b06464c |
files | libinterp/dldfcn/__eigs__.cc liboctave/array/dMatrix.cc liboctave/array/dMatrix.h liboctave/array/dSparse.cc liboctave/array/dSparse.h liboctave/array/fMatrix.cc liboctave/array/fMatrix.h liboctave/numeric/EIG.cc liboctave/numeric/fEIG.cc |
diffstat | 9 files changed, 24 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/dldfcn/__eigs__.cc Wed Jun 14 08:34:08 2017 -0700 +++ b/libinterp/dldfcn/__eigs__.cc Wed Jun 14 08:34:43 2017 -0700 @@ -365,9 +365,9 @@ if (! sym_tested && ! have_a_fun) { if (a_is_sparse) - symmetric = asmm.is_symmetric (); + symmetric = asmm.issymmetric (); else - symmetric = amm.is_symmetric (); + symmetric = amm.issymmetric (); } if (have_b)
--- a/liboctave/array/dMatrix.cc Wed Jun 14 08:34:08 2017 -0700 +++ b/liboctave/array/dMatrix.cc Wed Jun 14 08:34:43 2017 -0700 @@ -132,7 +132,7 @@ } bool -Matrix::is_symmetric (void) const +Matrix::issymmetric (void) const { if (issquare () && rows () > 0) {
--- a/liboctave/array/dMatrix.h Wed Jun 14 08:34:08 2017 -0700 +++ b/liboctave/array/dMatrix.h Wed Jun 14 08:34:43 2017 -0700 @@ -96,7 +96,11 @@ bool operator == (const Matrix& a) const; bool operator != (const Matrix& a) const; - bool is_symmetric (void) const; + bool issymmetric (void) const; + + OCTAVE_DEPRECATED ("use 'issymmetric' instead") + bool is_symmetric (void) const + { return issymmetric (); } // destructive insert/delete/reorder operations
--- a/liboctave/array/dSparse.cc Wed Jun 14 08:34:08 2017 -0700 +++ b/liboctave/array/dSparse.cc Wed Jun 14 08:34:43 2017 -0700 @@ -127,7 +127,7 @@ } bool -SparseMatrix::is_symmetric (void) const +SparseMatrix::issymmetric (void) const { octave_idx_type nr = rows (); octave_idx_type nc = cols ();
--- a/liboctave/array/dSparse.h Wed Jun 14 08:34:08 2017 -0700 +++ b/liboctave/array/dSparse.h Wed Jun 14 08:34:43 2017 -0700 @@ -100,7 +100,11 @@ bool operator == (const SparseMatrix& a) const; bool operator != (const SparseMatrix& a) const; - bool is_symmetric (void) const; + bool issymmetric (void) const; + + OCTAVE_DEPRECATED ("use 'issymmetric' instead") + bool is_symmetric (void) const + { return issymmetric (); } SparseMatrix max (int dim = -1) const; SparseMatrix max (Array<octave_idx_type>& index, int dim = -1) const;
--- a/liboctave/array/fMatrix.cc Wed Jun 14 08:34:08 2017 -0700 +++ b/liboctave/array/fMatrix.cc Wed Jun 14 08:34:43 2017 -0700 @@ -134,7 +134,7 @@ } bool -FloatMatrix::is_symmetric (void) const +FloatMatrix::issymmetric (void) const { if (issquare () && rows () > 0) {
--- a/liboctave/array/fMatrix.h Wed Jun 14 08:34:08 2017 -0700 +++ b/liboctave/array/fMatrix.h Wed Jun 14 08:34:43 2017 -0700 @@ -96,7 +96,11 @@ bool operator == (const FloatMatrix& a) const; bool operator != (const FloatMatrix& a) const; - bool is_symmetric (void) const; + bool issymmetric (void) const; + + OCTAVE_DEPRECATED ("use 'issymmetric' instead") + bool is_symmetric (void) const + { return issymmetric (); } // destructive insert/delete/reorder operations
--- a/liboctave/numeric/EIG.cc Wed Jun 14 08:34:08 2017 -0700 +++ b/liboctave/numeric/EIG.cc Wed Jun 14 08:34:43 2017 -0700 @@ -39,7 +39,7 @@ (*current_liboctave_error_handler) ("EIG: matrix contains Inf or NaN values"); - if (a.is_symmetric ()) + if (a.issymmetric ()) return symmetric_init (a, calc_rev, calc_lev); F77_INT n = octave::to_f77_int (a.rows ()); @@ -417,7 +417,7 @@ info F77_CHAR_ARG_LEN (1))); - if (a.is_symmetric () && b.is_symmetric () && info == 0) + if (a.issymmetric () && b.issymmetric () && info == 0) return symmetric_init (a, b, calc_rev, calc_lev); }
--- a/liboctave/numeric/fEIG.cc Wed Jun 14 08:34:08 2017 -0700 +++ b/liboctave/numeric/fEIG.cc Wed Jun 14 08:34:43 2017 -0700 @@ -40,7 +40,7 @@ (*current_liboctave_error_handler) ("EIG: matrix contains Inf or NaN values"); - if (a.is_symmetric ()) + if (a.issymmetric ()) return symmetric_init (a, calc_rev, calc_lev); F77_INT n = octave::to_f77_int (a.rows ()); @@ -413,7 +413,7 @@ info F77_CHAR_ARG_LEN (1))); - if (a.is_symmetric () && b.is_symmetric () && info == 0) + if (a.issymmetric () && b.issymmetric () && info == 0) return symmetric_init (a, b, calc_rev, calc_lev); }