Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57900 - in sandbox/numeric_bindings/boost/numeric/bindings: . detail std ublas
From: rutger_at_[hidden]
Date: 2009-11-24 14:38:48


Author: rutger
Date: 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
New Revision: 57900
URL: http://svn.boost.org/trac/boost/changeset/57900

Log:
Added initial static matrix/vector size support to the numeric_bindings

Added:
   sandbox/numeric_bindings/boost/numeric/bindings/has_linear_array.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/size.hpp (contents, props changed)
Removed:
   sandbox/numeric_bindings/boost/numeric/bindings/tensor_size.hpp
Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/detail/pod.hpp | 23 +++++++++--------------
   sandbox/numeric_bindings/boost/numeric/bindings/detail/tag.hpp | 7 +++++++
   sandbox/numeric_bindings/boost/numeric/bindings/end.hpp | 5 +++--
   sandbox/numeric_bindings/boost/numeric/bindings/identity.hpp | 5 +++--
   sandbox/numeric_bindings/boost/numeric/bindings/io.hpp | 3 ++-
   sandbox/numeric_bindings/boost/numeric/bindings/matrix_num_columns.hpp | 14 +++++++++++---
   sandbox/numeric_bindings/boost/numeric/bindings/matrix_num_rows.hpp | 15 ++++++++++++---
   sandbox/numeric_bindings/boost/numeric/bindings/std/valarray.hpp | 1 +
   sandbox/numeric_bindings/boost/numeric/bindings/std/vector.hpp | 4 +++-
   sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix.hpp | 20 +++++++++++++++++++-
   sandbox/numeric_bindings/boost/numeric/bindings/ublas/symmetric.hpp | 2 ++
   sandbox/numeric_bindings/boost/numeric/bindings/ublas/triangular.hpp | 2 ++
   sandbox/numeric_bindings/boost/numeric/bindings/ublas/vector.hpp | 4 +++-
   sandbox/numeric_bindings/boost/numeric/bindings/ublas/vector_sparse.hpp | 1 +
   14 files changed, 78 insertions(+), 28 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/detail/pod.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/detail/pod.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/detail/pod.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -23,7 +23,8 @@
     typedef typename copy_const< Id, T >::type value_type;
     typedef mpl::map<
         mpl::pair< tag::value_type, value_type >,
- mpl::pair< tag::entity, tag::scalar >
+ mpl::pair< tag::entity, tag::scalar >,
+ mpl::pair< tag::size_type<1>, mpl::int_<1> >
> property_map;
 
     static value_type* data( Id& t ) {
@@ -39,13 +40,11 @@
     typedef mpl::map<
         mpl::pair< tag::value_type, value_type >,
         mpl::pair< tag::entity, tag::vector >,
+ mpl::pair< tag::size_type<1>, mpl::int_<N> >,
         mpl::pair< tag::data_structure, tag::linear_array >
+ mpl::pair< tag::stride_type<1>, tag::contiguous >
> property_map;
 
- static std::ptrdiff_t size1( Id const& t ) {
- return N;
- }
-
     static value_type* data( Id& t ) {
         return &t[0];
     }
@@ -59,19 +58,15 @@
     typedef mpl::map<
         mpl::pair< tag::value_type, value_type >,
         mpl::pair< tag::entity, tag::matrix >,
+ mpl::pair< tag::size_type<1>, mpl::int_<N> >,
+ mpl::pair< tag::size_type<2>, mpl::int_<M> >,
         mpl::pair< tag::matrix_type, tag::general >,
         mpl::pair< tag::data_structure, tag::linear_array >,
- mpl::pair< tag::data_order, tag::row_major >
+ mpl::pair< tag::data_order, tag::row_major >,
+ mpl::pair< tag::stride_type<1>, tag::contiguous >,
+ mpl::pair< tag::stride_type<2>, mpl::int_<N> >
> property_map;
 
- static std::ptrdiff_t size1( Id const& t ) {
- return N;
- }
-
- static std::ptrdiff_t size2( Id const& t ) {
- return M;
- }
-
     static value_type* data( Id& t ) {
         return &t[0][0];
     }

Modified: sandbox/numeric_bindings/boost/numeric/bindings/detail/tag.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/detail/tag.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/detail/tag.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -33,6 +33,13 @@
 struct vector: tensor<1> {};
 struct matrix: tensor<2> {};
 
+template< int Dimension >
+struct size_type: mpl::int_< Dimension > {};
+
+template< int Dimension >
+struct stride_type: mpl::int_< Dimension > {};
+
+struct contiguous: mpl::int_<1> {};
 
 struct linear_array {};
 struct triangular_array {};

Modified: sandbox/numeric_bindings/boost/numeric/bindings/end.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/end.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/end.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -11,6 +11,7 @@
 
 #include <boost/numeric/bindings/detail/adaptor.hpp>
 #include <boost/numeric/bindings/detail/dense_iterator.hpp>
+#include <boost/numeric/bindings/size.hpp>
 
 namespace boost {
 namespace numeric {
@@ -27,13 +28,13 @@
 template< typename T >
 detail::dense_iterator< typename value_type<T>::type > end( T& t ) {
     return detail::dense_iterator< typename value_type<T>::type >(
- detail::adaptor_access<T>::data( t ) ) + tensor_size1( t );
+ detail::adaptor_access<T>::data( t ) ) + size<1>( t );
 }
 
 template< typename T >
 detail::dense_iterator< typename value_type<T const>::type > end( T const& t ) {
     return detail::dense_iterator< typename value_type<T const>::type >(
- detail::adaptor_access<T const>::data( t ) ) + tensor_size1( t );
+ detail::adaptor_access<T const>::data( t ) ) + size<1>( t );
 }
 
 } // namespace bindings

