Boost logo

Ublas :

Subject: [ublas] Fix regression in symmetic_adaptor
From: Michael Stevens (mail_at_[hidden])
Date: 2009-06-16 12:55:50


Hi All,

I have just been testing the uBLAS released in boost 1_39_0 and found a nasty regression.

Rev 48466 commited the changes:
- complete redesign of functionals lower, unit_lower and strict_lower
- added new transpose_structure<L> class that converts a "lower" functional to an "upper" functional

In the change, updates to couple of references to mutable_restrict1/2 were missed out. Since I don't have Boost commit access any
more hopefully someone can apply the patch for me.

I will look into submitting an addintional a regression test for symmetric_adaptor as it does not seem t be covered.

Thanks,
 Michael

Index: boost/numeric/ublas/symmetric.hpp
===================================================================
--- boost/numeric/ublas/symmetric.hpp (revision 53980)
+++ boost/numeric/ublas/symmetric.hpp (working copy)
@@ -1142,7 +1142,7 @@
         BOOST_UBLAS_INLINE
         iterator1 find1 (int rank, size_type i, size_type j) {
             if (rank == 1)
- i = triangular_type::mutable_restrict1 (i, j);
+ i = triangular_type::mutable_restrict1 (i, j, size1(), size2());
             return iterator1 (*this, data ().find1 (rank, i, j));
         }
         BOOST_UBLAS_INLINE
@@ -1172,7 +1172,7 @@
         BOOST_UBLAS_INLINE
         iterator2 find2 (int rank, size_type i, size_type j) {
             if (rank == 1)
- j = triangular_type::mutable_restrict2 (i, j);
+ j = triangular_type::mutable_restrict2 (i, j, size1(), size2());
             return iterator2 (*this, data ().find2 (rank, i, j));
         }
 

-- 
___________________________________
Michael Stevens Systems Engineering
34128 Kassel, Germany
Phone/Fax: +49 561 5218038
Mobile: +49 1577 7807325
Navigation Systems, Estimation  and
                 Bayesian Filtering
    http://bayesclasses.sf.net
___________________________________