Sorry, forgot to post my intended usage.� I wanted to use std::transform over the rows.� Consider something like this and couldn&#39;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&lt;class VectorType&gt;<br>� double operator()(const VectorType&amp; vec)<br>� {<br>���� return std::accumulate(vec.begin(), vec.end(), 0.0);<br>� }<br>};<br><br>ublas::matrix&lt;double&gt; A(2.2);<br>

ublas::vector&lt;double&gt; sums(2);<br><br>//Sum over rows.<br>std::transform(A.begin1(), A.end1(), sums.begin(), vector_sum());<br>