mirror of
https://github.com/boostorg/ublas.git
synced 2026-01-24 06:22:13 +00:00
14 lines
311 B
C++
14 lines
311 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 (unsigned i = 0; i < v.size (); ++ i)
|
|
v (i) = i;
|
|
|
|
std::cout << 2.0 * v << std::endl;
|
|
std::cout << v * 2.0 << std::endl;
|
|
}
|
|
|