Sorry, forgot to post my intended usage.� I wanted to use std::transform over the rows.� Consider something like this and couldn't do to the dereference of the row_iterator gives a double type.� Are there any other ways to do this pattern in ublas?<br> <br>struct vector_sum<br>{<br>� template<class VectorType><br>� double operator()(const VectorType& vec)<br>� {<br>���� return std::accumulate(vec.begin(), vec.end(), 0.0);<br>� }<br>};<br><br>ublas::matrix<double> A(2.2);<br> ublas::vector<double> sums(2);<br><br>//Sum over rows.<br>std::transform(A.begin1(), A.end1(), sums.begin(), vector_sum());<br>