# HG changeset patch # User John W. Eaton # Date 1265828243 18000 # Node ID 9e0ec19df4bcc3e0c03639b1767be8b0a6e9f646 # Parent dcc2535009c768e5d90d0ca623308facafb1659b commit accidentally omitted parts of previous change diff -r dcc2535009c7 -r 9e0ec19df4bc liboctave/CMatrix.h --- a/liboctave/CMatrix.h Wed Feb 10 12:55:12 2010 -0500 +++ b/liboctave/CMatrix.h Wed Feb 10 13:57:23 2010 -0500 @@ -64,6 +64,9 @@ template ComplexMatrix (const Array2& a) : MArray2 (a) { } + template + ComplexMatrix (const Array& a) : MArray2 (a) { } + ComplexMatrix (const Matrix& re, const Matrix& im); explicit ComplexMatrix (const Matrix& a); diff -r dcc2535009c7 -r 9e0ec19df4bc liboctave/ChangeLog --- a/liboctave/ChangeLog Wed Feb 10 12:55:12 2010 -0500 +++ b/liboctave/ChangeLog Wed Feb 10 13:57:23 2010 -0500 @@ -1,3 +1,14 @@ +2010-02-10 John W. Eaton + + * dMatrix.h (template Matrix (const Array&)): + New constructor. + * CMatrix.h (template ComplexMatrix (const Array&)): + New constructor. + * fMatrix.h (template FloatMatrix (const Array&)): + New constructor. + * fCMatrix.h (template FloatComplexMatrix (const Array&)): + New constructor. + 2010-02-09 Jaroslav Hajek * idx-vector.cc (idx_vector::idx_vector_rep::idx_vector_rep (const diff -r dcc2535009c7 -r 9e0ec19df4bc liboctave/dMatrix.h --- a/liboctave/dMatrix.h Wed Feb 10 12:55:12 2010 -0500 +++ b/liboctave/dMatrix.h Wed Feb 10 13:57:23 2010 -0500 @@ -61,6 +61,9 @@ template Matrix (const Array2& a) : MArray2 (a) { } + template + Matrix (const Array& a) : MArray2 (a) { } + explicit Matrix (const RowVector& rv); explicit Matrix (const ColumnVector& cv); diff -r dcc2535009c7 -r 9e0ec19df4bc liboctave/fCMatrix.h --- a/liboctave/fCMatrix.h Wed Feb 10 12:55:12 2010 -0500 +++ b/liboctave/fCMatrix.h Wed Feb 10 13:57:23 2010 -0500 @@ -64,6 +64,9 @@ template FloatComplexMatrix (const Array2& a) : MArray2 (a) { } + template + FloatComplexMatrix (const Array& a) : MArray2 (a) { } + explicit FloatComplexMatrix (const FloatMatrix& a); explicit FloatComplexMatrix (const FloatRowVector& rv); diff -r dcc2535009c7 -r 9e0ec19df4bc liboctave/fMatrix.h --- a/liboctave/fMatrix.h Wed Feb 10 12:55:12 2010 -0500 +++ b/liboctave/fMatrix.h Wed Feb 10 13:57:23 2010 -0500 @@ -61,6 +61,9 @@ template FloatMatrix (const Array2& a) : MArray2 (a) { } + template + FloatMatrix (const Array& a) : MArray2 (a) { } + explicit FloatMatrix (const FloatRowVector& rv); explicit FloatMatrix (const FloatColumnVector& cv); diff -r dcc2535009c7 -r 9e0ec19df4bc src/ChangeLog --- a/src/ChangeLog Wed Feb 10 12:55:12 2010 -0500 +++ b/src/ChangeLog Wed Feb 10 13:57:23 2010 -0500 @@ -1,5 +1,8 @@ 2010-02-10 John W. Eaton + * 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. diff -r dcc2535009c7 -r 9e0ec19df4bc src/graphics.cc --- a/src/graphics.cc Wed Feb 10 12:55:12 2010 -0500 +++ b/src/graphics.cc Wed Feb 10 13:57:23 2010 -0500 @@ -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