Mercurial > hg > octave-nkf
diff liboctave/Array.h @ 10115:ed49cef7e005
simplify Array::insert methods
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 15 Jan 2010 10:34:54 +0100 |
parents | eb8ac0eed9f1 |
children | 829e69ec3110 |
line wrap: on
line diff
--- a/liboctave/Array.h +++ b/liboctave/Array.h @@ -585,13 +585,14 @@ // Dispatcher to the above two. void delete_elements (const Array<idx_vector>& ia); - // FIXME -- are these required? What exactly are they supposed to do?. + // Insert an array into another at a specified position. + // If size (a) is [d1 d2 ... dN] and idx is [i1 i2 ... iN], + // this method is equivalent to + // x(i1:i1+d1-1, i2:i2+d2-1, ... , iN:iN+dN-1) = a. + Array<T>& insert (const Array<T>& a, const Array<octave_idx_type>& idx); + // This is just a special case for idx = [r c 0 ...] Array<T>& insert (const Array<T>& a, octave_idx_type r, octave_idx_type c); - Array<T>& insert2 (const Array<T>& a, octave_idx_type r, octave_idx_type c); - Array<T>& insertN (const Array<T>& a, octave_idx_type r, octave_idx_type c); - - Array<T>& insert (const Array<T>& a, const Array<octave_idx_type>& idx); void maybe_economize (void) {