Mercurial > hg > octave-lyh
changeset 10017:1ce1ae448572
support cummin/cummax for bools
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 22 Dec 2009 21:44:53 +0100 |
parents | 3275dda012f7 |
children | fb8834c12035 |
files | src/ChangeLog src/DLD-FUNCTIONS/max.cc |
diffstat | 2 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2009-12-16 Jaroslav Hajek <highegg@gmail.com> + + * DLD-FUNCTIONS/max.cc (do_cumminmax_body): Support also btyp_bool. + 2009-12-22 Rob Mahurin <octave@tertiarysource.net> * find-defun-files.sh: Use SED and EGREP as returned by configure.
--- a/src/DLD-FUNCTIONS/max.cc +++ b/src/DLD-FUNCTIONS/max.cc @@ -543,6 +543,13 @@ MAKE_INT_BRANCH (uint32); MAKE_INT_BRANCH (uint64); #undef MAKE_INT_BRANCH + case btyp_bool: + { + retval = do_cumminmax_red_op<int8NDArray> (arg, nargout, dim, ismin); + if (retval.length () > 0) + retval(0) = retval(0).bool_array_value (); + break; + } default: gripe_wrong_type_arg (func, arg); }