Boost logo

Ublas :

Subject: Re: [ublas] fixed size vector in boost::numeric::ublas?
From: Markus Grabner (grabner_at_[hidden])
Date: 2010-08-05 20:15:17


Nasos Iliopoulos wrote:

>
>> vector. That said, when I was first coding I became very confused with
>> the names and ended up writing a lot of my code using bounded_vector when
>> I should
>> have been using c_vector. This is part of my fear of having too many
>> versions
>> of these types. To be honest though, I am not sure I will ever use the
>> bounded_vector in my code again.
>
> Me neither, I don't see any benefits (size and performance wise) using the
> bounded types. Unless we are talking about some exotically specialised
> requirements I don't find they should be around. If the fixed containers
> are in I also believe that the new documentation should spend the least
> amount of lines on them as they are very confusing to the beginners. What
> do other people think?
If we knew that nobody uses the bounded types, they can certainly just be
removed. However, for backward compatibility, they should probably stay in
ublas.

>> If the intent is to deprecate the existing c_vector and c_matrix
>> implementation and rename it if necessary, then that sounds great to me.
>
> This is certainly a good option:
> 0. Deprecate c_vector and c_matrix for some time.
> 1. Copy their implementation into fixed_xxxx.
> 2. remove size member.
> 4. Merge Markus implementation in this implementation.
> 5. Reiterate the issues with size checking.
>
> Markus what do you think?
Fine for me, except that we don't get rid of redundant code if we base the
fixed_xxxx implementation on c_vector. We get vector arithmetic, iterators
etc. for free if we derive the fixed types from ublas::vector and
ublas::matrix.

        Kind regards,
                Markus

-- 
Markus Grabner
Institute for Computer Graphics and Vision
Graz University of Technology, Inffeldgasse 16a/II, 8010 Graz, Austria
WWW: http://www.icg.tugraz.at/Members/grabner