Mercurial > octave
changeset 28923:3f8e1fa0eed2
maint: Use space after '!' logical not operator.
* eigs.m, gmres.m, __alltohandles__.m, cosint.m, classes.tst, func.tst,
io.tst, try.tst:
Use space after '!' logical not operator.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 13 Oct 2020 23:41:17 -0700 |
parents | c68b077c8fd6 |
children | 975333a621c1 |
files | scripts/sparse/eigs.m scripts/sparse/gmres.m scripts/sparse/private/__alltohandles__.m scripts/specfun/cosint.m test/classes/classes.tst test/func.tst test/io.tst test/try.tst |
diffstat | 8 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/sparse/eigs.m Tue Oct 13 23:32:38 2020 -0700 +++ b/scripts/sparse/eigs.m Tue Oct 13 23:41:17 2020 -0700 @@ -1286,7 +1286,7 @@ %! A(1, 1) = 0; %! A(1, 9) = 1; %! [V, L] = eigs (A, 4, -1); -%! assert (!any (isnan (diag (L)))); +%! assert (! any (isnan (diag (L)))); %! assert (any (abs (diag (L)) <= 2 * eps)); %!testif HAVE_ARPACK %! A = diag (ones (9, 1), 1);
--- a/scripts/sparse/gmres.m Tue Oct 13 23:32:38 2020 -0700 +++ b/scripts/sparse/gmres.m Tue Oct 13 23:41:17 2020 -0700 @@ -290,7 +290,7 @@ restart = size_b; maxit = size_b; max_iter_number = size_b; - elseif (restart > size_b) && (!empty_maxit) + elseif (restart > size_b) && (! empty_maxit) warning ("RESTART is %d but it should be bounded by SIZE(A,2).\n Setting restart to %d. \n", restart, size_b) restart = size_b; max_iter_number = restart * maxit;
--- a/scripts/sparse/private/__alltohandles__.m Tue Oct 13 23:32:38 2020 -0700 +++ b/scripts/sparse/private/__alltohandles__.m Tue Oct 13 23:41:17 2020 -0700 @@ -64,7 +64,7 @@ Afun = A; elseif (ischar (A)) Afun = str2func (A); - elseif (!isnumeric (A) || !issquare (A)) + elseif (! isnumeric (A) || ! issquare (A)) error ([solver_name, ": A must be a square matrix or a function handle"]) else A_is_numeric = true; @@ -90,7 +90,7 @@ M1fun = M1; elseif (ischar (M1)) M1fun = str2func (M1); - elseif (!isnumeric (M1) || !issquare (M1)) + elseif (! isnumeric (M1) || ! issquare (M1)) error ([solver_name, ": M1 must be a square matrix or a function handle"]) else M1_is_numeric = true; @@ -113,7 +113,7 @@ M2fun = M2; elseif (ischar (M2)) M2fun = str2func (M2); - elseif (!isnumeric (M2) || !issquare (M2)) + elseif (! isnumeric (M2) || ! issquare (M2)) error ([solver_name, ": M2 must be a square matrix or a function handle"]) else M2_is_numeric = true;
--- a/scripts/specfun/cosint.m Tue Oct 13 23:32:38 2020 -0700 +++ b/scripts/specfun/cosint.m Tue Oct 13 23:41:17 2020 -0700 @@ -106,7 +106,7 @@ ## Special values y(x == Inf) = 0; - y((x == -Inf) & !signbit (imag (x))) = 1i * pi; + y((x == -Inf) & ! signbit (imag (x))) = 1i * pi; y((x == -Inf) & signbit (imag (x))) = -1i * pi; todo(isinf (x)) = false;
--- a/test/classes/classes.tst Tue Oct 13 23:32:38 2020 -0700 +++ b/test/classes/classes.tst Tue Oct 13 23:41:17 2020 -0700 @@ -65,9 +65,9 @@ %! assert (isobject (snk)); %! assert (isequal (class (snk), 'Snork')); %! assert (isa (snk, 'Snork')); -%! assert (!isa (snk, 'Sneetch')); +%! assert (! isa (snk, 'Sneetch')); %! assert (ismethod (snk, 'gick')); -%! assert (!ismethod (snk, 'bletch')); +%! assert (! ismethod (snk, 'bletch')); %! assert (exist ('snk') == 1); %! assert (exist ('blink') == 0); %!test snk1 = Snork (snk);
--- a/test/func.tst Tue Oct 13 23:32:38 2020 -0700 +++ b/test/func.tst Tue Oct 13 23:41:17 2020 -0700 @@ -81,8 +81,8 @@ %! %! y = feval (fn, m, varargin{:}); %! y2 = feval (fn, reshape (mn, size (m)), varargin{:}); -%! if (!strcmp (class (y), class (m)) || -%! issparse (y) != issparse (m) || !size_equal (y, y2)) +%! if (! strcmp (class (y), class (m)) || +%! issparse (y) != issparse (m) || ! size_equal (y, y2)) %! error ("failed for type %s\n", typ{i}); %! endif %! if (!(strcmp (typ{i}, "cell") || strcmp (typ{i}, "struct")) &&
--- a/test/io.tst Tue Oct 13 23:32:38 2020 -0700 +++ b/test/io.tst Tue Oct 13 23:41:17 2020 -0700 @@ -256,7 +256,7 @@ %! "-struct", "STR", "matrix_fld", "str*_fld"); %! STR = load (struct_dat); %! -%! assert (!isfield (STR,"scalar_fld") && ... +%! assert (! isfield (STR,"scalar_fld") && ... %! STR.matrix_fld == [1.1,2;3,4] && ... %! STR.string_fld == "Octave" && ... %! STR.struct_fld.x == 0 && ...