2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-01-24 06:22:13 +00:00
Files
ublas/doc/samples/vector_range.cpp
Jörg Walter 4ab34dbb6e Documentation update and some fixes.
[SVN r17184]
2003-02-04 07:22:11 +00:00

13 lines
324 B
C++

#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/io.hpp>
int main () {
using namespace boost::numeric::ublas;
vector<double> v (3);
vector_range<vector<double> > vr (v, range (0, 3));
for (unsigned i = 0; i < vr.size (); ++ i)
vr (i) = i;
std::cout << vr << std::endl;
}