Mercurial > hg > octave-lyh
changeset 10814:83896a06adaf
don't skip narrowing when concatenating complex matrices
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 23 Jul 2010 08:08:28 +0200 |
parents | 2c2d4a2f1047 |
children | 0eb323b71957 |
files | src/ChangeLog src/pt-mat.cc |
diffstat | 2 files changed, 8 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-07-23 Jaroslav Hajek <highegg@gmail.com> + + * pt-mat.cc (do_single_type_concat_no_mutate): Remove. + (tree_matrix::rvalue1): Use do_single_type_concat instead. + 2010-07-21 Jaroslav Hajek <highegg@gmail.com> * bitfcns.cc (Fsizemax): New DEFUN.
--- a/src/pt-mat.cc +++ b/src/pt-mat.cc @@ -832,18 +832,6 @@ return result; } -template<class TYPE, class OV_TYPE> -static octave_value -do_single_type_concat_no_mutate (const dim_vector& dv, - tm_const& tmp) -{ - TYPE result; - - single_type_concat<TYPE> (result, dv, tmp); - - return new OV_TYPE (result); -} - octave_value tree_matrix::rvalue1 (int) { @@ -946,16 +934,14 @@ if (all_real_p) retval = do_single_type_concat<SparseMatrix> (dv, tmp); else - retval = do_single_type_concat_no_mutate<SparseComplexMatrix, - octave_sparse_complex_matrix> (dv, tmp); + retval = do_single_type_concat<SparseComplexMatrix> (dv, tmp); } else { if (all_real_p) retval = do_single_type_concat<NDArray> (dv, tmp); else - retval = do_single_type_concat_no_mutate<ComplexNDArray, - octave_complex_matrix> (dv, tmp); + retval = do_single_type_concat<ComplexNDArray> (dv, tmp); } } else if (result_type == "single") @@ -963,8 +949,7 @@ if (all_real_p) retval = do_single_type_concat<FloatNDArray> (dv, tmp); else - retval = do_single_type_concat_no_mutate<FloatComplexNDArray, - octave_float_complex_matrix> (dv, tmp); + retval = do_single_type_concat<FloatComplexNDArray> (dv, tmp); } else if (result_type == "char") {