# HG changeset patch # User Carnë Draug # Date 1415623024 0 # Node ID 5b263e517c95aa0e1d6d19d6295c61c61e3e8913 # Parent 346b20b2c2ff073466ab10d5f3518a7f432d4aa4 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::chop_trailing_singletons): remove deprecated method. * array/Array.h (Array::Array (octave_idx_type), Array::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. diff --git a/liboctave/array/Array.h b/liboctave/array/Array.h --- 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::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::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 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; diff --git a/liboctave/array/Array2.h b/liboctave/array/Array2.h 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 -. - -*/ - -#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 is deprecated. Use Array directly. -#endif - -#endif diff --git a/liboctave/array/Array3.h b/liboctave/array/Array3.h 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 -. - -*/ - -#if !defined (octave_Array3_h) -#define octave_Array3_h 1 - -#include -#include - -#include "Array.h" -#include "lo-error.h" - -class idx_vector; - -// Three dimensional array class. - -template -class -Array3 : public Array -{ -public: - - Array3 (void) : Array (dim_vector (0, 0, 0)) { } - - Array3 (octave_idx_type r, octave_idx_type c, - octave_idx_type p) : Array (dim_vector (r, c, p)) { } - - Array3 (octave_idx_type r, octave_idx_type c, octave_idx_type p, const T& val) - : Array (dim_vector (r, c, p), val) { } - - Array3 (const Array3& a) - : Array (a, a.dims ()) { } - - Array3 (const Array& a, octave_idx_type r, octave_idx_type c, - octave_idx_type p) - : Array (a, dim_vector (r, c, p)) { } - - ~Array3 (void) { } - - Array3& operator = (const Array3& a) - { - if (this != &a) - Array::operator = (a); - - return *this; - } - - void resize (octave_idx_type r, octave_idx_type c, octave_idx_type p) - { Array::resize (dim_vector (r, c, p)); } - - void resize (octave_idx_type r, octave_idx_type c, octave_idx_type p, - const T& val) - { Array::resize (dim_vector (r, c, p), val); } - - Array3 sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const - { - Array tmp = Array::sort (dim, mode); - return Array3 (tmp, tmp.rows (), tmp.columns (), tmp.pages ()); - } - - Array3 sort (Array &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const - { - Array tmp = Array::sort (sidx, dim, mode); - return Array3 (tmp, tmp.rows (), tmp.columns (), tmp.pages ()); - } -}; - -// If we're with GNU C++, issue a warning. -#ifdef __GNUC__ -#warning Using Array3 is deprecated. Use Array directly. -#endif - -#endif diff --git a/liboctave/array/ArrayN.h b/liboctave/array/ArrayN.h 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 -. - -*/ - -#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 is deprecated. Use Array directly. -#endif - -#endif diff --git a/liboctave/array/MArray.h b/liboctave/array/MArray.h --- a/liboctave/array/MArray.h +++ b/liboctave/array/MArray.h @@ -49,12 +49,6 @@ MArray (void) : Array () { } - explicit MArray (octave_idx_type n) GCC_ATTR_DEPRECATED - : Array (dim_vector (n, 1)) { } - - MArray (octave_idx_type n, const T& val) GCC_ATTR_DEPRECATED - : Array (dim_vector (n, 1), val) { } - explicit MArray (const dim_vector& dv) : Array (dv) { } diff --git a/liboctave/array/MArray2.h b/liboctave/array/MArray2.h 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 -. - -*/ - -#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 is deprecated. Use MArray. -#endif - - - -#endif diff --git a/liboctave/array/MArrayN.h b/liboctave/array/MArrayN.h 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 -. - -*/ - -#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 is deprecated. Use MArray. -#endif - -#endif diff --git a/liboctave/array/dim-vector.h b/liboctave/array/dim-vector.h --- 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)) \ diff --git a/liboctave/array/module.mk b/liboctave/array/module.mk --- 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 \ diff --git a/liboctave/numeric/lo-mappers.cc b/liboctave/numeric/lo-mappers.cc --- 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. diff --git a/liboctave/numeric/lo-mappers.h b/liboctave/numeric/lo-mappers.h --- 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 @@ -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) diff --git a/liboctave/util/lo-ieee.cc b/liboctave/util/lo-ieee.cc --- 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) { diff --git a/liboctave/util/lo-ieee.h b/liboctave/util/lo-ieee.h --- 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);