mirror of
https://github.com/boostorg/ublas.git
synced 2026-01-30 20:32:14 +00:00
12 lines
300 B
C++
12 lines
300 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);
|
|
for (int i = 0; i < 3; ++ i)
|
|
project (v, range (0, 3)) (i) = i;
|
|
std::cout << project (v, range (0, 3)) << std::endl;
|
|
}
|
|
|