# HG changeset patch # User jwe # Date 949989385 0 # Node ID b11f9c33558f3119cca3b89b8a508a93ed632a7f # Parent 2a38a5ddf20dc2903436964e14a3735b5065dfeb [project @ 2000-02-08 05:54:21 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,24 @@ 2000-02-07 John W. Eaton + * DLD-FUNCTIONS/balance.cc (Fbalance): Explicitly request + conversion from Matrix to ComplexMatrix. + * DLD-FUNCTIONS/qz.cc (Fqz): Likewise. + + * ov-re-mat.h (octave_matrix::complex_matrix_value): Explicitly + request conversion from Matrix type. + + * ov-ch-mat.h (octave_char_matrix::matrix_value): Explicitly + request conversion from charMatrix type. + (octave_char_matrix::complex_matrix_value): Likewise. + * ov-bool-mat.h (octave_bool_matrix::matrix_value): Likewise. + (octave_bool_matrix::complex_matrix_value): Likewise. + + * ov-range.h (octave_range::complex_matrix_value): Explicitly + request conversion from Matrix type. + + * ov-cx-mat.h, ov-re-mat.h: Explicitly request conversions from + diagonal matrix types in constructors. + * mappers.cc (ximag, xreal): Return double, not Complex. * error.cc (panic): Turn off buffering of error messages. diff --git a/src/DLD-FUNCTIONS/balance.cc b/src/DLD-FUNCTIONS/balance.cc --- a/src/DLD-FUNCTIONS/balance.cc +++ b/src/DLD-FUNCTIONS/balance.cc @@ -232,10 +232,10 @@ if (complex_case) { if (args(0).is_real_type ()) - caa = aa; + caa = ComplexMatrix (aa); if (args(1).is_real_type ()) - cbb = bb; + cbb = ComplexMatrix (bb); F77_XFCN (zggbal, ZGGBAL, (&job, nn, caa.fortran_vec(), nn, diff --git a/src/DLD-FUNCTIONS/log.cc b/src/DLD-FUNCTIONS/log.cc --- a/src/DLD-FUNCTIONS/log.cc +++ b/src/DLD-FUNCTIONS/log.cc @@ -25,6 +25,7 @@ #endif #include "EIG.h" +#include "mx-cm-cdm.h" #include "defun-dld.h" #include "error.h" diff --git a/src/DLD-FUNCTIONS/lu.cc b/src/DLD-FUNCTIONS/lu.cc --- a/src/DLD-FUNCTIONS/lu.cc +++ b/src/DLD-FUNCTIONS/lu.cc @@ -139,7 +139,7 @@ case 1: case 2: { - ComplexMatrix P = fact.P (); + Matrix P = fact.P (); ComplexMatrix L = P.transpose () * fact.L (); retval(1) = fact.U (); retval(0) = L; diff --git a/src/DLD-FUNCTIONS/qz.cc b/src/DLD-FUNCTIONS/qz.cc --- a/src/DLD-FUNCTIONS/qz.cc +++ b/src/DLD-FUNCTIONS/qz.cc @@ -477,16 +477,16 @@ { // complex case if (args(0).is_real_type ()) - caa = aa; + caa = ComplexMatrix (aa); if (args(1).is_real_type ()) - cbb = bb; + cbb = ComplexMatrix (bb); if (compq == 'V') - CQ = QQ; + CQ = ComplexMatrix (QQ); if (compz == 'V') - CZ = ZZ; + CZ = ComplexMatrix (ZZ); error ("complex case not done yet"); return retval; diff --git a/src/ov-bool-mat.h b/src/ov-bool-mat.h --- a/src/ov-bool-mat.h +++ b/src/ov-bool-mat.h @@ -89,12 +89,12 @@ double scalar_value (bool frc_str_conv = false) const { return double_value (frc_str_conv); } - Matrix matrix_value (bool = false) const { return matrix; } + Matrix matrix_value (bool = false) const { return Matrix (matrix); } Complex complex_value (bool = false) const; ComplexMatrix complex_matrix_value (bool = false) const - { return matrix; } + { return ComplexMatrix (matrix); } boolMatrix bool_matrix_value (void) const { return matrix; } diff --git a/src/ov-ch-mat.h b/src/ov-ch-mat.h --- a/src/ov-ch-mat.h +++ b/src/ov-ch-mat.h @@ -90,12 +90,12 @@ double scalar_value (bool frc_str_conv = false) const { return double_value (frc_str_conv); } - Matrix matrix_value (bool = false) const { return matrix; } + Matrix matrix_value (bool = false) const { return Matrix (matrix); } Complex complex_value (bool = false) const; ComplexMatrix complex_matrix_value (bool = false) const - { return matrix; } + { return ComplexMatrix (matrix); } charMatrix char_matrix_value (bool = false) const { return matrix; } diff --git a/src/ov-cx-mat.h b/src/ov-cx-mat.h --- a/src/ov-cx-mat.h +++ b/src/ov-cx-mat.h @@ -60,7 +60,7 @@ : octave_base_matrix (m) { } octave_complex_matrix (const ComplexDiagMatrix& d) - : octave_base_matrix (d) { } + : octave_base_matrix (ComplexMatrix (d)) { } octave_complex_matrix (const ComplexRowVector& v) : octave_base_matrix (ComplexMatrix (v)) { } diff --git a/src/ov-range.h b/src/ov-range.h --- a/src/ov-range.h +++ b/src/ov-range.h @@ -133,7 +133,7 @@ Complex complex_value (bool = false) const; ComplexMatrix complex_matrix_value (bool = false) const - { return range.matrix_value (); } + { return ComplexMatrix (range.matrix_value ()); } Range range_value (void) const { return range; } diff --git a/src/ov-re-mat.h b/src/ov-re-mat.h --- a/src/ov-re-mat.h +++ b/src/ov-re-mat.h @@ -60,7 +60,7 @@ : octave_base_matrix (m) { } octave_matrix (const DiagMatrix& d) - : octave_base_matrix (d) { } + : octave_base_matrix (Matrix (d)) { } octave_matrix (const RowVector& v) : octave_base_matrix (Matrix (v)) { } @@ -97,7 +97,7 @@ Complex complex_value (bool = false) const; ComplexMatrix complex_matrix_value (bool = false) const - { return matrix; } + { return ComplexMatrix (matrix); } void increment (void) { matrix += 1.0; } diff --git a/src/pt-plot.cc b/src/pt-plot.cc --- a/src/pt-plot.cc +++ b/src/pt-plot.cc @@ -496,8 +496,9 @@ { int status = eval (ndim, n_max); + // XXX FIXME XXX -- is the following really right? if (status < 0) - return -1; + return ColumnVector (1, -1.0); return val; } diff --git a/src/version.h b/src/version.h --- a/src/version.h +++ b/src/version.h @@ -23,7 +23,7 @@ #if !defined (octave_version_h) #define octave_version_h 1 -#define OCTAVE_VERSION "2.1.25" +#define OCTAVE_VERSION "2.1.26" #define OCTAVE_COPYRIGHT \ "Copyright (C) 1996, 1997, 1998, 1999, 2000 John W. Eaton."