Mercurial > hg > octave-lojdl
changeset 8307:ec969f3b8955
Add scalar reshape method
author | David Bateman <dbateman@free.fr> |
---|---|
date | Tue, 04 Nov 2008 15:08:27 +0100 |
parents | 43795cf108d0 |
children | 5fe0f4dfdbec |
files | src/ChangeLog src/ov-base-scalar.h |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,11 @@ to do the actual work. +2008-10-31 David Bateman <dbateman@free.fr> + + * ov-base-scalar.h (octave_value octave_base_scalar::reshape + (const dim_vector&) const): New method. + 2008-10-30 John W. Eaton <jwe@octave.org> * oct-map.cc (Octave_map::index): Copy key_list.
--- a/src/ov-base-scalar.h +++ b/src/ov-base-scalar.h @@ -84,6 +84,9 @@ octave_value permute (const Array<int>&, bool = false) const { return scalar; } + octave_value reshape (const dim_vector& new_dims) const + { return array_value ().reshape (new_dims); } + size_t byte_size (void) const { return sizeof (ST); } octave_value all (int = 0) const { return (scalar != ST ()); }