Mercurial > hg > octave-lyh
diff liboctave/Array.h @ 10352:a3635bc1ea19
remove Array2
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 23 Feb 2010 16:12:27 +0100 |
parents | 12884915a8e4 |
children | 72fab01e5d68 |
line wrap: on
line diff
--- a/liboctave/Array.h +++ b/liboctave/Array.h @@ -244,6 +244,8 @@ // Reshape constructor. Array (const Array<T>& a, const dim_vector& dv); + Array (const Array<T>& a, octave_idx_type nr, octave_idx_type nc); + // Type conversion case. template <class U> Array (const Array<U>& a) @@ -513,6 +515,9 @@ // Must be 0 <= lo && up <= numel. May be up < lo. Array<T> linear_slice (octave_idx_type lo, octave_idx_type up) const; + Array<T> reshape (octave_idx_type nr, octave_idx_type nc) const + { return Array<T> (*this, nr, nc); } + Array<T> reshape (const dim_vector& new_dims) const { return Array<T> (*this, new_dims); }