2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-26 17:12:10 +00:00

uBLAS CHANGE removed UBLAS_TYPE_CHECK from sparse_prod. The tests trigger in many numeric situations (NaN) and are only there to pickup gross programming errors

svn path=/trunk/boost/boost/numeric/ublas/; revision=34008
This commit is contained in:
Michael Stevens
2006-05-18 16:50:26 +00:00
parent 5cc19b0a13
commit 32e7019dea

View File

@@ -41,12 +41,6 @@ namespace boost { namespace numeric { namespace ublas {
// ISSUE why is there a dense vector here?
vector<value_type> temporary (e2 ().size2 ());
temporary.clear ();
#if BOOST_UBLAS_TYPE_CHECK
matrix<value_type, row_major> cm (m.size1 (), m.size2 ());
typedef typename type_traits<value_type>::real_type real_type;
real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2));
indexing_matrix_assign<scalar_assign> (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 ());
while (it1 != it1_end) {
@@ -86,9 +80,6 @@ namespace boost { namespace numeric { namespace ublas {
}
++ it1;
}
#if BOOST_UBLAS_TYPE_CHECK
BOOST_UBLAS_CHECK (norm_1 (m - cm) <= 2 * std::numeric_limits<real_type>::epsilon () * merrorbound, internal_logic ());
#endif
return m;
}
@@ -109,12 +100,6 @@ namespace boost { namespace numeric { namespace ublas {
// ISSUE why is there a dense vector here?
vector<value_type> temporary (e1 ().size1 ());
temporary.clear ();
#if BOOST_UBLAS_TYPE_CHECK
matrix<value_type, column_major> cm (m.size1 (), m.size2 ());
typedef typename type_traits<value_type>::real_type real_type;
real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2));
indexing_matrix_assign<scalar_assign> (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 ());
while (it2 != it2_end) {
@@ -154,9 +139,6 @@ namespace boost { namespace numeric { namespace ublas {
}
++ it2;
}
#if BOOST_UBLAS_TYPE_CHECK
BOOST_UBLAS_CHECK (norm_1 (m - cm) <= 2 * std::numeric_limits<real_type>::epsilon () * merrorbound, internal_logic ());
#endif
return m;
}