boost/numeric/ublas/vector_proxy.hpp&gt;
#include &lt;boost/numeric/ublas/io.hpp&gt;

int main () {
    using namespace boost::numeric::ublas;
    vector&lt;double&gt; v (3);
    for (int i = 0; i &lt; 3; ++ i)
        project (v, slice (0, 1, 3)) (i) = i;
    std::cout &lt;&lt; project (v, slice (0, 1, 3)) &lt;&lt; std::endl;
}
</pre>
<hr />
<p>Copyright (&copy;) 2000-2002 Joerg Walter, Mathias Koch<br />
   Use, modification and distribution are subject to the
   Boost Software License, Version 1.0.
   (S