Boost logo

Ublas :

From: Michael Stevens (mail_at_[hidden])
Date: 2006-11-16 05:07:00


Hello Gunter, Vassilis,

On Monday, 6. November 2006 10:43, Gunter Winkler wrote:
> Hallo,
>
> I checked the patches of Vassilis and applied them (with minor
> modifications) on my local copy of ublas. Here is the full patch and sample
> program.
>
> @Michael: please apply this to the CVS version.

I have done as I was told an applied the patch! Thanks.

I noticed that the line 'size_ = size' is now placed before the
'restrict_capacity' which would fix an existing bug. Oldly Vassilis original
patch shows being there already and the opposite happening:
         void resize (size_type size, bool preserve = true) {
-            // FIXME preserve unimplemented
             BOOST_UBLAS_CHECK (!preserve, internal_logic ());
-            size_ = size;
             capacity_ = restrict_capacity (capacity_);
-            index_data_. resize (capacity_);
-            value_data_. resize (capacity_);
-            filled_ = 0;
+            size_ = size;

Not sure if there was a version problem there?

I have placed the 'sp_test.cpp' in a new 'manual' subdirectory of
'libs/numeric/ublas/test'. It can't really be used as is for regression
testing but is useful to have.

To meet the boost guideline I place a copyright and licence comment at the
head. Since not everyone likes there name on public code I have given myself
as the copyright owner. If you want me to corrently assign the copyright to
you please say so and I will commit a change!

Similar I normaly attribute people in the CVS commit log. Please say if you do
not want this.

Michael

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