Mercurial > hg > octave-nkf
changeset 19519:5b263e517c95
Remove liboctave methods and classes deprecated for longer than 3 years.
* Array2.h, Array3.h, ArrayN.h, MArray2.h, MArrayN.h: remove these files
with their corresponding classes which have been deprecated.
* numeric/lo-mappers.h, numeric/lo-mappers.cc (octave_is_NaN_or_NA): remove
deprecated function for input of doubles and floats.
* util/lo-ieee.h, util/lo-ieee.cc (__lo_ieee_float_is_NaN_or_NA): remove
deprecated function for input of doubles and floats.
* array/Array.h (Array<T>::chop_trailing_singletons): remove deprecated method.
* array/Array.h (Array<T>::Array (octave_idx_type),
Array<T>::Array (octave_idx_type, T)): remove deprecated constructors which
casused confusions since there are no 1D arrays.
* dim-vector.h (dim_vector::dim_vector (octave_idx_type)): remove deprecated
constructor which caused confusion since there are no 1D arrays.
* liboctave/array/module.mk: update list of files.
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Mon, 10 Nov 2014 12:37:04 +0000 |
parents | 346b20b2c2ff |
children | cbc838b3020c |
files | liboctave/array/Array.h liboctave/array/Array2.h liboctave/array/Array3.h liboctave/array/ArrayN.h liboctave/array/MArray.h liboctave/array/MArray2.h liboctave/array/MArrayN.h liboctave/array/dim-vector.h liboctave/array/module.mk liboctave/numeric/lo-mappers.cc liboctave/numeric/lo-mappers.h liboctave/util/lo-ieee.cc liboctave/util/lo-ieee.h |
diffstat | 13 files changed, 0 insertions(+), 313 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/array/Array.h +++ b/liboctave/array/Array.h @@ -180,20 +180,6 @@ rep->count++; } - //! Obsolete 1D ctor (there are no 1D arrays). - explicit Array (octave_idx_type n) GCC_ATTR_DEPRECATED - : dimensions (n, 1), rep (new typename Array<T>::ArrayRep (n)), - slice_data (rep->data), slice_len (rep->len) - { } - - //! Obsolete initialized 1D ctor (there are no 1D arrays). - explicit Array (octave_idx_type n, const T& val) GCC_ATTR_DEPRECATED - : dimensions (n, 1), rep (new typename Array<T>::ArrayRep (n)), - slice_data (rep->data), slice_len (rep->len) - { - fill (val); - } - //! nD uninitialized ctor. explicit Array (const dim_vector& dv) : dimensions (dv), @@ -338,9 +324,6 @@ //! Chop off leading singleton dimensions Array<T> squeeze (void) const; - void chop_trailing_singletons (void) GCC_ATTR_DEPRECATED - { dimensions.chop_trailing_singletons (); } - octave_idx_type compute_index (octave_idx_type i, octave_idx_type j) const; octave_idx_type compute_index (octave_idx_type i, octave_idx_type j, octave_idx_type k) const;
deleted file mode 100644 --- a/liboctave/array/Array2.h +++ /dev/null @@ -1,35 +0,0 @@ -// Template array classes -/* - -Copyright (C) 1996-2013 John W. Eaton - -This file is part of Octave. - -Octave is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -Octave is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with Octave; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - -#if !defined (octave_Array2_h) -#define octave_Array2_h 1 - -#include "Array.h" -#define Array2 Array - -// If we're with GNU C++, issue a warning. -#ifdef __GNUC__ -#warning Using Array2<T> is deprecated. Use Array<T> directly. -#endif - -#endif
deleted file mode 100644 --- a/liboctave/array/Array3.h +++ /dev/null @@ -1,94 +0,0 @@ -// Template array classes -/* - -Copyright (C) 1996-2013 John W. Eaton - -This file is part of Octave. - -Octave is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -Octave is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with Octave; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - -#if !defined (octave_Array3_h) -#define octave_Array3_h 1 - -#include <cassert> -#include <cstdlib> - -#include "Array.h" -#include "lo-error.h" - -class idx_vector; - -// Three dimensional array class. - -template <class T> -class -Array3 : public Array<T> -{ -public: - - Array3 (void) : Array<T> (dim_vector (0, 0, 0)) { } - - Array3 (octave_idx_type r, octave_idx_type c, - octave_idx_type p) : Array<T> (dim_vector (r, c, p)) { } - - Array3 (octave_idx_type r, octave_idx_type c, octave_idx_type p, const T& val) - : Array<T> (dim_vector (r, c, p), val) { } - - Array3 (const Array3<T>& a) - : Array<T> (a, a.dims ()) { } - - Array3 (const Array<T>& a, octave_idx_type r, octave_idx_type c, - octave_idx_type p) - : Array<T> (a, dim_vector (r, c, p)) { } - - ~Array3 (void) { } - - Array3<T>& operator = (const Array3<T>& a) - { - if (this != &a) - Array<T>::operator = (a); - - return *this; - } - - void resize (octave_idx_type r, octave_idx_type c, octave_idx_type p) - { Array<T>::resize (dim_vector (r, c, p)); } - - void resize (octave_idx_type r, octave_idx_type c, octave_idx_type p, - const T& val) - { Array<T>::resize (dim_vector (r, c, p), val); } - - Array3<T> sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const - { - Array<T> tmp = Array<T>::sort (dim, mode); - return Array3<T> (tmp, tmp.rows (), tmp.columns (), tmp.pages ()); - } - - Array3<T> sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const - { - Array<T> tmp = Array<T>::sort (sidx, dim, mode); - return Array3<T> (tmp, tmp.rows (), tmp.columns (), tmp.pages ()); - } -}; - -// If we're with GNU C++, issue a warning. -#ifdef __GNUC__ -#warning Using Array3<T> is deprecated. Use Array<T> directly. -#endif - -#endif
deleted file mode 100644 --- a/liboctave/array/ArrayN.h +++ /dev/null @@ -1,35 +0,0 @@ -// Template array classes -/* - -Copyright (C) 2000-2013 John W. Eaton - -This file is part of Octave. - -Octave is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -Octave is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with Octave; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - -#if !defined (octave_ArrayN_h) -#define octave_ArrayN_h 1 - -#include "Array.h" -#define ArrayN Array - -// If we're with GNU C++, issue a warning. -#ifdef __GNUC__ -#warning Using ArrayN<T> is deprecated. Use Array<T> directly. -#endif - -#endif
--- a/liboctave/array/MArray.h +++ b/liboctave/array/MArray.h @@ -49,12 +49,6 @@ MArray (void) : Array<T> () { } - explicit MArray (octave_idx_type n) GCC_ATTR_DEPRECATED - : Array<T> (dim_vector (n, 1)) { } - - MArray (octave_idx_type n, const T& val) GCC_ATTR_DEPRECATED - : Array<T> (dim_vector (n, 1), val) { } - explicit MArray (const dim_vector& dv) : Array<T> (dv) { }
deleted file mode 100644 --- a/liboctave/array/MArray2.h +++ /dev/null @@ -1,37 +0,0 @@ -// Template array classes with like-type math ops -/* - -Copyright (C) 1996-2013 John W. Eaton - -This file is part of Octave. - -Octave is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -Octave is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with Octave; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - -#if !defined (octave_MArray2_h) -#define octave_MArray2_h 1 - -#include "MArray.h" -#define MArray2 MArray - -// If we're with GNU C++, issue a warning. -#ifdef __GNUC__ -#warning Using MArray2<T> is deprecated. Use MArray<T>. -#endif - - - -#endif
deleted file mode 100644 --- a/liboctave/array/MArrayN.h +++ /dev/null @@ -1,35 +0,0 @@ -// Template array classes with like-type math ops -/* - -Copyright (C) 1996-2013 John W. Eaton - -This file is part of Octave. - -Octave is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -Octave is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with Octave; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - -#if !defined (octave_MArrayN_h) -#define octave_MArrayN_h 1 - -#include "MArray.h" -#define MArrayN MArray - -// If we're with GNU C++, issue a warning. -#ifdef __GNUC__ -#warning Using MArrayN<T> is deprecated. Use MArray<T>. -#endif - -#endif
--- a/liboctave/array/dim-vector.h +++ b/liboctave/array/dim-vector.h @@ -140,27 +140,6 @@ public: - // The constructor - // - // dim_vector (n) - // - // creates an dimension vector with N rows and 1 column. It is - // deprecated because of the potentiol for confusion that it causes. - // Additional constructors of the form - // - // dim_vector (r, c) - // dim_vector (r, c, p) - // dim_vector (d1, d2, d3, d4, ...) - // - // are available for up to 7 dimensions. - - explicit dim_vector (octave_idx_type n) GCC_ATTR_DEPRECATED - : rep (newrep (2)) - { - rep[0] = n; - rep[1] = 1; - } - #define ASSIGN_REP(i) rep[i] = d ## i; #define DIM_VECTOR_CTOR(N) \ dim_vector (OCT_MAKE_DECL_LIST (octave_idx_type, d, N)) \
--- a/liboctave/array/module.mk +++ b/liboctave/array/module.mk @@ -2,10 +2,7 @@ array/module.mk ARRAY_INC = \ - array/Array2.h \ - array/Array3.h \ array/Array.h \ - array/ArrayN.h \ array/Array-util.h \ array/boolMatrix.h \ array/boolNDArray.h \ @@ -42,11 +39,9 @@ array/int64NDArray.h \ array/int8NDArray.h \ array/intNDArray.h \ - array/MArray2.h \ array/MArray-decl.h \ array/MArray-defs.h \ array/MArray.h \ - array/MArrayN.h \ array/Matrix.h \ array/MatrixType.h \ array/MDiagArray2.h \
--- a/liboctave/numeric/lo-mappers.cc +++ b/liboctave/numeric/lo-mappers.cc @@ -169,12 +169,6 @@ return lo_ieee_is_NA (x); } -bool -octave_is_NaN_or_NA (double x) -{ - return lo_ieee_isnan (x); -} - // (double, double) -> double mappers. // complex -> complex mappers. @@ -412,12 +406,6 @@ return lo_ieee_is_NA (x); } -bool -octave_is_NaN_or_NA (float x) -{ - return lo_ieee_isnan (x); -} - // (float, float) -> float mappers. // complex -> complex mappers.
--- a/liboctave/numeric/lo-mappers.h +++ b/liboctave/numeric/lo-mappers.h @@ -72,7 +72,6 @@ #endif extern OCTAVE_API bool octave_is_NA (double x); -extern OCTAVE_API bool octave_is_NaN_or_NA (double x) GCC_ATTR_DEPRECATED; // Generic xmin, xmax definitions template <class T> @@ -154,7 +153,6 @@ #endif extern OCTAVE_API bool octave_is_NA (float x); -extern OCTAVE_API bool octave_is_NaN_or_NA (float x) GCC_ATTR_DEPRECATED; inline float xmin (float x, float y)
--- a/liboctave/util/lo-ieee.cc +++ b/liboctave/util/lo-ieee.cc @@ -106,12 +106,6 @@ return x; } -int -__lo_ieee_is_NaN_or_NA (double x) -{ - return __lo_ieee_isnan (x); -} - double lo_ieee_inf_value (void) { @@ -188,12 +182,6 @@ return (__lo_ieee_float_isnan (x) && (t.word == LO_IEEE_NA_FLOAT)) ? 1 : 0; } -int -__lo_ieee_float_is_NaN_or_NA (float x) -{ - return __lo_ieee_float_isnan (x); -} - float lo_ieee_float_inf_value (void) {
--- a/liboctave/util/lo-ieee.h +++ b/liboctave/util/lo-ieee.h @@ -74,7 +74,6 @@ extern OCTAVE_API int __lo_ieee_is_NA (double); extern OCTAVE_API int __lo_ieee_is_old_NA (double); -extern OCTAVE_API int __lo_ieee_is_NaN_or_NA (double) GCC_ATTR_DEPRECATED; extern OCTAVE_API double __lo_ieee_replace_old_NA (double); extern OCTAVE_API double lo_ieee_inf_value (void); @@ -88,7 +87,6 @@ extern OCTAVE_API int __lo_ieee_float_isinf (float x); extern OCTAVE_API int __lo_ieee_float_is_NA (float); -extern OCTAVE_API int __lo_ieee_float_is_NaN_or_NA (float) GCC_ATTR_DEPRECATED; extern OCTAVE_API float lo_ieee_float_inf_value (void); extern OCTAVE_API float lo_ieee_float_na_value (void);