Instead of repeating the entire list of vectors by elements, I would try to assign each of your vectors directly to the corresponding column.
template<class AE > BOOST_UBLAS_INLINE matrix_column & operator= (const vector_expression< AE > &ae)
You need to copy each element at some point, but it should be faster than a nested loop (or the primary error in Boost.uBlas, if not).
source share