Mercurial > hg > octave-nkf
diff liboctave/CNDArray.cc @ 4584:f7697d703481
[project @ 2003-10-31 19:47:35 by jwe]
author | jwe |
---|---|
date | Fri, 31 Oct 2003 19:47:36 +0000 |
parents | 01e4957409a4 |
children | 19bfd295f400 |
line wrap: on
line diff
--- a/liboctave/CNDArray.cc +++ b/liboctave/CNDArray.cc @@ -88,36 +88,16 @@ (MX_ND_ANY_EVAL (elem (iter_idx) != Complex (0, 0)), false); } -ComplexMatrix +ComplexNDArray ComplexNDArray::cumprod (int dim) const { - if (dims () . length () == 2) - { - MX_CUMULATIVE_OP (ComplexMatrix, Complex, *=); - } - else - { - (*current_liboctave_error_handler) - ("cumsum is not yet implemented for N-d arrays"); - - return ComplexMatrix (); - } + MX_ND_CUMULATIVE_OP (ComplexNDArray, Complex, Complex (1, 0), *); } -ComplexMatrix +ComplexNDArray ComplexNDArray::cumsum (int dim) const { - if (dims () . length () == 2) - { - MX_CUMULATIVE_OP (ComplexMatrix, Complex, +=); - } - else - { - (*current_liboctave_error_handler) - ("cumsum is not yet implemented for N-d arrays"); - - return ComplexMatrix (); - } + MX_ND_CUMULATIVE_OP (ComplexNDArray, Complex, Complex (0, 0), +); } ComplexNDArray