# HG changeset patch # User David Bateman # Date 1207257015 14400 # Node ID 4a01572f42685ce2da8e3f83b498eb5c96b50206 # Parent 97e535ec65dbbe421531a70facbaf83238d7bb75 Add versions of removed dispatched sparse function in the deprecated directory diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -13,6 +13,17 @@ * optimization/lsqnonneg.m: New function. * optimization/Makefile.in (SOURCES): Add it to the list. +2008-04-03 David Bateman + + * deprecated/splchol.m deprecated/lchol.m deprecated/spfind.m + deprecated/spchol.m deprecated/spmin.m deprecated/spmax.m + deprecated/spdet.m deprecated/splu.m deprecated/spqr.m + deprecated/spatan2.m deprecated/spchol2inv.m + deprecated/spcholinv.m deprecated/spcumprod.m deprecated/spdiag.m + deprecated/spinv.m deprecated/spcumsum.m deprecated/spprod.m + deprecated/spsum.m deprecated/spsumsq.m: New files + * deprecated/Makefile.in (SOURCES): Add them here. + 2008-04-02 David Bateman * sparse/spaugment.m: New function diff --git a/scripts/deprecated/Makefile.in b/scripts/deprecated/Makefile.in --- a/scripts/deprecated/Makefile.in +++ b/scripts/deprecated/Makefile.in @@ -42,12 +42,15 @@ hypergeometric_cdf.m hypergeometric_inv.m hypergeometric_pdf.m \ hypergeometric_rnd.m intersection.m is_bool.m is_complex.m \ is_list.m is_matrix.m is_scalar.m is_square.m is_stream.m \ - is_struct.m is_symmetric.m is_vector.m isstr.m lognormal_cdf.m \ + is_struct.m is_symmetric.m is_vector.m isstr.m lchol.m lognormal_cdf.m \ lognormal_inv.m lognormal_pdf.m lognormal_rnd.m meshdom.m normal_cdf.m \ normal_inv.m normal_pdf.m normal_rnd.m pascal_cdf.m \ pascal_inv.m pascal_pdf.m pascal_rnd.m poisson_cdf.m \ poisson_inv.m poisson_pdf.m poisson_rnd.m polyinteg.m setstr.m \ - spkron.m struct_contains.m struct_elements.m t_cdf.m t_inv.m t_pdf.m \ + spatan2.m spchol2inv.m spcholinv.m spcumprod.m spcumsum.m \ + spchol.m spdet.m spdiag.m spfind.m spinv.m spkron.m splchol.m \ + splu.m spmax.m spmin.m spprod.m spqr.m spsum.m spsumsq.m \ + struct_contains.m struct_elements.m t_cdf.m t_inv.m t_pdf.m \ t_rnd.m uniform_cdf.m uniform_inv.m uniform_pdf.m uniform_rnd.m \ weibcdf.m weibinv.m weibpdf.m weibrnd.m weibull_cdf.m \ weibull_inv.m weibull_pdf.m weibull_rnd.m wiener_rnd.m diff --git a/scripts/deprecated/lchol.m b/scripts/deprecated/lchol.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/lchol.m @@ -0,0 +1,37 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Loadable Function} {@var{l} =} lchol (@var{a}) +## @deftypefnx {Loadable Function} {[@var{l}, @var{p}] =} lchol (@var{a}) +## This function has been deprecated. Use @code{chol (@dots,'lower')} instead. +## @end deftypefn + +function varargout = lchol (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spfind is obsolete and will be removed from a future\n", + "version of Octave, please use find instead"]); + endif + + varargout = cell (nargout, 1); + [ varargout{:} ] = chol (varargin{:}, "lower"); + +endfunction diff --git a/scripts/deprecated/spatan2.m b/scripts/deprecated/spatan2.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spatan2.m @@ -0,0 +1,35 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {} spatan2 (@var{y}, @var{x}) +## This function has been deprecated. Use @code{atan2} instead. +## @end deftypefn + +function retval = spatan2 (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spatan2 is obsolete and will be removed from a future\n", + "version of Octave, please use atan2 instead"]); + endif + + retval = atan2 (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spchol.m b/scripts/deprecated/spchol.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spchol.m @@ -0,0 +1,38 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Loadable Function} {@var{r} =} spchol (@var{a}) +## @deftypefnx {Loadable Function} {[@var{r}, @var{p}] =} spchol (@var{a}) +## @deftypefnx {Loadable Function} {[@var{r}, @var{p}, @var{q}] =} spchol (@var{a}) +## This function has been deprecated. Use @code{chol} instead. +## @end deftypefn + +function varargout = spchol (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spchol is obsolete and will be removed from a future\n", + "version of Octave, please use chol instead"]); + endif + + varargout = cell (nargout, 1); + [ varargout{:} ] = chol (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spchol2inv.m b/scripts/deprecated/spchol2inv.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spchol2inv.m @@ -0,0 +1,35 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {} spchol2inv (@var{u}) +## This function has been deprecated. Use @code{chol2inv} instead. +## @end deftypefn + +function retval = spchol2inv (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spchol2inv is obsolete and will be removed from a future\n", + "version of Octave, please use chol2inv instead"]); + endif + + retval = chol2inv (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spcholinv.m b/scripts/deprecated/spcholinv.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spcholinv.m @@ -0,0 +1,34 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {} spcholinv (@var{u}) +## This function has been deprecated. Use @code{cholinv} instead. +## @end deftypefn + +function retval = spcholinv (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spcholinv is obsolete and will be removed from a future\n", + "version of Octave, please use cholinv instead"]); + endif + retval = cholinv (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spcumprod.m b/scripts/deprecated/spcumprod.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spcumprod.m @@ -0,0 +1,35 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {} spcumprod (@var{x}, @var{dim}) +## This function has been deprecated. Use @code{cumprod} instead. +## @end deftypefn + +function retval = spcumprod (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spcumprod is obsolete and will be removed from a future\n", + "version of Octave, please use cumprod instead"]); + endif + + retval = cumprod (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spcumsum.m b/scripts/deprecated/spcumsum.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spcumsum.m @@ -0,0 +1,35 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {} spcumsum (@var{x}, @var{dim}) +## This function has been deprecated. Use @code{cumsum} instead. +## @end deftypefn + +function retval = spcumsum (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spcumsum is obsolete and will be removed from a future\n", + "version of Octave, please use cumsum instead"]); + endif + + retval = cumsum (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spdet.m b/scripts/deprecated/spdet.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spdet.m @@ -0,0 +1,36 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Loadable Function} {[@var{d}, @var{rcond}] = } spdet (@var{a}) +## This function has been deprecated. Use @code{det} instead. +## @end deftypefn + +function varargout = spdet (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spdet is obsolete and will be removed from a future\n", + "version of Octave, please use det instead"]); + endif + + varargout = cell (nargout, 1); + [ varargout{:} ] = det (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spdiag.m b/scripts/deprecated/spdiag.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spdiag.m @@ -0,0 +1,35 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {} spdiag (@var{v}, @var{k}) +## This function has been deprecated. Use @code{diag} instead. +## @end deftypefn + +function retval = spdiag (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spdiag is obsolete and will be removed from a future\n", + "version of Octave, please use diag instead"]); + endif + + retval = diag (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spfind.m b/scripts/deprecated/spfind.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spfind.m @@ -0,0 +1,39 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Loadable Function} {} spfind (@var{x}) +## @deftypefnx {Loadable Function} {} spfind (@var{x}, @var{n}) +## @deftypefnx {Loadable Function} {} spfind (@var{x}, @var{n}, @var{direction}) +## @deftypefnx {Loadable Function} {[@var{i}, @var{j}, @var{v}} spfind (@dots{}) +## This function has been deprecated. Use @code{find} instead. +## @end deftypefn + +function varargout = spfind (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spfind is obsolete and will be removed from a future\n", + "version of Octave, please use find instead"]); + endif + + varargout = cell (nargout, 1); + [ varargout{:} ] = find (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spinv.m b/scripts/deprecated/spinv.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spinv.m @@ -0,0 +1,36 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {[@var{x}, @var{rcond}] =} spinv (@var{a}) +## This function has been deprecated. Use @code{inv} instead. +## @end deftypefn + +function varargout = spinv (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spinv is obsolete and will be removed from a future\n", + "version of Octave, please use inv instead"]); + endif + + varargout = cell (nargout, 1); + [ varargout{:} ] = inv (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spkron.m b/scripts/deprecated/spkron.m --- a/scripts/deprecated/spkron.m +++ b/scripts/deprecated/spkron.m @@ -24,6 +24,13 @@ ## Author: jwe function retval = spkron (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spkron is obsolete and will be removed from a future\n", + "version of Octave, please use kron instead"]); + endif retval = kron (varargin{:}); diff --git a/scripts/deprecated/splchol.m b/scripts/deprecated/splchol.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/splchol.m @@ -0,0 +1,38 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Loadable Function} {@var{l} =} splchol (@var{a}) +## @deftypefnx {Loadable Function} {[@var{l}, @var{p}] =} splchol (@var{a}) +## @deftypefnx {Loadable Function} {[@var{l}, @var{p}, @var{q}] =} splchol (@var{a}) +## This function has been deprecated. Use @code{chol (@dots,'lower')} instead. +## @end deftypefn + +function varargout = splchol (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["splchol is obsolete and will be removed from a future\n", + "version of Octave, please use chol instead"]); + endif + + varargout = cell (nargout, 1); + [ varargout{:} ] = chol (varargin{:}, "lower"); + +endfunction diff --git a/scripts/deprecated/splu.m b/scripts/deprecated/splu.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/splu.m @@ -0,0 +1,47 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Loadable Function} {[@var{l}, @var{u}] =} splu (@var{a}) +## @deftypefnx {Loadable Function} {[@var{l}, @var{u}, @var{P}] =} splu (@var{a}) +## @deftypefnx {Loadable Function} {[@var{l}, @var{u}, @var{P}, @var{Q}] =} splu (@var{a}) +## @deftypefnx {Loadable Function} {[@var{l}, @var{u}, @var{P}, @var{Q}] =} splu (@dots{}, @var{thres}) +## @deftypefnx {Loadable Function} {[@var{l}, @var{u}, @var{P}] =} splu (@dots{}, @var{Q}) +## This function has been deprecated. Use @code{lu} instead. +## @end deftypefn + +function varargout = splu (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["splu is obsolete and will be removed from a future\n", + "version of Octave, please use lu instead"]); + endif + + for i = 2 : nargin + arg = varargin {i}; + if (! isscalar (arg)) + error ("splu: Can no longer treat input column permutations."); + endif + endfor + + varargout = cell (nargout, 1); + [ varargout{:} ] = lu (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spmax.m b/scripts/deprecated/spmax.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spmax.m @@ -0,0 +1,37 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Mapping Function} {} spmax (@var{x}, @var{y}, @var{dim}) +## @deftypefnx {Mapping Function} {[@var{w}, @var{iw}] =} spmax (@var{x}) +## This function has been deprecated. Use @code{max} instead. +## @end deftypefn + +function varargout = spmax (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spmax is obsolete and will be removed from a future\n", + "version of Octave, please use max instead"]); + endif + + varargout = cell (nargout, 1); + [ varargout{:} ] = max (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spmin.m b/scripts/deprecated/spmin.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spmin.m @@ -0,0 +1,37 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Mapping Function} {} spmin (@var{x}, @var{y}, @var{dim}) +## @deftypefnx {Mapping Function} {[@var{w}, @var{iw}] =} spmin (@var{x}) +## This function has been deprecated. Use @code{min} instead. +## @end deftypefn + +function varargout = spmin (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spmin is obsolete and will be removed from a future\n", + "version of Octave, please use min instead"]); + endif + + varargout = cell (nargout, 1); + [ varargout{:} ] = min (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spprod.m b/scripts/deprecated/spprod.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spprod.m @@ -0,0 +1,35 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {} spprod (@var{x}, @var{dim}) +## This function has been deprecated. Use @code{prod} instead. +## @end deftypefn + +function retval = spprod (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spprod is obsolete and will be removed from a future\n", + "version of Octave, please use prod instead"]); + endif + + retval = prod (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spqr.m b/scripts/deprecated/spqr.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spqr.m @@ -0,0 +1,39 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Loadable Function} {@var{r} =} spqr (@var{a}) +## @deftypefnx {Loadable Function} {@var{r} =} spqr (@var{a},0) +## @deftypefnx {Loadable Function} {[@var{c}, @var{r}] =} spqr (@var{a},@var{b}) +## @deftypefnx {Loadable Function} {[@var{c}, @var{r}] =} spqr (@var{a},@var{b},0) +## This function has been deprecated. Use @code{qr} instead. +## @end deftypefn + +function varargout = spqr (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spqr is obsolete and will be removed from a future\n", + "version of Octave, please use qr instead"]); + endif + + varargout = cell (nargout, 1); + [ varargout{:} ] = qr (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spsum.m b/scripts/deprecated/spsum.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spsum.m @@ -0,0 +1,35 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {} spsum (@var{x}, @var{dim}) +## This function has been deprecated. Use @code{sum} instead. +## @end deftypefn + +function retval = spsum (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spsum is obsolete and will be removed from a future\n", + "version of Octave, please use sum instead"]); + endif + + retval = sum (varargin{:}); + +endfunction diff --git a/scripts/deprecated/spsumsq.m b/scripts/deprecated/spsumsq.m new file mode 100644 --- /dev/null +++ b/scripts/deprecated/spsumsq.m @@ -0,0 +1,34 @@ +## Copyright (C) 2008 David Bateman +## +## 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 +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {} spsumsq (@var{x}, @var{dim}) +## This function has been deprecated. Use @code{sumsq} instead. +## @end deftypefn + +function retval = spsumsq (varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + ["spsumsq is obsolete and will be removed from a future\n", + "version of Octave, please use sumsq instead"]); + endif + retval = sumsq (varargin{:}); + +endfunction