Mercurial > hg > octave-nkf
comparison liboctave/boolNDArray.cc @ 8780:ea76466605ba
support native cumsum, gripe on overflow in sum/cumsum
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 17 Feb 2009 14:23:35 +0100 |
parents | b756ce0002db |
children | eb63fbe60fab |
comparison
equal
deleted
inserted
replaced
8779:949708f930d0 | 8780:ea76466605ba |
---|---|
61 NDArray | 61 NDArray |
62 boolNDArray::sum (int dim) const | 62 boolNDArray::sum (int dim) const |
63 { | 63 { |
64 // NOTE: going via octave_idx_type is faster even though it requires a conversion. | 64 // NOTE: going via octave_idx_type is faster even though it requires a conversion. |
65 return do_mx_red_op<Array<octave_idx_type> > (*this, dim, mx_inline_count); | 65 return do_mx_red_op<Array<octave_idx_type> > (*this, dim, mx_inline_count); |
66 } | |
67 | |
68 NDArray | |
69 boolNDArray::cumsum (int dim) const | |
70 { | |
71 // NOTE: going via octave_idx_type is faster even though it requires a conversion. | |
72 return do_mx_cum_op<Array<octave_idx_type> > (*this, dim, mx_inline_cumcount); | |
66 } | 73 } |
67 | 74 |
68 boolNDArray | 75 boolNDArray |
69 boolNDArray::concat (const boolNDArray& rb, const Array<octave_idx_type>& ra_idx) | 76 boolNDArray::concat (const boolNDArray& rb, const Array<octave_idx_type>& ra_idx) |
70 { | 77 { |