From 1330dfd88bbf8148007a556b17a9c3fb8be096c3 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Mon, 20 Sep 2004 07:39:06 +0000 Subject: [PATCH] use array size_type unsigned complexity svn path=/trunk/boost/boost/numeric/ublas/; revision=25257 --- include/boost/numeric/ublas/matrix_sparse.hpp | 22 ++++++++++--------- include/boost/numeric/ublas/vector_sparse.hpp | 18 ++++++++------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/include/boost/numeric/ublas/matrix_sparse.hpp b/include/boost/numeric/ublas/matrix_sparse.hpp index 6df4b31b..a8d8f2d0 100644 --- a/include/boost/numeric/ublas/matrix_sparse.hpp +++ b/include/boost/numeric/ublas/matrix_sparse.hpp @@ -156,8 +156,8 @@ namespace boost { namespace numeric { namespace ublas { typedef typename type_traits::real_type real_type; typedef typename type_traits::precision_type precision_type; - BOOST_STATIC_CONSTANT (std::size_t, plus_complexity = type_traits::plus_complexity); - BOOST_STATIC_CONSTANT (std::size_t, multiplies_complexity = type_traits::multiplies_complexity); + BOOST_STATIC_CONSTANT (unsigned, plus_complexity = type_traits::plus_complexity); + BOOST_STATIC_CONSTANT (unsigned, multiplies_complexity = type_traits::multiplies_complexity); static BOOST_UBLAS_INLINE @@ -234,8 +234,8 @@ namespace boost { namespace numeric { namespace ublas { #ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS BOOST_UBLAS_USING matrix_expression >::operator (); #endif - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + typedef typename A::size_type size_type; + typedef typename A::difference_type difference_type; typedef T value_type; typedef A array_type; typedef const T &const_reference; @@ -1290,8 +1290,8 @@ namespace boost { namespace numeric { namespace ublas { #ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS BOOST_UBLAS_USING matrix_expression >::operator (); #endif - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + typedef typename A::size_type size_type; + typedef typename A::difference_type difference_type; typedef T value_type; typedef const T &const_reference; #ifndef BOOST_UBLAS_STRICT_MATRIX_SPARSE @@ -2464,8 +2464,9 @@ namespace boost { namespace numeric { namespace ublas { #ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS BOOST_UBLAS_USING matrix_expression >::operator (); #endif - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + // ISSUE require type consistency check for IA TA and IA::value_type + typedef typename IA::size_type size_type; + typedef typename IA::difference_type difference_type; typedef T value_type; typedef const T &const_reference; #ifndef BOOST_UBLAS_STRICT_MATRIX_SPARSE @@ -3787,8 +3788,9 @@ namespace boost { namespace numeric { namespace ublas { #ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS BOOST_UBLAS_USING matrix_expression >::operator (); #endif - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + // ISSUE require type consistency check for IA TA and IA::value_type + typedef typename IA::size_type size_type; + typedef typename IA::difference_type difference_type; typedef T value_type; typedef const T &const_reference; #ifndef BOOST_UBLAS_STRICT_MATRIX_SPARSE diff --git a/include/boost/numeric/ublas/vector_sparse.hpp b/include/boost/numeric/ublas/vector_sparse.hpp index d90c5e7f..9b39f7fb 100644 --- a/include/boost/numeric/ublas/vector_sparse.hpp +++ b/include/boost/numeric/ublas/vector_sparse.hpp @@ -151,8 +151,8 @@ namespace boost { namespace numeric { namespace ublas { typedef typename type_traits::real_type real_type; typedef typename type_traits::precision_type precision_type; - BOOST_STATIC_CONSTANT (std::size_t, plus_complexity = type_traits::plus_complexity); - BOOST_STATIC_CONSTANT (std::size_t, multiplies_complexity = type_traits::multiplies_complexity); + BOOST_STATIC_CONSTANT (unsigned, plus_complexity = type_traits::plus_complexity); + BOOST_STATIC_CONSTANT (unsigned, multiplies_complexity = type_traits::multiplies_complexity); static BOOST_UBLAS_INLINE @@ -229,8 +229,8 @@ namespace boost { namespace numeric { namespace ublas { #ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS BOOST_UBLAS_USING vector_expression >::operator (); #endif - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + typedef typename A::size_type size_type; + typedef typename A::difference_type difference_type; typedef T value_type; typedef A array_type; typedef const value_type &const_reference; @@ -696,8 +696,9 @@ namespace boost { namespace numeric { namespace ublas { #ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS BOOST_UBLAS_USING vector_expression >::operator (); #endif - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + // ISSUE require type consistency check for IA TA and IA::value_type + typedef typename IA::size_type size_type; + typedef typename IA::difference_type difference_type; typedef T value_type; typedef const T &const_reference; #ifndef BOOST_UBLAS_STRICT_VECTOR_SPARSE @@ -1241,8 +1242,9 @@ namespace boost { namespace numeric { namespace ublas { #ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS BOOST_UBLAS_USING vector_expression >::operator (); #endif - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + // ISSUE require type consistency check for IA TA and IA::value_type + typedef typename IA::size_type size_type; + typedef typename IA::difference_type difference_type; typedef T value_type; typedef const T &const_reference; #ifndef BOOST_UBLAS_STRICT_VECTOR_SPARSE