Mercurial > hg > octave-thorsten
changeset 100:197bd6c63baa
[project @ 1993-09-13 03:06:15 by jwe]
(syl): Use complex_matrix_value(), not ComplexMatrixLoad().
author | jwe |
---|---|
date | Mon, 13 Sep 1993 03:06:15 +0000 |
parents | 7162908b2684 |
children | 6f35b150c579 |
files | src/syl.cc |
diffstat | 1 files changed, 3 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- a/src/syl.cc +++ b/src/syl.cc @@ -50,44 +50,6 @@ long, long); } -// Return value of tree_constant argument as ComplexMatrix. - -ComplexMatrix -ComplexMatrixLoad (tree_constant& arg) -{ - ComplexMatrix retval; - -// Set argument size for scalar (for later). - - switch (arg.const_type ()) - { - case tree_constant_rep::scalar_constant: - retval.resize (1, 1); - { - double real_val = arg.double_value (); - retval.elem (0, 0) = real_val; - } - break; - case tree_constant_rep::complex_scalar_constant: - retval.resize (1, 1); - retval.elem (0, 0) = arg.complex_value (); - break; - case tree_constant_rep::matrix_constant: - { - Matrix tmp = arg.matrix_value (); - retval = tmp; - } - break; - case tree_constant_rep::complex_matrix_constant: - retval = arg.complex_matrix_value (); - break; - default: - panic_impossible (); - break; - } - return retval; -} - #ifdef WITH_DLD tree_constant * builtin_syl_2 (tree_constant *args, int nargin, int nargout) @@ -140,9 +102,9 @@ // Do everything in complex arithmetic; - ComplexMatrix ca = ComplexMatrixLoad (arga); - ComplexMatrix cb = ComplexMatrixLoad (argb); - ComplexMatrix cc = ComplexMatrixLoad (argc); + ComplexMatrix ca = arga.complex_matrix_value (); + ComplexMatrix cb = argb.complex_matrix_value (); + ComplexMatrix cc = argc.complex_matrix_value (); // Compute Schur decompositions