# HG changeset patch # User David Bateman # Date 1238790593 -7200 # Node ID 4218f9515258c872031dea6aaf7a1103edb67d09 # Parent 136e72b9afa8ce589acf8f7babfd2b8212e5e96b Allow sparse logical max/min diff -r 136e72b9afa8 -r 4218f9515258 src/ChangeLog --- 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 + + * DLD-FUNCTIONS/max.cc (MINMAX_SPARSE_BODY): Allow sparse boolean + values. + 2009-04-01 Jaroslav Hajek * ov-str-mat.cc (default_numeric_conversion_function): diff -r 136e72b9afa8 -r 4218f9515258 src/DLD-FUNCTIONS/max.cc --- 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 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); \