Mercurial > hg > octave-lojdl
changeset 8181:1ebcb9872ced
fix sparse-matrix bool/cmp op instantiation problem
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 06 Oct 2008 11:07:54 -0400 |
parents | da48d2ca096f |
children | 1b2256d6e01d |
files | liboctave/ChangeLog liboctave/Sparse-op-defs.h liboctave/Sparse.h |
diffstat | 3 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -2,6 +2,13 @@ * oct-lookup.h: Mark functions inline. Add missing std:: qualifiers. +2008-10-06 John W. Eaton <jwe@octave.org> + + * Sparse.h (Sparse<T>::elt_type): New typedef. + * Sparse-op-defs.h (SPARSE_SMSM_BOOL_OP, SPARSE_MSM_CMP_OP): + Use it to call sparse-matrix/scalar operator instead of attempting + to instantiate mixed-type sparse-matrix/scalar operators. + 2008-10-03 Jaroslav Hajek <highegg@gmail.com> * Array.h (Array<T>::maybe_delete_elements): Remove rfv argument from
--- a/liboctave/Sparse-op-defs.h +++ b/liboctave/Sparse-op-defs.h @@ -749,15 +749,11 @@ \ if (m1_nr == 1 && m1_nc == 1) \ { \ - extern OCTAVE_API SparseBoolMatrix F (const double&, const M2&); \ - extern OCTAVE_API SparseBoolMatrix F (const Complex&, const M2&); \ - r = F (m1.elem(0,0), m2); \ + r = F (m1.elem(0,0) != M1::elt_type (), m2); \ } \ else if (m2_nr == 1 && m2_nc == 1) \ { \ - extern OCTAVE_API SparseBoolMatrix F (const M1&, const double&); \ - extern OCTAVE_API SparseBoolMatrix F (const M1&, const Complex&); \ - r = F (m1, m2.elem(0,0)); \ + r = F (m1, m2.elem(0,0) != M2::elt_type ()); \ } \ else if (m1_nr == m2_nr && m1_nc == m2_nc) \ { \ @@ -883,15 +879,11 @@ \ if (m1_nr == 1 && m1_nc == 1) \ { \ - extern OCTAVE_API SparseBoolMatrix F (const double&, const M2&); \ - extern OCTAVE_API SparseBoolMatrix F (const Complex&, const M2&); \ - r = F (m1.elem(0,0), m2); \ + r = F (m1.elem(0,0) != M1::elt_type (), m2); \ } \ else if (m2_nr == 1 && m2_nc == 1) \ { \ - extern OCTAVE_API SparseBoolMatrix F (const M1&, const double&); \ - extern OCTAVE_API SparseBoolMatrix F (const M1&, const Complex&); \ - r = F (m1, m2.elem(0,0)); \ + r = F (m1, m2.elem(0,0) != M2::elt_type ()); \ } \ else if (m1_nr == m2_nr && m1_nc == m2_nc) \ { \