Mercurial > hg > octave-nkf
diff liboctave/boolNDArray.cc @ 4556:773a21e4fce8
[project @ 2003-10-28 05:02:10 by jwe]
author | jwe |
---|---|
date | Tue, 28 Oct 2003 05:02:10 +0000 |
parents | 79df15d4470c |
children | 742993a501b9 |
line wrap: on
line diff
--- a/liboctave/boolNDArray.cc +++ b/liboctave/boolNDArray.cc @@ -50,38 +50,16 @@ // XXX FIXME XXX -- this is not quite the right thing. -boolMatrix +boolNDArray boolNDArray::all (int dim) const { - boolMatrix retval; - - if (dimensions.length () == 2) - { - boolMatrix tmp = matrix_value (); - retval = tmp.all (dim); - } - else - (*current_liboctave_error_handler) - ("all is not yet implemented for N-d Arrays"); - - return retval; + MX_ND_ALL_ANY (MX_ND_ALL_EVAL (MX_ND_ALL_EXPR)); } -boolMatrix +boolNDArray boolNDArray::any (int dim) const { - boolMatrix retval; - - if (dimensions.length () == 2) - { - boolMatrix tmp = matrix_value (); - retval = tmp.any (dim); - } - else - (*current_liboctave_error_handler) - ("any is not yet implemented for N-d Arrays"); - - return retval; + MX_ND_ALL_ANY (MX_ND_ANY_EVAL (MX_ND_ANY_EXPR)); } boolMatrix @@ -119,6 +97,13 @@ ::increment_index (ra_idx, dimensions, start_dimension); } +int +boolNDArray::compute_index (Array<int>& ra_idx, + const dim_vector& dimensions) +{ + return ::compute_index (ra_idx, dimensions); +} + NDND_CMP_OPS (boolNDArray, , boolNDArray, ) /*