Mercurial > octave-nkf
changeset 9086:4218f9515258
Allow sparse logical max/min
author | David Bateman <dbateman@free.fr> |
---|---|
date | Fri, 03 Apr 2009 22:29:53 +0200 |
parents | 136e72b9afa8 |
children | 961410931a4f |
files | src/ChangeLog src/DLD-FUNCTIONS/max.cc |
diffstat | 2 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Fri Apr 03 22:23:41 2009 +0200 +++ b/src/ChangeLog Fri Apr 03 22:29:53 2009 +0200 @@ -1,3 +1,8 @@ +2008-04-03 David Bateman <dbateman@free.fr> + + * DLD-FUNCTIONS/max.cc (MINMAX_SPARSE_BODY): Allow sparse boolean + values. + 2009-04-01 Jaroslav Hajek <highegg@gmail.com> * ov-str-mat.cc (default_numeric_conversion_function):
--- a/src/DLD-FUNCTIONS/max.cc Fri Apr 03 22:23:41 2009 +0200 +++ b/src/DLD-FUNCTIONS/max.cc Fri Apr 03 22:29:53 2009 +0200 @@ -468,10 +468,9 @@ \ if (single_arg && (nargout == 1 || nargout == 0)) \ { \ - if (arg1.type_id () == octave_sparse_matrix::static_type_id ()) \ + if (arg1.is_real_type ()) \ retval(0) = arg1.sparse_matrix_value () .FCN (dim); \ - else if (arg1.type_id () == \ - octave_sparse_complex_matrix::static_type_id ()) \ + else if (arg1.is_complex_type ()) \ retval(0) = arg1.sparse_complex_matrix_value () .FCN (dim); \ else \ gripe_wrong_type_arg (#FCN, arg1); \ @@ -480,10 +479,9 @@ { \ Array2<octave_idx_type> index; \ \ - if (arg1.type_id () == octave_sparse_matrix::static_type_id ()) \ + if (arg1.is_real_type ()) \ retval(0) = arg1.sparse_matrix_value () .FCN (index, dim); \ - else if (arg1.type_id () == \ - octave_sparse_complex_matrix::static_type_id ()) \ + else if (arg1.is_complex_type ()) \ retval(0) = arg1.sparse_complex_matrix_value () .FCN (index, dim); \ else \ gripe_wrong_type_arg (#FCN, arg1); \