Mercurial > octave
changeset 23614:7a97944f06e5
delete functions deprecated prior to the 4.2 release
* variables.h, variables.cc (bind_internal_variable): Delete.
* ov.h, ov.cc
(octave_value::octave_value (const Array<char>&, char)): Delete.
(octave_value::octave_value (const charMatrix&, bool, char)): Delete.
(octave_value::octave_value (const charNDArray&, bool, char)): Delete.
(octave_value::octave_value (octave_base_value *, int)): Delete.
* DiagArray2.h, DiagArray2.cc
(DiagArray2<T>::diag (octave_idx_type) const): Delete.
* PermMatrix.h, PermMatrix.cc
(PermMatrix::PermMatrix (const Array<octave_idx_type>&)): Delete.
(PermMatrix::PermMatrix (const idx_vector&)): Delete.
* dSparse.h, dSparse.cc
(atan2 (const double&, const SparseMatrix&)): Delete.
(atan2 (const SparseMatrix&, const double&)): Delete.
(atan2 (const SparseMatrix&, const SparseMatrix&)): Delete.
* lo-mappers.h (octave_is_NaN_or_NA (const Complex&)): Delete.
(octave_is_NaN_or_NA (const FloatComplex&)): Delete.
* unwind-prot.h
(unwind_protect::add (void (*) (void *), void *)): Delete.
(unwind_protect::run_top (void)): Delete.
(unwind_protect::run_top (int)): Delete.
(unwind_protect::discard_top (void)): Delete.
(unwind_protect::discard_top (int)): Delete.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 16 Jun 2017 09:39:20 -0400 |
parents | 702db65be195 |
children | be7b884ac589 |
files | libinterp/corefcn/variables.cc libinterp/corefcn/variables.h libinterp/octave-value/ov.cc libinterp/octave-value/ov.h liboctave/array/DiagArray2.cc liboctave/array/DiagArray2.h liboctave/array/PermMatrix.cc liboctave/array/PermMatrix.h liboctave/array/dSparse.cc liboctave/array/dSparse.h liboctave/numeric/lo-mappers.h liboctave/util/unwind-prot.h |
diffstat | 12 files changed, 1 insertions(+), 260 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/variables.cc Thu Jun 15 19:38:45 2017 -0400 +++ b/libinterp/corefcn/variables.cc Fri Jun 16 09:39:20 2017 -0400 @@ -2017,16 +2017,6 @@ } void -bind_internal_variable (const std::string& fname, const octave_value& val) -{ - octave_value_list args; - - args(0) = val; - - octave::feval (fname, args, 0); -} - -void mlock (void) { octave::call_stack& cs = octave::__get_call_stack__ ("mlock");
--- a/libinterp/corefcn/variables.h Thu Jun 15 19:38:45 2017 -0400 +++ b/libinterp/corefcn/variables.h Fri Jun 16 09:39:20 2017 -0400 @@ -142,10 +142,6 @@ extern OCTINTERP_API void bind_ans (const octave_value& val, bool print); -OCTAVE_DEPRECATED ("note: internal variables have been replaced by functions; use 'feval' instead") -OCTINTERP_API extern void -bind_internal_variable (const std::string& fname, const octave_value& val); - extern OCTINTERP_API void mlock (void); extern OCTINTERP_API void munlock (const std::string&); extern OCTINTERP_API bool mislocked (const std::string&);
--- a/libinterp/octave-value/ov.cc Thu Jun 15 19:38:45 2017 -0400 +++ b/libinterp/octave-value/ov.cc Fri Jun 16 09:39:20 2017 -0400 @@ -814,30 +814,6 @@ maybe_mutate (); } -octave_value::octave_value (const charMatrix& chm, bool, char type) - : rep (type == '"' - ? new octave_char_matrix_dq_str (chm) - : new octave_char_matrix_sq_str (chm)) -{ - maybe_mutate (); -} - -octave_value::octave_value (const charNDArray& chm, bool, char type) - : rep (type == '"' - ? new octave_char_matrix_dq_str (chm) - : new octave_char_matrix_sq_str (chm)) -{ - maybe_mutate (); -} - -octave_value::octave_value (const Array<char>& chm, bool, char type) - : rep (type == '"' - ? new octave_char_matrix_dq_str (chm) - : new octave_char_matrix_sq_str (chm)) -{ - maybe_mutate (); -} - octave_value::octave_value (const SparseMatrix& m, const MatrixType& t) : rep (new octave_sparse_matrix (m, t)) { @@ -1144,12 +1120,6 @@ rep->count++; } -octave_value::octave_value (octave_base_value *new_rep, int xcount) - : rep (new_rep) -{ - rep->count = xcount; -} - octave_base_value * octave_value::clone (void) const {
--- a/libinterp/octave-value/ov.h Thu Jun 15 19:38:45 2017 -0400 +++ b/libinterp/octave-value/ov.h Fri Jun 16 09:39:20 2017 -0400 @@ -239,15 +239,6 @@ octave_value (const charNDArray& chnda, char type = '\''); octave_value (const Array<char>& chnda, char type = '\''); - OCTAVE_DEPRECATED ("note: IS_STRING argument is ignored") - octave_value (const charMatrix& chm, bool is_string, char type = '\''); - - OCTAVE_DEPRECATED ("note: IS_STRING argument is ignored") - octave_value (const charNDArray& chnda, bool is_string, char type = '\''); - - OCTAVE_DEPRECATED ("note: IS_STRING argument is ignored") - octave_value (const Array<char>& chnda, bool is_string, char type = '\''); - octave_value (const SparseMatrix& m, const MatrixType& t = MatrixType ()); octave_value (const Sparse<double>& m, const MatrixType& t = MatrixType ()); octave_value (const SparseComplexMatrix& m, @@ -302,9 +293,6 @@ octave_value (octave_base_value *new_rep, bool borrow = false); - OCTAVE_DEPRECATED ("note: in the future there will be no way to directly set reference count") - octave_value (octave_base_value *new_rep, int xcount); - // Copy constructor. octave_value (const octave_value& a)
--- a/liboctave/array/DiagArray2.cc Thu Jun 15 19:38:45 2017 -0400 +++ b/liboctave/array/DiagArray2.cc Fri Jun 16 09:39:20 2017 -0400 @@ -47,13 +47,6 @@ template <typename T> Array<T> -DiagArray2<T>::diag (octave_idx_type k) const -{ - return extract_diag (k); -} - -template <typename T> -Array<T> DiagArray2<T>::extract_diag (octave_idx_type k) const { Array<T> d;
--- a/liboctave/array/DiagArray2.h Thu Jun 15 19:38:45 2017 -0400 +++ b/liboctave/array/DiagArray2.h Fri Jun 16 09:39:20 2017 -0400 @@ -98,10 +98,8 @@ dim_vector dims (void) const { return dim_vector (d1, d2); } - OCTAVE_DEPRECATED ("use 'extract_diag' instead") - Array<T> diag (octave_idx_type k = 0) const; + Array<T> extract_diag (octave_idx_type k = 0) const; - Array<T> extract_diag (octave_idx_type k = 0) const; DiagArray2<T> build_diag_matrix () const { return DiagArray2<T> (array_value ());
--- a/liboctave/array/PermMatrix.cc Thu Jun 15 19:38:45 2017 -0400 +++ b/liboctave/array/PermMatrix.cc Fri Jun 16 09:39:20 2017 -0400 @@ -49,12 +49,6 @@ *this = this->transpose (); } -PermMatrix::PermMatrix (const Array<octave_idx_type>& p) - : Array<octave_idx_type> (p) -{ - setup (p, false, true); -} - PermMatrix::PermMatrix (const Array<octave_idx_type>& p, bool colp, bool check) : Array<octave_idx_type> (p) { @@ -77,12 +71,6 @@ *this = this->transpose (); } -PermMatrix::PermMatrix (const idx_vector& idx) - : Array<octave_idx_type> () -{ - setup (idx, false, 0); -} - PermMatrix::PermMatrix (const idx_vector& idx, bool colp, octave_idx_type n) : Array<octave_idx_type> () {
--- a/liboctave/array/PermMatrix.h Thu Jun 15 19:38:45 2017 -0400 +++ b/liboctave/array/PermMatrix.h Fri Jun 16 09:39:20 2017 -0400 @@ -39,16 +39,10 @@ PermMatrix (octave_idx_type n); - OCTAVE_DEPRECATED ("use 'PermMatrix (p, false, true)' instead") - PermMatrix (const Array<octave_idx_type>& p); - PermMatrix (const Array<octave_idx_type>& p, bool colp, bool check = true); PermMatrix (const PermMatrix& m) : Array<octave_idx_type> (m) { } - OCTAVE_DEPRECATED ("use 'PermVector (idx, false, 0)' instead") - PermMatrix (const idx_vector& idx); - PermMatrix (const idx_vector& idx, bool colp, octave_idx_type n = 0); octave_idx_type dim1 (void) const
--- a/liboctave/array/dSparse.cc Thu Jun 15 19:38:45 2017 -0400 +++ b/liboctave/array/dSparse.cc Fri Jun 16 09:39:20 2017 -0400 @@ -599,141 +599,6 @@ */ SparseMatrix -atan2 (const double& x, const SparseMatrix& y) -{ - octave_idx_type nr = y.rows (); - octave_idx_type nc = y.cols (); - - if (x == 0.) - return SparseMatrix (nr, nc); - else - { - // Its going to be basically full, so this is probably the - // best way to handle it. - Matrix tmp (nr, nc, atan2 (x, 0.)); - - for (octave_idx_type j = 0; j < nc; j++) - for (octave_idx_type i = y.cidx (j); i < y.cidx (j+1); i++) - tmp.elem (y.ridx (i), j) = atan2 (x, y.data (i)); - - return SparseMatrix (tmp); - } -} - -SparseMatrix -atan2 (const SparseMatrix& x, const double& y) -{ - octave_idx_type nr = x.rows (); - octave_idx_type nc = x.cols (); - octave_idx_type nz = x.nnz (); - - SparseMatrix retval (nr, nc, nz); - - octave_idx_type ii = 0; - retval.xcidx (0) = 0; - for (octave_idx_type i = 0; i < nc; i++) - { - for (octave_idx_type j = x.cidx (i); j < x.cidx (i+1); j++) - { - double tmp = atan2 (x.data (j), y); - if (tmp != 0.) - { - retval.xdata (ii) = tmp; - retval.xridx (ii++) = x.ridx (j); - } - } - retval.xcidx (i+1) = ii; - } - - if (ii != nz) - { - SparseMatrix retval2 (nr, nc, ii); - for (octave_idx_type i = 0; i < nc+1; i++) - retval2.xcidx (i) = retval.cidx (i); - for (octave_idx_type i = 0; i < ii; i++) - { - retval2.xdata (i) = retval.data (i); - retval2.xridx (i) = retval.ridx (i); - } - return retval2; - } - else - return retval; -} - -SparseMatrix -atan2 (const SparseMatrix& x, const SparseMatrix& y) -{ - if ((x.rows () != y.rows ()) || (x.cols () != y.cols ())) - (*current_liboctave_error_handler) ("matrix size mismatch"); - - octave_idx_type x_nr = x.rows (); - octave_idx_type x_nc = x.cols (); - - octave_idx_type y_nr = y.rows (); - octave_idx_type y_nc = y.cols (); - - if (x_nr != y_nr || x_nc != y_nc) - octave::err_nonconformant ("atan2", x_nr, x_nc, y_nr, y_nc); - - SparseMatrix r; - - r = SparseMatrix (x_nr, x_nc, (x.nnz () + y.nnz ())); - - octave_idx_type jx = 0; - r.cidx (0) = 0; - for (octave_idx_type i = 0 ; i < x_nc ; i++) - { - octave_idx_type ja = x.cidx (i); - octave_idx_type ja_max = x.cidx (i+1); - bool ja_lt_max = ja < ja_max; - - octave_idx_type jb = y.cidx (i); - octave_idx_type jb_max = y.cidx (i+1); - bool jb_lt_max = jb < jb_max; - - while (ja_lt_max || jb_lt_max) - { - octave_quit (); - if ((! jb_lt_max) - || (ja_lt_max && (x.ridx (ja) < y.ridx (jb)))) - { - r.ridx (jx) = x.ridx (ja); - r.data (jx) = atan2 (x.data (ja), 0.); - jx++; - ja++; - ja_lt_max= ja < ja_max; - } - else if ((! ja_lt_max) - || (jb_lt_max && (y.ridx (jb) < x.ridx (ja)))) - { - jb++; - jb_lt_max= jb < jb_max; - } - else - { - double tmp = atan2 (x.data (ja), y.data (jb)); - if (tmp != 0.) - { - r.data (jx) = tmp; - r.ridx (jx) = x.ridx (ja); - jx++; - } - ja++; - ja_lt_max= ja < ja_max; - jb++; - jb_lt_max= jb < jb_max; - } - } - r.cidx (i+1) = jx; - } - - r.maybe_compress (); - - return r; -} - -SparseMatrix SparseMatrix::inverse (void) const { octave_idx_type info;
--- a/liboctave/array/dSparse.h Thu Jun 15 19:38:45 2017 -0400 +++ b/liboctave/array/dSparse.h Fri Jun 16 09:39:20 2017 -0400 @@ -127,18 +127,6 @@ friend OCTAVE_API SparseMatrix real (const SparseComplexMatrix& a); friend OCTAVE_API SparseMatrix imag (const SparseComplexMatrix& a); - OCTAVE_DEPRECATED ("use 'Fatan2' instead") - OCTAVE_API friend - SparseMatrix atan2 (const double& x, const SparseMatrix& y); - - OCTAVE_DEPRECATED ("use 'Fatan2' instead") - OCTAVE_API friend - SparseMatrix atan2 (const SparseMatrix& x, const double& y); - - OCTAVE_DEPRECATED ("use 'Fatan2' instead") - OCTAVE_API friend - SparseMatrix atan2 (const SparseMatrix& x, const SparseMatrix& y); - SparseMatrix transpose (void) const { return MSparse<double>::transpose ();
--- a/liboctave/numeric/lo-mappers.h Thu Jun 15 19:38:45 2017 -0400 +++ b/liboctave/numeric/lo-mappers.h Fri Jun 16 09:39:20 2017 -0400 @@ -524,17 +524,6 @@ return octave::math::is_NA (x); } -OCTAVE_DEPRECATED ("use 'octave::math::is_NaN_or_NA' instead") -inline bool octave_is_NaN_or_NA (const Complex& x) -{ - return octave::math::is_NaN_or_NA (x); -} -OCTAVE_DEPRECATED ("use 'octave::math::is_NaN_or_NA' instead") -inline bool octave_is_NaN_or_NA (const FloatComplex& x) -{ - return octave::math::is_NaN_or_NA (x); -} - OCTAVE_DEPRECATED ("use 'octave::math::acos' instead") inline Complex acos (const Complex& x) { return octave::math::acos (x); } OCTAVE_DEPRECATED ("use 'octave::math::acos' instead")
--- a/liboctave/util/unwind-prot.h Thu Jun 15 19:38:45 2017 -0400 +++ b/liboctave/util/unwind-prot.h Fri Jun 16 09:39:20 2017 -0400 @@ -60,17 +60,8 @@ lifo.push (new_elem); } - OCTAVE_DEPRECATED ("use 'add (new fcn_arg_elem<void *> (fcn, ptr))' instead") - void add (void (*fcn) (void *), void *ptr = nullptr) - { - add (new fcn_arg_elem<void *> (fcn, ptr)); - } - operator bool (void) const { return ! empty (); } - OCTAVE_DEPRECATED ("use 'run_first' instead") - void run_top (void) { run_first (); } - void run_first (void) { if (! empty ()) @@ -82,12 +73,6 @@ } } - OCTAVE_DEPRECATED ("use 'run' instead") - void run_top (int num) { run (num); } - - OCTAVE_DEPRECATED ("use 'discard_first' instead") - void discard_top (void) { discard_first (); } - void discard_first (void) { if (! empty ()) @@ -98,9 +83,6 @@ } } - OCTAVE_DEPRECATED ("use 'discard' instead") - void discard_top (int num) { discard (num); } - size_t size (void) const { return lifo.size (); } protected: