Mercurial > octave-nkf
diff src/DLD-FUNCTIONS/max.cc @ 9086:4218f9515258
Allow sparse logical max/min
author | David Bateman <dbateman@free.fr> |
---|---|
date | Fri, 03 Apr 2009 22:29:53 +0200 |
parents | 8207b833557f |
children | c1fff751b5a8 |
line wrap: on
line diff
--- 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); \