Mercurial > hg > octave-terminal
changeset 10301:9e0ec19df4bc
commit accidentally omitted parts of previous change
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 10 Feb 2010 13:57:23 -0500 |
parents | dcc2535009c7 |
children | 5669a0b893db |
files | liboctave/CMatrix.h liboctave/ChangeLog liboctave/dMatrix.h liboctave/fCMatrix.h liboctave/fMatrix.h src/ChangeLog src/graphics.cc |
diffstat | 7 files changed, 32 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/CMatrix.h +++ b/liboctave/CMatrix.h @@ -64,6 +64,9 @@ template <class U> ComplexMatrix (const Array2<U>& a) : MArray2<Complex> (a) { } + template <class U> + ComplexMatrix (const Array<U>& a) : MArray2<Complex> (a) { } + ComplexMatrix (const Matrix& re, const Matrix& im); explicit ComplexMatrix (const Matrix& a);
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,14 @@ +2010-02-10 John W. Eaton <jwe@octave.org> + + * dMatrix.h (template <class U> Matrix (const Array<U>&)): + New constructor. + * CMatrix.h (template <class U> ComplexMatrix (const Array<U>&)): + New constructor. + * fMatrix.h (template <class U> FloatMatrix (const Array<U>&)): + New constructor. + * fCMatrix.h (template <class U> FloatComplexMatrix (const Array<U>&)): + New constructor. + 2010-02-09 Jaroslav Hajek <highegg@gmail.com> * idx-vector.cc (idx_vector::idx_vector_rep::idx_vector_rep (const
--- a/liboctave/dMatrix.h +++ b/liboctave/dMatrix.h @@ -61,6 +61,9 @@ template <class U> Matrix (const Array2<U>& a) : MArray2<double> (a) { } + template <class U> + Matrix (const Array<U>& a) : MArray2<double> (a) { } + explicit Matrix (const RowVector& rv); explicit Matrix (const ColumnVector& cv);
--- a/liboctave/fCMatrix.h +++ b/liboctave/fCMatrix.h @@ -64,6 +64,9 @@ template <class U> FloatComplexMatrix (const Array2<U>& a) : MArray2<FloatComplex> (a) { } + template <class U> + FloatComplexMatrix (const Array<U>& a) : MArray2<FloatComplex> (a) { } + explicit FloatComplexMatrix (const FloatMatrix& a); explicit FloatComplexMatrix (const FloatRowVector& rv);
--- a/liboctave/fMatrix.h +++ b/liboctave/fMatrix.h @@ -61,6 +61,9 @@ template <class U> FloatMatrix (const Array2<U>& a) : MArray2<float> (a) { } + template <class U> + FloatMatrix (const Array<U>& a) : MArray2<float> (a) { } + explicit FloatMatrix (const FloatRowVector& rv); explicit FloatMatrix (const FloatColumnVector& cv);
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2010-02-10 John W. Eaton <jwe@octave.org> + * graphics.cc (base_properties::set_children): Ensure that new + children are stored as a column vector. + * syscalls.cc (Fdup2, Fexec, Fpopen2, Ffork, Fgetpgrp, Fgetpid, Fgetppid, Fgetegid, Fgetgid, Fgeteuid, Fkill, Ffstat, Flstat, Fpipe, Fstat, Fwaitpid): Use DEFUNX instead of DEFUN.
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -2015,6 +2015,10 @@ { const Matrix new_kids = val.matrix_value (); + octave_idx_type nel = new_kids.numel (); + + const Matrix new_kids_column = new_kids.reshape (dim_vector (nel, 1)); + bool ok = true; if (! error_state) @@ -2024,7 +2028,7 @@ if (visible_kids.numel () == new_kids.numel ()) { Matrix t1 = visible_kids.sort (); - Matrix t2 = new_kids.sort (); + Matrix t2 = new_kids_column.sort (); if (t1 != t2) ok = false; @@ -2042,7 +2046,7 @@ } if (ok) - children = new_kids.stack (get_hidden_children ()); + children = new_kids_column.stack (get_hidden_children ()); } void