# HG changeset patch # User Marco Vitetta # Date 1415913020 -3600 # Node ID eb20020f36b5f017c1bfc0d121587bcd1ee1f75f # Parent 1f4455ff2329509f6302889e951c03105f822a77 spparms.cc: accept "default" as argument instead of "defaults" (bug #43602) diff --git a/libinterp/corefcn/spparms.cc b/libinterp/corefcn/spparms.cc --- a/libinterp/corefcn/spparms.cc +++ b/libinterp/corefcn/spparms.cc @@ -40,7 +40,7 @@ @deftypefnx {Built-in Function} {[@var{keys}, @var{vals}] =} spparms ()\n\ @deftypefnx {Built-in Function} {@var{val} =} spparms (@var{key})\n\ @deftypefnx {Built-in Function} { } spparms (@var{vals})\n\ -@deftypefnx {Built-in Function} { } spparms (\"defaults\")\n\ +@deftypefnx {Built-in Function} { } spparms (\"default\")\n\ @deftypefnx {Built-in Function} { } spparms (\"tight\")\n\ @deftypefnx {Built-in Function} { } spparms (@var{key}, @var{val})\n\ Query or set the parameters used by the sparse solvers and factorization\n\ @@ -97,7 +97,7 @@ The value of individual keys can be set with\n\ @code{spparms (@var{key}, @var{val})}.\n\ The default values can be restored with the special keyword\n\ -@qcode{\"defaults\"}. The special keyword @qcode{\"tight\"} can be used to\n\ +@qcode{\"default\"}. The special keyword @qcode{\"tight\"} can be used to\n\ set the mmd solvers to attempt a sparser solution at the potential cost of\n\ longer running time.\n\ @seealso{chol, colamd, lu, qr, symamd}\n\ @@ -129,7 +129,7 @@ for (int i = 0; i < len; i++) str[i] = tolower (str[i]); - if (str == "defaults") + if (str == "defaults" || str == "default") octave_sparse_params::defaults (); else if (str == "tight") octave_sparse_params::tight (); @@ -181,7 +181,7 @@ /* %!test %! old_vals = spparms (); # save state -%! spparms ("defaults"); +%! spparms ("default"); %! vals = spparms (); %! assert (vals, [0 1 1 0 3 3 0.5 1.0 1.0 0.1 0.5 1.0 0.001]'); %! [keys, vals] = spparms ();