Mercurial > hg > octave-nkf
changeset 5108:10004c9625c3
[project @ 2005-01-18 20:05:10 by jwe]
author | jwe |
---|---|
date | Tue, 18 Jan 2005 20:05:10 +0000 |
parents | c891dd97b837 |
children | 1e36493572a0 |
files | liboctave/Array.cc liboctave/ChangeLog liboctave/idx-vector.cc scripts/ChangeLog scripts/linear-algebra/cross.m |
diffstat | 5 files changed, 23 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -1056,17 +1056,15 @@ if (dva.numel ()) { const T *a_data = a.data (); - int numel_to_move = dva (0); - int skip = dv (0); - for (int i = 0; i < len_a - 1; i++) + int numel_to_move = 1; + int skip = 0; + for (int i = 0; i < len_a; i++) if (ra_idx(i) == 0 && dva(i) == dv(i)) - { - numel_to_move *= dva(i+1); - skip *= dv(i+1); - } + numel_to_move *= dva(i); else { - skip -= dva(i); + skip = numel_to_move * (dv(i) - dva(i)); + numel_to_move *= dva(i); break; }
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,13 @@ +2005-01-18 David Bateman <dbateman@free.fr> + + * Array.cc (Array<T>::insert (const Array<T>&, const Array<int>&)): + Modify calculation of number elements to skip between copied blocks. + +2005-01-18 John W. Eaton <jwe@octave.org> + + * idx-vector.cc (IDX_VEC_REP::freeze): Call warning handler, not + error handler, to warn about resizing. + 2004-12-27 Martin Dalecki <martin@dalecki.de> * Array.cc, ArrayN.cc, base-lu.cc, boolMatrix.cc, boolNDArray.cc,
--- a/liboctave/idx-vector.cc +++ b/liboctave/idx-vector.cc @@ -585,11 +585,11 @@ if (warn_resize && max_val >= z_len) { if (tag) - (*current_liboctave_error_handler) + (*current_liboctave_warning_handler) ("resizing object with %s index = %d out of bounds", tag, max_val+1); else - (*current_liboctave_error_handler) + (*current_liboctave_warning_handler) ("resizing object with index = %d out of bounds", max_val+1); }