# HG changeset patch # User jwe # Date 1172801918 0 # Node ID 0eac3484e8df813dd246b907125e879a8e012ab1 # Parent 5fced7a5eee8e7a250c80b2a4121685530205bf4 [project @ 2007-03-02 02:18:37 by jwe] diff -r 5fced7a5eee8 -r 0eac3484e8df liboctave/MatrixType.h --- a/liboctave/MatrixType.h Thu Mar 01 17:23:40 2007 +0000 +++ b/liboctave/MatrixType.h Fri Mar 02 02:18:38 2007 +0000 @@ -51,7 +51,7 @@ }; MatrixType (void); - + MatrixType (const MatrixType &a); MatrixType (const Matrix &a); diff -r 5fced7a5eee8 -r 0eac3484e8df scripts/ChangeLog --- a/scripts/ChangeLog Thu Mar 01 17:23:40 2007 +0000 +++ b/scripts/ChangeLog Fri Mar 02 02:18:38 2007 +0000 @@ -1,3 +1,7 @@ +2007-03-01 Daniel J Sebald + + * image/__img__.m: Don't set xlim and ylim properties. + 2007-03-01 Paul Kienzle * general/interp1.m: Fix *style cases for decreasing x. diff -r 5fced7a5eee8 -r 0eac3484e8df scripts/image/__img__.m --- a/scripts/image/__img__.m Thu Mar 01 17:23:40 2007 +0000 +++ b/scripts/image/__img__.m Fri Mar 02 02:18:38 2007 +0000 @@ -62,7 +62,7 @@ __uiobject_adopt__ (ca, tmp); - set (ca, "view", [0, 90], "xlim", xlim, "ylim", ylim); + set (ca, "view", [0, 90]); if (nargout > 0) h = tmp; diff -r 5fced7a5eee8 -r 0eac3484e8df src/ChangeLog --- a/src/ChangeLog Thu Mar 01 17:23:40 2007 +0000 +++ b/src/ChangeLog Fri Mar 02 02:18:38 2007 +0000 @@ -1,3 +1,12 @@ +2007-03-01 John W. Eaton + + * ov-base-mat.h (octave_base_matrix::octave_base_matrix (const MT&), + (octave_base_matrix::octave_base_matrix (const MT&, const MatrixType&)): + Use common definition with default argument value. + * ov-base-scalar.h (octave_base_scalar::typ): New data member. + Initialize in constructors. + (octave_base_scalar::matrix_type): New funtions. + 2007-03-01 David Bateman * DLD-FUNCTIONS/md5sum.cc: New file. diff -r 5fced7a5eee8 -r 0eac3484e8df src/ov-base-mat.h --- a/src/ov-base-mat.h Thu Mar 01 17:23:40 2007 +0000 +++ b/src/ov-base-mat.h Fri Mar 02 02:18:38 2007 +0000 @@ -31,14 +31,13 @@ #include "mx-base.h" #include "str-vec.h" +#include "MatrixType.h" #include "error.h" #include "oct-obj.h" #include "ov-base.h" #include "ov-typeinfo.h" -#include "MatrixType.h" - class Octave_map; class tree_walker; @@ -54,14 +53,7 @@ octave_base_matrix (void) : octave_base_value (), typ (MatrixType ()) { } - octave_base_matrix (const MT& m) - : octave_base_value (), matrix (m), typ (MatrixType ()) - { - if (matrix.ndims () == 0) - matrix.resize (dim_vector (0, 0)); - } - - octave_base_matrix (const MT& m, const MatrixType& t) + octave_base_matrix (const MT& m, const MatrixType& t = MatrixType ()) : octave_base_value (), matrix (m), typ (t) { if (matrix.ndims () == 0) diff -r 5fced7a5eee8 -r 0eac3484e8df src/ov-base-scalar.h --- a/src/ov-base-scalar.h Thu Mar 01 17:23:40 2007 +0000 +++ b/src/ov-base-scalar.h Fri Mar 02 02:18:38 2007 +0000 @@ -33,6 +33,7 @@ #include "lo-utils.h" #include "oct-alloc.h" #include "str-vec.h" +#include "MatrixType.h" #include "ov-base.h" #include "ov-typeinfo.h" @@ -46,13 +47,13 @@ public: octave_base_scalar (void) - : octave_base_value () { } + : octave_base_value (), typ (MatrixType ()) { } - octave_base_scalar (const ST& s) - : octave_base_value (), scalar (s) { } + octave_base_scalar (const ST& s, const MatrixType& t = MatrixType ()) + : octave_base_value (), scalar (s), typ (t) { } octave_base_scalar (const octave_base_scalar& s) - : octave_base_value (), scalar (s.scalar) { } + : octave_base_value (), scalar (s.scalar), typ (s.typ) { } ~octave_base_scalar (void) { } @@ -92,6 +93,10 @@ octave_value any (int = 0) const { return (scalar != ST ()); } + MatrixType matrix_type (void) const { return typ; } + MatrixType matrix_type (const MatrixType& _typ) const + { MatrixType ret = typ; typ = _typ; return ret; } + bool is_scalar_type (void) const { return true; } bool is_numeric_type (void) const { return true; } @@ -112,6 +117,8 @@ // The value of this scalar. ST scalar; + + mutable MatrixType typ; }; #endif