Mercurial > jwe > octave
changeset 20437:c3b2ec6a1586
Remove redundant isvector() calls in set/ functions.
* intersect.m, setdiff.m, setxor.m, union.m:
Replace "isvector (x) && isrow (x)" with just "isrow (x)".
author | Rik <rik@octave.org> |
---|---|
date | Mon, 10 Aug 2015 13:12:22 -0700 |
parents | bf47ac616bc0 |
children | e59a44fa74ff |
files | scripts/set/intersect.m scripts/set/setdiff.m scripts/set/setxor.m scripts/set/union.m |
diffstat | 4 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/set/intersect.m Mon Aug 10 08:45:06 2015 -0700 +++ b/scripts/set/intersect.m Mon Aug 10 13:12:22 2015 -0700 @@ -50,7 +50,7 @@ c = ia = ib = []; else by_rows = nargin == 3; - isrowvec = isvector (a) && isvector (b) && isrow (a) && isrow (b); + isrowvec = isrow (a) && isrow (b); ## Form A and B into sets if (nargout > 1)
--- a/scripts/set/setdiff.m Mon Aug 10 08:45:06 2015 -0700 +++ b/scripts/set/setdiff.m Mon Aug 10 13:12:22 2015 -0700 @@ -48,7 +48,7 @@ [a, b] = validsetargs ("setdiff", a, b, varargin{:}); by_rows = nargin == 3; - isrowvec = isvector (a) && isrow (a); + isrowvec = isrow (a); if (by_rows) if (nargout > 1)
--- a/scripts/set/setxor.m Mon Aug 10 08:45:06 2015 -0700 +++ b/scripts/set/setxor.m Mon Aug 10 13:12:22 2015 -0700 @@ -50,7 +50,7 @@ [a, b] = validsetargs ("setxor", a, b, varargin{:}); by_rows = nargin == 3; - isrowvec = isvector (a) && isvector (b) && isrow (a) && isrow (b); + isrowvec = isrow (a) && isrow (b); ## Form A and B into sets. if (nargout > 1)
--- a/scripts/set/union.m Mon Aug 10 08:45:06 2015 -0700 +++ b/scripts/set/union.m Mon Aug 10 13:12:22 2015 -0700 @@ -51,7 +51,7 @@ [a, b] = validsetargs ("union", a, b, varargin{:}); by_rows = nargin == 3; - isrowvec = isvector (a) && isvector (b) && isrow (a) && isrow (b); + isrowvec = isrow (a) && isrow (b); if (by_rows) y = [a; b];