Boost logo

Ublas :

Subject: Re: [ublas] fixed size vector in boost::numeric::ublas?
From: Marco Guazzone (marco.guazzone_at_[hidden])
Date: 2010-07-23 04:20:43

On Fri, Jul 23, 2010 at 10:03 AM, Andrea Cassioli
<cassioliandre_at_[hidden]> wrote:
> Hi guys,
> I've played a little bit with the fixed_size array (which was missing
> as far as I know in uBlas) and seems to be a very promising idea!
> Looking around to address the issues you rise about the fixed_array
> ctor, array items initialization does not seem an easy to solve
> problem.
> Some people propose to use #define expansion to recursively generate a
> list of the type
> array_type v[N]={value,value..}
> But personally I do not think it is a crucial issues at the present time.
> Good job guys!


Does the ublas::c_vector class already implement this kind of vectors?

As you can see from its definition:

    template<class T, std::size_t N>
    class c_vector;

You bind the size at compile time, and indeed the internal container
can be implemented as a static (i.e. on the stack) array.


-- Marco