Hi all,
I agree with Andrea and I suppose that a solution to such problems would come from a horizontal or vertical concatenation expression template. It shouldn't be very hard to develop.

Furthermore to Jesses' answer, one may want to take a look at the generalized_vector_of_vector, that I think can be operated through pointers to stored vectors (maybe it needs a dangerous hack there though). The latter may suffice for what dari wants to do.

Best
Nasos

>
> Hi guys,
> boost::ublas::assignement might not be an efficient choice, for it is
> meant to copy the values, if I'm not mistaken. If, as I have
> understood, the question is how to avoid the copy of this bunch of
> vectors, then I guess the solution is a suitable matrix adaptor that
> on-the-fly acts as a view.
>
> A similar issues arises whenever a plain double* array has to be
> converted on a boost::ublas::vector. In that case an adaptor is
> available (I guess not yet in the official distribution). Similarly, I
> suspect that the code should be something like:
>
> matrix_from_vectors< vect_type > m(n_vectors, a_list_of_vectors)
>
> Eventually, a storage specifier could say if the vectors are intended
> by rows or by columns. If the vectors are not stored toghether, it may
> look like:
>
>
> matrix_from_vectors< vect_type > m(n_vectors);
> m.row(0)=&v0;
> m.row(1)=&v1;
> ...
>
> so that internally only a pointer to the vector is stored. I think
> that the question is really interesting and a good solution might be
> useful for many.
>
>
> Andrea
>
>
>
> --
> Andrea Cassioli
> _______________________________________________
> ublas mailing list
> ublas@lists.boost.org
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: nasos_i@hotmail.com


The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail. Get busy.