From 64c5a795d8d55475ca383e685bf6af562ca4c304 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Fri, 16 Jul 2004 16:24:52 +0000 Subject: [PATCH] Correct += semmantics is type check --- include/boost/numeric/ublas/operation.hpp | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/include/boost/numeric/ublas/operation.hpp b/include/boost/numeric/ublas/operation.hpp index 899a26f2..d67c2a2b 100644 --- a/include/boost/numeric/ublas/operation.hpp +++ b/include/boost/numeric/ublas/operation.hpp @@ -493,10 +493,10 @@ namespace boost { namespace numeric { namespace ublas { typedef typename M::value_type value_type; #if BOOST_UBLAS_TYPE_CHECK - matrix cm (m.size1 (), m.size2 ()); + matrix cm (m); typedef typename type_traits::real_type real_type; real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2)); - indexing_matrix_assign (scalar_assign::reference, value_type> (), cm, prod (e1, e2), row_major_tag ()); + indexing_matrix_assign (scalar_plus_assign::reference, value_type> (), cm, prod (e1, e2), row_major_tag ()); #endif size_type size1 (e1 ().size1 ()); size_type size2 (e1 ().size2 ()); @@ -523,10 +523,10 @@ namespace boost { namespace numeric { namespace ublas { typedef F functor_type; #if BOOST_UBLAS_TYPE_CHECK - matrix cm (m.size1 (), m.size2 ()); + matrix cm (m); typedef typename type_traits::real_type real_type; real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2)); - indexing_matrix_assign (scalar_assign::reference, value_type> (), cm, prod (e1, e2), row_major_tag ()); + indexing_matrix_assign (scalar_plus_assign::reference, value_type> (), cm, prod (e1, e2), row_major_tag ()); #endif typename expression1_type::const_iterator1 it1 (e1 ().begin1 ()); typename expression1_type::const_iterator1 it1_end (e1 ().end1 ()); @@ -572,10 +572,10 @@ namespace boost { namespace numeric { namespace ublas { typedef typename M::value_type value_type; #if BOOST_UBLAS_TYPE_CHECK - matrix cm (m.size1 (), m.size2 ()); + matrix cm (m); typedef typename type_traits::real_type real_type; real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2)); - indexing_matrix_assign (scalar_assign::reference, value_type> (), cm, prod (e1, e2), column_major_tag ()); + indexing_matrix_assign (scalar_plus_assign::reference, value_type> (), cm, prod (e1, e2), column_major_tag ()); #endif size_type size1 (e2 ().size1 ()); size_type size2 (e2 ().size2 ()); @@ -602,10 +602,10 @@ namespace boost { namespace numeric { namespace ublas { typedef F functor_type; #if BOOST_UBLAS_TYPE_CHECK - matrix cm (m.size1 (), m.size2 ()); + matrix cm (m); typedef typename type_traits::real_type real_type; real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2)); - indexing_matrix_assign (scalar_assign::reference, value_type> (), cm, prod (e1, e2), column_major_tag ()); + indexing_matrix_assign (scalar_plus_assign::reference, value_type> (), cm, prod (e1, e2), column_major_tag ()); #endif typename expression2_type::const_iterator2 it2 (e2 ().begin2 ()); typename expression2_type::const_iterator2 it2_end (e2 ().end2 ()); @@ -733,10 +733,10 @@ namespace boost { namespace numeric { namespace ublas { typedef typename M::value_type value_type; #if BOOST_UBLAS_TYPE_CHECK - matrix cm (m.size1 (), m.size2 ()); + matrix cm (m); typedef typename type_traits::real_type real_type; real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2)); - indexing_matrix_assign (scalar_assign::reference, value_type> (), cm, prod (e1, e2), row_major_tag ()); + indexing_matrix_assign (scalar_plus_assign::reference, value_type> (), cm, prod (e1, e2), row_major_tag ()); #endif size_type size (BOOST_UBLAS_SAME (e1 ().size2 (), e2 ().size1 ())); for (size_type k = 0; k < size; ++ k) { @@ -764,10 +764,10 @@ namespace boost { namespace numeric { namespace ublas { typedef typename M::value_type value_type; #if BOOST_UBLAS_TYPE_CHECK - matrix cm (m.size1 (), m.size2 ()); + matrix cm (m); typedef typename type_traits::real_type real_type; real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2)); - indexing_matrix_assign (scalar_assign::reference, value_type> (), cm, prod (e1, e2), column_major_tag ()); + indexing_matrix_assign (scalar_plus_assign::reference, value_type> (), cm, prod (e1, e2), column_major_tag ()); #endif size_type size (BOOST_UBLAS_SAME (e1 ().size2 (), e2 ().size1 ())); for (size_type k = 0; k < size; ++ k) {