Mercurial > hg > octave-nkf
changeset 5147:47e4c91e5799
[project @ 2005-02-16 21:06:19 by jwe]
author | jwe |
---|---|
date | Wed, 16 Feb 2005 21:06:19 +0000 |
parents | 275a95541831 |
children | 9eab94f5fadf |
files | src/ChangeLog src/ov-base-mat.h src/ov.cc src/ov.h |
diffstat | 4 files changed, 17 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,8 +1,7 @@ 2005-02-16 John W. Eaton <jwe@octave.org> - * ov.h, ov.cc - (octave_value::octave_value (const ArrayN<octave_value>&, bool)): - Delete. + * ov-base-mat.h (octave_base_matrix::squeeze): Explicitly convert + result of matrix.squeeze() to MT. 2005-02-15 John W. Eaton <jwe@octave.org>
--- a/src/ov-base-mat.h +++ b/src/ov-base-mat.h @@ -68,7 +68,7 @@ size_t byte_size (void) const { return matrix.byte_size (); } - octave_value squeeze (void) const { return matrix.squeeze (); } + octave_value squeeze (void) const { return MT (matrix.squeeze ()); } octave_value subsref (const std::string& type, const std::list<octave_value_list>& idx);
--- a/src/ov.cc +++ b/src/ov.cc @@ -423,6 +423,19 @@ rep->count = 1; } +octave_value::octave_value (const ArrayN<octave_value>& a, bool is_csl) + : rep (0) +{ + Cell c (a); + + if (is_csl) + rep = new octave_cs_list (c); + else + rep = new octave_cell (c); + + rep->count = 1; +} + octave_value::octave_value (const Matrix& m) : rep (new octave_matrix (m)) {