Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58946 - in sandbox/numeric_bindings/boost/numeric/bindings/ublas: . detail
From: rutger_at_[hidden]
Date: 2010-01-12 12:22:45


Author: rutger
Date: 2010-01-12 12:22:44 EST (Tue, 12 Jan 2010)
New Revision: 58946
URL: http://svn.boost.org/trac/boost/changeset/58946

Log:
ublas traits fixes (mirror bandwidth for hermitian/symmetric ublas adaptors)

Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/ublas/detail/basic_ublas_adaptor.hpp | 11 -----------
   sandbox/numeric_bindings/boost/numeric/bindings/ublas/hermitian.hpp | 14 +++++++++++++-
   sandbox/numeric_bindings/boost/numeric/bindings/ublas/symmetric.hpp | 14 +++++++++++++-
   3 files changed, 26 insertions(+), 13 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/ublas/detail/basic_ublas_adaptor.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/detail/basic_ublas_adaptor.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/detail/basic_ublas_adaptor.hpp 2010-01-12 12:22:44 EST (Tue, 12 Jan 2010)
@@ -50,17 +50,6 @@
         return bindings::stride2( id.data() );
     }
 
- // A.k.a. left half-bandwidth
- static std::ptrdiff_t bandwidth1( const Id& id ) {
- return bindings::bandwidth1( id.data() );
- }
-
- // A.k.a. right half-bandwidth
- static std::ptrdiff_t bandwidth2( const Id& id ) {
- return bindings::bandwidth2( id.data() );
- }
-
-
 };
 
 } // detail

Modified: sandbox/numeric_bindings/boost/numeric/bindings/ublas/hermitian.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/hermitian.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/hermitian.hpp 2010-01-12 12:22:44 EST (Tue, 12 Jan 2010)
@@ -63,7 +63,19 @@
         Id,
         mpl::pair< tag::matrix_type, tag::hermitian >,
         mpl::pair< tag::data_side, typename convert_to< tag::data_side, F >::type >
- > {};
+ > {
+
+ typedef typename convert_to< tag::data_side, F >::type data_side;
+
+ static std::ptrdiff_t bandwidth1( const Id& id ) {
+ return bindings::bandwidth( id.data(), data_side() );
+ }
+
+ static std::ptrdiff_t bandwidth2( const Id& id ) {
+ return bindings::bandwidth( id.data(), data_side() );
+ }
+
+};
 
 } // namespace detail
 } // namespace bindings

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 2010-01-12 12:22:44 EST (Tue, 12 Jan 2010)
@@ -63,7 +63,19 @@
         Id,
         mpl::pair< tag::matrix_type, tag::symmetric >,
         mpl::pair< tag::data_side, typename convert_to< tag::data_side, F >::type >
- > {};
+ > {
+
+ typedef typename convert_to< tag::data_side, F >::type data_side;
+
+ static std::ptrdiff_t bandwidth1( const Id& id ) {
+ return bindings::bandwidth( id.data(), data_side() );
+ }
+
+ static std::ptrdiff_t bandwidth2( const Id& id ) {
+ return bindings::bandwidth( id.data(), data_side() );
+ }
+
+};
 
 } // namespace detail
 } // namespace bindings


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