From afb28bc29b050d0881ced3f7cc2060c4084de73c Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Wed, 16 Mar 2005 13:10:06 +0000 Subject: [PATCH] Support BOOST_UBLAS_NO_NESTED_CLASS_RELATION --- test/common/init.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/common/init.hpp b/test/common/init.hpp index 2a241566..1b9de281 100644 --- a/test/common/init.hpp +++ b/test/common/init.hpp @@ -19,9 +19,15 @@ void initialize_vector (V &v) { template void initialize_matrix_impl (M &m, ublas::packed_proxy_tag) { typename M::size_type size1 = m.size1 (); +#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION for (typename M::iterator1 i = m.begin1(); i != m.end1(); ++ i) for (typename M::iterator2 j = i.begin(); j != i.end(); ++ j) *j = typename M::value_type (i.index1() * size1 + j.index2() + 1); +#else + for (typename M::iterator1 i = m.begin1(); i != m.end1(); ++ i) + for (typename M::iterator2 j = ublas::begin (i, ublas::iterator1_tag ()); j != ublas::end (i, ublas::iterator1_tag ()); ++ j) + *j = typename M::value_type (i.index1() * size1 + j.index2() + 1); +#endif } template