Added: sandbox/numeric_bindings/boost/numeric/bindings/has_linear_array.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/has_linear_array.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -0,0 +1,27 @@
+//
+// Copyright (c) 2009 by Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_HAS_LINEAR_ARRAY_HPP
+#define BOOST_NUMERIC_BINDINGS_HAS_LINEAR_ARRAY_HPP
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/numeric/bindings/detail/adaptor.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+
+template< typename T >
+struct has_linear_array: is_same< typename detail::property_at< T, detail::tag::data_structure >::type,
+ detail::tag::linear_array >::type {};
+
+} // namespace bindings
+} // namespace numeric
+} // namespace boost
+
+#endif

Modified: sandbox/numeric_bindings/boost/numeric/bindings/identity.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/identity.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/identity.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -10,6 +10,7 @@
 #define BOOST_NUMERIC_BINDINGS_IDENTITY_HPP
 
 #include <boost/numeric/bindings/detail/adaptable_type.hpp>
+#include <boost/numeric/bindings/size.hpp>
 #include <boost/ref.hpp>
 
 namespace boost {
@@ -30,8 +31,8 @@
     typedef adaptor< typename boost::remove_const<T>::type, T > underlying_adaptor;
     typedef typename underlying_adaptor::property_map property_map;
 
- static std::ptrdiff_t size1( Id const& id ) {
- return underlying_adaptor::size1( id.get() );
+ static typename result_of::size<T,1>::type size1( Id const& id ) {
+ return size<1>( id.get() );
     }
 
     static typename mpl::at< property_map, tag::value_type >::type* data( Id& id ) {

Modified: sandbox/numeric_bindings/boost/numeric/bindings/io.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/io.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/io.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -13,6 +13,7 @@
 #include <boost/utility/enable_if.hpp>
 #include <boost/numeric/bindings/begin.hpp>
 #include <boost/numeric/bindings/end.hpp>
+#include <boost/numeric/bindings/size.hpp>
 #include <boost/numeric/bindings/detail/adaptable_type.hpp>
 
 namespace boost {
@@ -22,7 +23,7 @@
 
 template< typename Stream, typename T >
 Stream& pretty_print( Stream& os, T const& t ) {
- os << "[" << vector_size(t) << "] ";
+ os << "[" << size<1>(t) << "] ";
     for( typename result_of::begin<T const>::type i = begin(t); i != end(t); ++i ) {
         os << *i << " ";
     }

Modified: sandbox/numeric_bindings/boost/numeric/bindings/matrix_num_columns.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/matrix_num_columns.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/matrix_num_columns.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -9,15 +9,23 @@
 #ifndef BOOST_NUMERIC_BINDINGS_MATRIX_NUM_COLUMNS_HPP
 #define BOOST_NUMERIC_BINDINGS_MATRIX_NUM_COLUMNS_HPP
 
-#include <boost/numeric/bindings/tensor_size.hpp>
+#include <boost/numeric/bindings/size.hpp>
 
 namespace boost {
 namespace numeric {
 namespace bindings {
+namespace result_of {
 
 template< typename T >
-inline std::ptrdiff_t matrix_num_columns( T const& t ) {
- return tensor_size2( t );
+struct num_columns {
+ typedef typename result_of::size<T,2>::type type;
+};
+
+} // namespace result_of
+
+template< typename T >
+inline typename result_of::num_columns<T>::type num_columns( T const& t ) {
+ return size<2>( t );
 }
 
 } // bindings

Modified: sandbox/numeric_bindings/boost/numeric/bindings/matrix_num_rows.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/matrix_num_rows.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/matrix_num_rows.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -9,15 +9,24 @@
 #ifndef BOOST_NUMERIC_BINDINGS_MATRIX_NUM_ROWS_HPP
 #define BOOST_NUMERIC_BINDINGS_MATRIX_NUM_ROWS_HPP
 
-#include <boost/numeric/bindings/tensor_size.hpp>
+#include <boost/numeric/bindings/size.hpp>
 
 namespace boost {
 namespace numeric {
 namespace bindings {
 
+namespace result_of {
+
+template< typename T >
+struct num_rows {
+ typedef typename result_of::size<T,1>::type type;
+};
+
+} // namespace result_of
+
 template< typename T >
-inline std::ptrdiff_t matrix_num_rows( T const& t ) {
- return tensor_size1( t );
+inline typename result_of::num_rows<T>::type num_rows( T const& t ) {
+ return size<1>( t );
 }
 
 } // bindings

Added: sandbox/numeric_bindings/boost/numeric/bindings/size.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/size.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -0,0 +1,163 @@
+//
+// Copyright (c) 2009 Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_SIZE_HPP
+#define BOOST_NUMERIC_BINDINGS_SIZE_HPP
+
+#include <boost/numeric/bindings/detail/adaptor.hpp>
+#include <boost/numeric/bindings/tensor_rank.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/min.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/less_equal.hpp>
+#include <boost/mpl/greater.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace detail {
+
+template< typename T, int Dimension >
+struct is_dynamic_size: is_same<
+ typename detail::property_at< T, detail::tag::size_type<Dimension> >::type,
+ std::ptrdiff_t > {};
+
+template< int Dimension >
+struct get_dynamic_size {};
+
+template<>
+struct get_dynamic_size<1> {
+ template< typename T >
+ static std::ptrdiff_t size( T const& t ) {
+ return detail::adaptor_access<T>::size1( t );
+ }
+};
+
+template<>
+struct get_dynamic_size<2> {
+ template< typename T >
+ static std::ptrdiff_t size( T const& t ) {
+ return detail::adaptor_access<T>::size2( t );
+ }
+};
+
+template<>
+struct get_dynamic_size<3> {
+ template< typename T >
+ static std::ptrdiff_t size( T const& t ) {
+ return detail::adaptor_access<T>::size3( t );
+ }
+};
+
+template<>
+struct get_dynamic_size<4> {
+ template< typename T >
+ static std::ptrdiff_t size( T const& t ) {
+ return detail::adaptor_access<T>::size4( t );
+ }
+};
+
+
+template< typename T, int Dimension, typename Enable = void >
+struct size_impl {};
+
+template< typename T, int Dimension >
+struct size_impl< T, Dimension,
+ typename boost::enable_if< typename mpl::and_<
+ mpl::less_equal< mpl::int_<Dimension>, tensor_rank<T> >,
+ is_dynamic_size< T, Dimension > >::type
+ >::type > {
+
+ typedef std::ptrdiff_t result_type;
+
+ static std::ptrdiff_t size( T const& t ) {
+ return get_dynamic_size<Dimension>::size( t );
+ }
+
+};
+
+template< typename T, int Dimension >
+struct size_impl< T, Dimension,
+ typename boost::enable_if< typename mpl::and_<
+ mpl::less_equal< mpl::int_<Dimension>, tensor_rank<T> >,
+ mpl::not_< is_dynamic_size< T, Dimension > > >::type
+ >::type > {
+
+ typedef typename detail::property_at< T, detail::tag::size_type<Dimension> >::type result_type;
+
+ static result_type size( T const& t ) {
+ return result_type();
+ }
+
+};
+
+template< typename T, int Dimension >
+struct size_impl< T, Dimension,
+ typename boost::enable_if< typename mpl::and_<
+ mpl::greater< mpl::int_<Dimension>, tensor_rank<T> >,
+ is_dynamic_size< T, 1 > >::type
+ >::type > {
+
+ typedef std::ptrdiff_t result_type;
+
+ static std::ptrdiff_t size( T const& t ) {
+ return std::min< std::ptrdiff_t >( size_impl<T,1>::size(t), 1 );
+ }
+
+};
+
+template< typename T, int Dimension >
+struct size_impl< T, Dimension,
+ typename boost::enable_if< typename mpl::and_<
+ mpl::greater< mpl::int_<Dimension>, tensor_rank<T> >,
+ mpl::not_< is_dynamic_size< T, 1 > > >::type
+ >::type > {
+
+ typedef typename mpl::min< typename detail::property_at< T, detail::tag::size_type<1> >::type,
+ mpl::int_<1> >::type result_type;
+
+ static result_type size( T const& t ) {
+ return result_type();
+ }
+
+};
+
+} // namespace detail
+
+
+namespace result_of {
+
+template< typename T, int Dimension >
+struct size {
+ typedef typename detail::size_impl< T, Dimension >::result_type type;
+};
+
+}
+
+template< int Dimension, typename T >
+inline typename result_of::size< T const, Dimension >::type size( T const& t ) {
+ return detail::size_impl< T const, Dimension >::size( t );
+}
+
+template< typename T >
+inline std::ptrdiff_t size( T const& t, std::size_t dimension ) {
+ switch( dimension ) {
+ case 1: return size<1>(t);
+ case 2: return size<2>(t);
+ case 3: return size<3>(t);
+ case 4: return size<4>(t);
+ default: return 0;
+ }
+}
+
+} // namespace bindings
+} // namespace numeric
+} // namespace boost
+
+#endif
+

Modified: sandbox/numeric_bindings/boost/numeric/bindings/std/valarray.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/std/valarray.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/std/valarray.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -24,6 +24,7 @@
     typedef mpl::map<
         mpl::pair< tag::value_type, value_type >,
         mpl::pair< tag::entity, tag::vector >,
+ mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
         mpl::pair< tag::data_structure, tag::linear_array >
> property_map;
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/std/vector.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/std/vector.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/std/vector.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -24,7 +24,9 @@
     typedef mpl::map<
         mpl::pair< tag::value_type, value_type >,
         mpl::pair< tag::entity, tag::vector >,
- mpl::pair< tag::data_structure, tag::linear_array >
+ mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
+ mpl::pair< tag::data_structure, tag::linear_array >,
+ mpl::pair< tag::stride_type<1>, tag::contiguous >
> property_map;
 
     static std::ptrdiff_t size1( Id const& t ) {

Deleted: sandbox/numeric_bindings/boost/numeric/bindings/tensor_size.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/tensor_size.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
+++ (empty file)
@@ -1,68 +0,0 @@
-//
-// Copyright (c) 2009 Rutger ter Borg
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_NUMERIC_BINDINGS_TENSOR_SIZE_HPP
-#define BOOST_NUMERIC_BINDINGS_TENSOR_SIZE_HPP
-
-#include <boost/mpl/less.hpp>
-#include <boost/mpl/greater_equal.hpp>
-
-#include <boost/numeric/bindings/tensor_rank.hpp>
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-
-template< typename T, int Dimension, typename Enable = void >
-struct tensor_size_impl {};
-
-
-template< typename T, int Dimension >
-struct tensor_size_impl< T, Dimension,
- typename boost::enable_if< boost::mpl::greater_equal< tensor_rank<T>, mpl::int_<Dimension> > >::type > {
-
- static std::ptrdiff_t size1( T const& t ) {
- return detail::adaptor_access<T>::size1( t );
- }
-
- static std::ptrdiff_t size2( T const& t ) {
- return detail::adaptor_access<T>::size2( t );
- }
-
-};
-
-template< typename T, int Dimension >
-struct tensor_size_impl< T, Dimension,
- typename boost::enable_if< boost::mpl::less< tensor_rank<T>, mpl::int_<Dimension> > >::type > {
-
- static std::ptrdiff_t size1( T const& t ) {
- return 1;
- }
-
- static std::ptrdiff_t size2( T const& t ) {
- return std::min< std::ptrdiff_t >( tensor_size_impl<T,1>::size1(t), 1 );
- }
-
-};
-
-template< typename T >
-inline std::ptrdiff_t tensor_size1( T const& t ) {
- return tensor_size_impl<T,1>::size1( t );
-}
-
-template< typename T >
-inline std::ptrdiff_t tensor_size2( T const& t ) {
- return tensor_size_impl<T,2>::size2( t );
-}
-
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif
-

Modified: sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -25,8 +25,19 @@
     typedef mpl::map<
         mpl::pair< tag::value_type, value_type >,
         mpl::pair< tag::entity, tag::matrix >,
+ mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
+ mpl::pair< tag::size_type<2>, std::ptrdiff_t >,
         mpl::pair< tag::data_structure, tag::linear_array >,
- mpl::pair< tag::data_order, typename detail::to_bindings_tag<F>::type >
+
+ // either tag::column_major or tag::row_major
+ mpl::pair< tag::data_order, typename detail::to_bindings_tag<F>::type >,
+
+ //
+ // is either contiguous in case of column/row major stuff, or it is dynamic, too.
+ //
+ mpl::pair< tag::stride_type<1>, std::ptrdiff_t >,
+ mpl::pair< tag::stride_type<2>, std::ptrdiff_t >,
+
> property_map;
 
     static std::ptrdiff_t size1( Id const& t ) {
@@ -41,6 +52,13 @@
         return &t.data()[0];
     }
 
+ static std::ptrdiff_t stride1( Id const& t ) {
+
+ }
+
+ static std::ptrdiff_t stride2( Id const& t ) {
+ }
+
 };
 
 } // namespace detail

Modified: sandbox/numeric_bindings/boost/numeric/bindings/ublas/symmetric.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/symmetric.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/symmetric.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -25,6 +25,8 @@
     typedef mpl::map<
         mpl::pair< tag::value_type, value_type >,
         mpl::pair< tag::entity, tag::matrix >,
+ mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
+ mpl::pair< tag::size_type<2>, std::ptrdiff_t >,
         mpl::pair< tag::matrix_type, tag::symmetric >,
         mpl::pair< tag::data_structure, tag::triangular_array >,
         mpl::pair< tag::data_side, typename to_bindings_tag<F1>::type >,

Modified: sandbox/numeric_bindings/boost/numeric/bindings/ublas/triangular.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/triangular.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/triangular.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -25,6 +25,8 @@
     typedef mpl::map<
         mpl::pair< tag::value_type, T >,
         mpl::pair< tag::entity, tag::matrix >,
+ mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
+ mpl::pair< tag::size_type<2>, std::ptrdiff_t >,
         mpl::pair< tag::matrix_type, tag::triangular >,
         mpl::pair< tag::matrix_side, typename to_bindings_tag<F1>::type >,
         mpl::pair< tag::data_structure, tag::triangular_array >,

Modified: sandbox/numeric_bindings/boost/numeric/bindings/ublas/vector.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/vector.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/vector.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -24,7 +24,9 @@
     typedef mpl::map<
         mpl::pair< tag::value_type, value_type >,
         mpl::pair< tag::entity, tag::vector >,
- mpl::pair< tag::data_structure, tag::linear_array >
+ mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
+ mpl::pair< tag::data_structure, tag::linear_array >,
+ mpl::pair< tag::stride_type<1>, tag::contiguous >
> property_map;
 
     static std::ptrdiff_t size1( Id const& t ) {

Modified: sandbox/numeric_bindings/boost/numeric/bindings/ublas/vector_sparse.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/vector_sparse.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/vector_sparse.hpp 2009-11-24 14:38:46 EST (Tue, 24 Nov 2009)
@@ -23,6 +23,7 @@
     typedef mpl::map<
         mpl::pair< tag::value_type, T >,
         mpl::pair< tag::entity, tag::vector >,
+ mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
         mpl::pair< tag::data_structure, tag::associative_array >
> property_map;
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk